Get Charge Info by ID
See also API v3 methods that can be called for the current Reseller or for any of its downstream Resellers by the specified Reseller ID (see Reseller Charges).
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
The Get Charge Info by ID API v1 method returns information about the selected Charge of the current Reseller.
The
{base_url}/api/vendor/v1/charges/{charge_id}
method is deprecated. Use the following instead:
GET {base_url}/api/reseller/v1/charges/{charge_id}?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
api_token | query | string | Required | API token of the Manager that performs the operation (see Viewing and updating Manager's information). This token is used for determination of the current Reseller and authentication in the API service |
charge_id | path | integer | Required | Charge ID |
Response model
Name | Data type | Description | |||
---|---|---|---|---|---|
id | integer | Charge ID | |||
subscription_id | integer | Subscription ID | |||
subscription_resource_id | integer | Resource ID in the Subscription | |||
subscription_resource_name | string | Resource name in the Subscription | |||
plan_resource_id | integer | Resource ID in the Plan of the selected Reseller | |||
resource_id | integer | Resource ID in the Application Template | |||
quantity | integer | Amount of ordered Resource or Service units | |||
operate_from | date | Start date of the period for which the Charge has been paid | |||
operate_to | date | End date of the period for which the Charge has been paid | |||
duration | float | Charge period duration in months. For example, 1 day equals to 0.033, 2 years equal to 24 | |||
description | string | Charge description | |||
unit_price | float | Service or Resource unit price for the selected Reseller | |||
amount | float | Charge total amount | |||
status | string | Charge status (see Charges attributes for the list of statuses) | |||
type | string | Charge internal type:
| |||
order_id | integer | ID of the corresponding Order | |||
close_date | date | Date when Charge will be closed | |||
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 | |||
created_at | date | Charge creation date | |||
updated_at | date | Charge update date |
Request example
GET https://test.activeplatform.com/api/reseller/v1/charges/77530?api_token=Y5fwetest3gJXZH5uHCw
Response example
{
"id": 77530,
"subscription_id": 3006017,
"subscription_resource_id": null,
"subscription_resource_name": null,
"plan_resource_id": null,
"resource_id": null,
"quantity": 1,
"operate_from": "2020-07-27",
"operate_to": "2020-08-26",
"duration": 1,
"description": "Purchasing Plan (setup fee) #3006017 \"auto provisioning\"",
"unit_price": "10.0",
"amount": "91.23",
"status": "deleted",
"type": "Charge::Setup",
"order_id": 8464,
"close_date": "2020-07-31",
"original_amount": "11.4",
"original_amount_currency": "RUB",
"currency_rate": "8.0",
"currency_unit": 1,
"created_at": "2020-07-27T05:01:39.735707+0300",
"updated_at": "2020-07-27T06:11:27.832344+0300"
}