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.

(warning) 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_tokenquerystringRequiredAPI 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_idpathintegerRequiredCharge ID

Response model

Name

Data type

Description

id

integerCharge ID

subscription_id

integerSubscription ID

subscription_resource_id

integerResource ID in the Subscription

subscription_resource_name

stringResource name in the Subscription

plan_resource_id

integerResource ID in the Plan of the selected Reseller

resource_id

integerResource ID in the Application Template

quantity

integerAmount of ordered Resource or Service units

operate_from

dateStart date of the period for which the Charge has been paid

operate_to

dateEnd date of the period for which the Charge has been paid

duration

floatCharge period duration in months. For example, 1 day equals to 0.033, 2 years equal to 24

description

stringCharge description

unit_price

floatService or Resource unit price for the selected Reseller

amount

floatCharge total amount

status

stringCharge status (see Charges attributes for the list of statuses)

type

stringCharge internal type:
  • Charge::Setup — Charge for the Subscription setup fee.
  • Charge::Recurring — Charge for the Subscription recurring fee.
  • Charge::RecurringResource — Charge for the Subscription Resource recurring fee.
  • Charge::Renewal — Charge for the Subscription renewal fee.
  • Charge::RenewalResource — Charge for the Resource renewal.
  • Charge::ExternalResource — Charge for the external Resource usage.
  • Charge::SetupResource — Charge for the Subscription Resource setup fee.
  • Charge::Transfer — Charge for the domain transfer.

order_id

integerID of the corresponding Order

close_date

dateDate when Charge will be closed
original_amountstring

Charge total amount in the Plan currency

original_amount_currencystringCurrency code of the Plan
currency_ratestringExchange rate used for generating the Charge 
currency_unitintegerCurrency units used for generating the Charge 

created_at

dateCharge creation date

updated_at

dateCharge 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"
}