Get payment
The Get payment method returns payment details of the current reseller or any of its downstream resellers.
An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating manager's information.
The manager's API token specified in an API request determines the current reseller and downstream resellers accessible within a method.
GET {base_url}/api/v3/resellers/{reseller_id}/payments/{payment_id}
Arguments
Name | Parameter Type | Data type | Required/ Optional | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X-Api-Token | header | string | Required | API token of a manager that performs the operation (see Viewing and updating manager's information) | ||||||||||||
Content-Type | header | string | Required | Media type of the request. Specify the following: application/vnd.api+json | ||||||||||||
Accept | header | string | Required | Supported media types of the answer. Specify the following: application/vnd.api+json | ||||||||||||
base_url | path | string | Required | ActivePlatform URL | ||||||||||||
reseller_id | path | integer | Required | ID of the current reseller or any of its downstream resellers (see Viewing and updating reseller general information) | ||||||||||||
payment_id | path | integer | Required | Payment ID | ||||||||||||
include | query | string | Optional | Returns additional information about objects related to the payment. The parameter can be a comma-separated list if information about several objects is required. The following objects and possible values are supported:
|
Response model
Name | Data type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | object | Response data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Payment ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Data type | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes | object | Information about the payment | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_at | string | Date and time when the payment was created | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
updated_at | string | Date and time when the payment was updated | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account_id | number | Account ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount_amount | string | Discount amount | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | string | Total amount of the payment | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
comment | string | Comment on the payment | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string | Payment status (for the list of statuses, see Payment types) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
document_id | string | Payment number | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiration_date | string | Expiration date of the payment for a postpaid Subscription. Returns null if absent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payment_method_id | number | ID of the payment method that was used for completing the payment (see Viewing the list of payment methods). Returns null if absent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requester_ip | string | IP address of the payer. Returns null if absent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
manager_id | number | ID of the manager responsible for processing the payment. Returns null if absent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
purpose | string | The purpose of the top-up payment displayed in the receipt (see Creating a payment manually) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payment_method_name | string | Name of the payment method that was used for completing the payment. Returns null if absent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
closed_at | string | Date and time when the payment was completed | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
relationships | object | Related objects | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
orders | object | The list of orders to pay | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invoices | object | The list of invoices | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | array | Related object information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reseller | object | Information about the reseller | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | object | Information about the account | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payment_method | object | Information about the payment method that was used for completing the payment | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Related object information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included | array | Additional information about objects listed in the request:
|
Request example
GET /api/v3/resellers/1/payments/6465?include=invoices,orders,account,payment_method
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "6465",
"type": "payments",
"attributes": {
"created_at": "2019-10-21T07:02:54.651997+0300",
"updated_at": "2019-10-21T07:03:00.230411+0300",
"account_id": 502,
"discount_amount": "0.0",
"total": "360.0",
"comment": "Payment for order 8128",
"status": "completed",
"document_id": "2005248",
"expiration_date": null,
"payment_method_id": 2,
"requester_ip": "10.0.0.203",
"manager_id": null,
"purpose": "",
"payment_method_name": "Cash",
"closed_at": "2019-10-21T07:03:00.230411+0300"
},
"relationships": {
"orders": {
"data": [
{
"id": "8128",
"type": "change_orders"
}
]
},
"invoices": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "502",
"type": "accounts"
}
},
"payment_method": {
"data": {
"id": "2",
"type": "payment_methods"
}
}
}
},
"included": [
{
"id": "8128",
"type": "change_orders",
"attributes": {
"created_at": "2019-10-21T07:02:54.273531+0300",
"updated_at": "2019-10-21T07:03:00.465342+0300",
"account_id": 502,
"total": "360.0",
"payment_id": 6465,
"status": "completed",
"type": "ChangeOrder",
"expiration_date": "2019-10-28",
"owner_id": 864,
"promo_code": null,
"document_id": "CO001022",
"requester_ip": "10.0.0.203",
"manager_id": 214,
"custom_price": false,
"net_cost": null,
"discount_amount": "0.0",
"payment_model": "prepay",
"closed_at": "2019-10-21T07:03:00.465342+0300"
}
},
{
"id": "502",
"type": "accounts",
"attributes": {
"created_at": "2019-08-22T15:11:47.339+03:00",
"updated_at": "2019-10-21T07:03:00.217+03:00",
"reseller_id": 1,
"name": "Vit Ada",
"account_class_id": 1601,
"primary_name": "DepV0304-4",
"first_name": "Vit",
"middle_name": "",
"last_name": "Ada",
"country": "TW",
"region": "MSK",
"city": "Moscow",
"street": "Yamskaya",
"building": "",
"office": "",
"zip": "119002",
"phone": "+74950000001",
"email": "test@example.com",
"status": "active",
"balance": "1293.12",
"usable_balance": "770.45",
"current_debt": 99.26,
"subscription_credit_limit": 100.0,
"financial_blocking_threshold": 100.0,
"account_type_id": 1564,
"manager_id": null,
"owner_id": 864,
"tech_user_id": 864,
"bill_user_id": 864,
"custom_attributes": {},
"manager": null,
"default_payment_model": "postpay",
"account_type": {
"id": 1564,
"name": "FL",
"created_at": "2017-03-20T16:34:28.163+03:00",
"updated_at": "2017-03-20T16:34:28.163+03:00",
"reseller_id": 1,
"name_pattern": "%first_name %middle_name %last_name",
"primary_name": "",
"key": "personal",
"default_payment_method_id": null,
"ancestry": "1562",
"use_by_default": false
},
"account_class": {
"id": 1601,
"reseller_id": 1,
"name": "543535",
"created_at": "2018-07-23T17:41:37.677+03:00",
"updated_at": "2019-10-27T10:58:37.566+03:00",
"financial_blocking_threshold": "100.0",
"due_order_period": 7,
"subzero_period": -1,
"stop_subscription_type": "automatically",
"key": "3535535353",
"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": "postpay",
"default": false,
"due_payment_period": 6,
"subscription_credit_limit": "100.0"
}
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3005710",
"type": "subscriptions"
},
{
"id": "3005731",
"type": "subscriptions"
},
{
"id": "3005648",
"type": "subscriptions"
}
]
}
}
},
{
"id": "2",
"type": "payment_methods",
"attributes": {
"created_at": "2016-08-25T09:26:12.947229+0300",
"updated_at": "2017-10-03T11:20:32.446864+0300",
"name": "Cash",
"description": "",
"enabled": true,
"plugin_id": "check_cash"
}
}
]
}