Get the Reseller's end-customer Charge information by ID
The Get the Reseller end-customer Charge by ID method returns end-customer Charge details of the current Reseller or any of its downstream Resellers.
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
GET {base_url}/api/v3/resellers/{reseller_id}/charges/{charge_id}
Arguments
Name | Parameter Type | Data type | Required/ | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) |
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) |
Accept | header | string | Required | Information about data types that the client (browser) supports |
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) |
charge_id | path | integer | Required | ID of the Charge |
include | query | string | Optional | Returns additional information about objects related to Charges. The parameter can be a comma-separated list if information about several objects is required. The following objects (possible values) are supported:
|
Response model
Name | Data type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array | Response data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | ID of the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Data type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes | object | Information about the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | date | Date and time of the Charge creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | date | Date and time when the Charge was updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_id | integer | ID of the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_id | integer | ID of the Resource in the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | integer | The number of ordered Services or Resources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_from | date | The start date of the period paid by the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
duration | float | Period of the Charge (in months). For example, 1 day = 0.033, 2 years = 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Charge details description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
unit_price | float | The unit price of the Service or Resource in the Plan currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
amount | float | Total amount of the Charge (Discount included) in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string | Status of the Charge (for the list of Charge statuses, see Charges attributes) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Type of the Charge (see also Charges attributes)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
net_cost | float | The net cost of the Charge in the Plan currency for the selected Reseller. For delegated Plans only | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes_amount | float | The amount of taxes for the Charge in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_resource_name | string | Name of the Resource in the customer's Subscription | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan_resource_id | integer | Name of the Resource in the customer's Plan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resource_id | integer | ID of the Resource | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_id | integer | ID of the Order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operate_to | date | The finish date of the period paid by the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
close_date | date | The close date of the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billing_date | date | Start date of the related Billing period | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
additional_params | array of objects | Additional parameters of the Charge for Services based on the following plugins:
In other cases, returns the empty array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | float | The amount of the Discount for the Charge in the Reseller currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
original_amount | string | Charge total amount in the Plan currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
original_amount_currency | string | Currency code of the Plan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency_rate | string | Exchange rate used for generating the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency_unit | integer | Currency units used for generating the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relationships | array | Related objects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
taxes | array | Taxes information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reseller | array | Reseller information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | array | Account information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription | array | Subscription information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plan | array | Plan information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount | array | Discount information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included | array | Additional information about objects listed in the request:
Attributes of the object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
links | array | Page navigation links that use the defined page navigation parameters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
self | string | Current page link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
first | string | First page link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
prev | string | Previous page link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
next | string | Next page link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
last | string | Last page link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | array | Additional information about the Charge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | string | Reseller's currency code |
Request example
GET /api/v3/resellers/1/charges/6118?include=reseller,account,subscription,plan
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "6118",
"type": "charges",
"attributes": {
"created_at": "2016-11-30T12:35:53.737502+0300",
"updated_at": "2017-01-19T17:35:29.198370+0300",
"subscription_id": 315,
"subscription_resource_id": null,
"quantity": 1,
"operate_from": "2017-01-01",
"duration": 1,
"description": "Покупка услуги (абонентская плата) #315 \"Auto provisioning w/o resources \"",
"unit_price": "0.0",
"amount": "0.5",
"status": "deleted",
"type": "Charge::Recurring",
"net_cost": null,
"taxes_amount": 0,
"subscription_resource_name": null,
"plan_resource_id": null,
"resource_id": null,
"order_id": 404,
"operate_to": "2017-01-31",
"close_date": "2017-01-31",
"billing_date": "2017-01-01",
"additional_params": [],
"discount": "0.50",
"original_amount": "0.5",
"original_amount_currency": "BYN",
"currency_rate": "1.0",
"currency_unit": 1
},
"relationships": {
"taxes": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "10",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "315",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "9",
"type": "plans"
}
},
"discount": {
"data": {
"id": "17",
"type": "discounts"
}
}
}
},
"included": [
{
"id": "1",
"type": "resellers",
"attributes": {
"created_at": "2016-08-25T09:26:12.491+03:00",
"updated_at": "2020-01-16T13:10:53.572+03:00",
"parent_id": 27,
"general": {
"created_at": "2016-08-25T09:26:12.491+03:00",
"updated_at": "2020-01-16T13:10:53.572+03:00",
"name": "SL SP Root",
"domain": "test.activeplatform.com",
"manager": "Alena Rtaeva",
"currency": "BYN"
},
"company": {
"created_at": "2016-08-25T09:26:12.491+03:00",
"updated_at": "2020-01-16T13:10:53.572+03:00",
"city": "Минск",
"zip": "220053",
"country": "BY",
"fax": "",
"name": "SL SP Root",
"address_line_1": "Гаяяяя",
"address_line_2": "Гаяяяяя",
"state": "Минская",
"phone": "+375250000060",
"email": "example@gmail.com"
},
"contacts": {
"created_at": "2016-08-25T09:26:12.491+03:00",
"updated_at": "2020-01-16T13:10:53.572+03:00",
"first_name": "Ivan",
"last_name": "Ivanov",
"middle_name": "",
"position": "",
"phone": "+375250000060",
"email": "test@example.ru"
},
"custom_attributes": {
"inn": "",
"email": "",
"l": ""
}
}
},
{
"id": "10",
"type": "accounts",
"attributes": {
"created_at": "2016-10-25T08:23:19.005+03:00",
"updated_at": "2019-03-13T07:15:25.452+03:00",
"reseller_id": 1,
"name": "POTTER",
"account_class_id": 1,
"primary_name": "POTTER",
"first_name": "Nata",
"middle_name": "",
"last_name": "Potter",
"country": "US",
"region": "WA",
"city": "Bellevue",
"street": "Tremont str.",
"building": "13",
"office": "203",
"zip": "98005",
"phone": "+16055545555",
"email": "test@email.com",
"status": "active",
"balance": "504.0",
"usable_balance": "483.0",
"current_debt": 0,
"subscription_credit_limit": 0,
"financial_blocking_threshold": 100,
"account_type_id": 1602,
"manager_id": null,
"owner_id": 20,
"tech_user_id": 20,
"bill_user_id": 20,
"custom_attributes": {
"registration_date": "14.02.2017",
"registration_number": "2342342",
"registration_authority": "234234",
"unp": "234234234",
"invoice": "0",
"dns": "0",
"post_address": "",
"fax": "",
"contact_position": "asdf",
"contact_charter": "asdf",
"bank_code": "234234",
"bank_name": "234234234",
"bank_account": "23423423423417",
"okpo": "",
"resolution_number": ""
},
"manager": null,
"default_payment_model": "prepay",
"account_type": {
"id": 1602,
"name": "Юридическое лицо",
"created_at": "2017-03-21T10:48:13.152+03:00",
"updated_at": "2017-03-21T10:48:13.152+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "business",
"default_payment_method_id": null,
"ancestry": "1600",
"use_by_default": false
},
"account_class": {
"id": 1,
"reseller_id": 1,
"name": "Default",
"created_at": "2016-08-25T09:26:12.820+03:00",
"updated_at": "2019-11-29T12:27:15.315+03:00",
"financial_blocking_threshold": "100.0",
"due_order_period": 90,
"subzero_period": 1,
"stop_subscription_type": "automatically",
"key": "default",
"color": "grey",
"guaranteed_payment_limit": 1000,
"guaranteed_payment_period": 7,
"delete_subscription_type": "automatically",
"denominated": false,
"buy_with_negative_balance": false,
"receipt_day": null,
"payment_model": "prepay",
"default": true,
"due_payment_period": 30,
"subscription_credit_limit": "0.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "322",
"type": "subscriptions"
},
{
"id": "970",
"type": "subscriptions"
}
]
}
}
},
{
"id": "315",
"type": "subscriptions",
"attributes": {
"created_at": "2016-11-30T12:35:53.369910+0300",
"updated_at": "2017-05-14T01:02:45.402943+0300",
"auto_renewal": false,
"billing_from": "2016-11-30",
"expiration_date": "2017-04-30",
"name": "Auto provisioning w/o resources ",
"renew_point_days": 0,
"start_date": "2016-11-30",
"status": "deleted",
"payment_model": "prepay",
"payment_model_parameters": {}
}
},
{
"id": "9",
"type": "plans",
"attributes": {
"created_at": "2016-10-05T16:19:20.424+03:00",
"updated_at": "2019-11-22T14:13:57.454+03:00",
"status": "active",
"name": "Auto provisioning w/o resources 234",
"description": "",
"public": true,
"plan_class_id": 1,
"product_id": 403,
"billing_type": "reservation",
"ancestry": null,
"reseller_id": 1,
"plan_class": "default",
"product_category_id": 190,
"product_category": "default",
"product": "Default",
"plan_resources": {
"data": [
{
"id": "562",
"type": "plan_resources",
"attributes": {
"created_at": "2016-10-07T15:14:24.975+03:00",
"updated_at": "2016-10-07T15:16:58.931+03:00",
"name": "Resource 4",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "Auto provisioning",
"included": 0,
"minimum": 0,
"limit": 0,
"setup_fee": "1.0",
"recurring_fee": "1.0",
"overuse_fee": "2.0",
"renewal_fee": "1.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 272,
"custom_attributes": {}
}
}
]
},
"plan_periods": {
"data": [
{
"id": "32",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-05T16:31:25.705+03:00",
"updated_at": "2016-12-29T12:22:54.002+03:00",
"duration_value": 2,
"duration_type": "month",
"setup_fee": "1.0",
"recurring_fee": "1.0",
"transfer_fee": "15.0",
"renewal_fee": "13.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
},
{
"id": "33",
"type": "plan_periods",
"attributes": {
"created_at": "2016-10-05T16:31:25.731+03:00",
"updated_at": "2016-12-29T12:22:54.183+03:00",
"duration_value": 2,
"duration_type": "year",
"setup_fee": "1.0",
"recurring_fee": "1.0",
"transfer_fee": "33.0",
"renewal_fee": "30.0",
"trial": false,
"public": true,
"status": "active",
"description": ""
}
}
]
},
"available_account_types": [
{
"id": 1,
"name": "Personal BLR",
"created_at": "2016-08-25T09:26:12.658+03:00",
"updated_at": "2019-05-08T07:21:42.843+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personalblr",
"default_payment_method_id": 2,
"ancestry": null,
"use_by_default": false
},
{
"id": 2,
"name": "Business BLR",
"created_at": "2016-08-25T09:26:12.674+03:00",
"updated_at": "2019-05-08T03:11:31.082+03:00",
"reseller_id": 1,
"name_pattern": "%primary_name",
"primary_name": "Company name",
"key": "businessblr",
"default_payment_method_id": 197,
"ancestry": null,
"use_by_default": false
}
],
"plan_currency": "RUB",
"custom_attributes": {
"item_1c_for_resellers": "",
"vat25": "0"
}
}
}
],
"meta": {
"currency": "BYN"
}
}