The Get list of payments method returns the list of payments of the current reseller or any of its downstream resellers.
GET {base_url}/api/v3/resellers/{reseller_id}/payments
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
) |
||||||||||||||||
|
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
) |
||||||||||||||||
|
page[size] |
query |
integer |
Optional |
Page navigation: number of elements per page. The default value is 50 |
||||||||||||||||
|
page[number] |
query |
integer |
Optional |
Page navigation: page number |
||||||||||||||||
|
sort |
query |
integer |
Optional |
Sorting payments by the specified parameter:
The |
||||||||||||||||
|
filter[created_at] |
query |
string |
Optional |
Filtering payments by the date and time when the payment was created in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:
|
||||||||||||||||
|
filter[updated_at] |
query |
string |
Optional |
Filtering payments by the date and time when the payment was updated in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:
|
||||||||||||||||
|
filter[closed_at] |
query |
string |
Optional |
Filtering payments by the date and time when the payment was completed in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:
|
||||||||||||||||
|
filter[account_id] |
query |
string |
Optional |
Filtering payments by the account ID |
||||||||||||||||
|
filter[payment_method_id] |
query |
string |
Optional |
Filtering payments by the ID of the payment method that was used for completing the payment (see ) |
||||||||||||||||
|
filter[document_id] |
query |
string |
Optional |
Filtering payments by the payment number |
||||||||||||||||
|
filters[status] |
query |
string |
Optional |
Filtering payments by the payment status (for the list of statuses, see ) |
||||||||||||||||
|
include |
query |
string |
Optional |
Returns additional information about objects related to payments. 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 |
array |
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 |
integer |
Account ID |
|||||||||||||||||
|
|
|
discount_amount |
string |
Discount amount |
|||||||||||||||||
|
|
|
total |
string |
Amount to be paid |
|||||||||||||||||
|
|
|
amount_paid_from_balance |
string |
Amount paid from the balance |
|||||||||||||||||
|
|
|
initial_total |
string |
Original payment amount |
|||||||||||||||||
|
|
|
currency_code |
string |
Payment currency code |
|||||||||||||||||
|
|
|
comment |
string |
Comment on the payment |
|||||||||||||||||
|
|
|
status |
string |
Payment status (for the list of statuses, see
) |
|||||||||||||||||
|
|
|
document_id |
string |
Payment number |
|||||||||||||||||
|
|
|
expiration_date |
string |
Expiration date of the payment for a postpaid subscription. Returns null if absent |
|||||||||||||||||
|
|
|
payment_method_id |
integer |
ID of the payment method that was used for completing the payment (see
). Returns null if absent |
|||||||||||||||||
|
|
|
requester_ip |
string |
IP address of the payer. Returns null if absent |
|||||||||||||||||
|
|
|
manager_id |
integer |
The ID of the current personal manager of the account. Returns null if absent |
|||||||||||||||||
|
|
|
purpose |
string |
The purpose of the top-up payment displayed in the receipt (see
) |
|||||||||||||||||
|
|
|
external_total |
string |
The third-party invoice amount. Only for a payment linked to a postpaid invoice with external management (see Approve invoice). Returns null if absent |
|||||||||||||||||
|
|
|
external_currency |
string |
The ISO code of the third-party invoice currency. Only for a payment linked to a postpaid invoice with external management (see Approve invoice). Returns null if absent |
|||||||||||||||||
|
|
|
due_date |
string |
The latest date for completing the payment for a postpaid subscription (YYYY-MM-DD). Calculated as |
|||||||||||||||||
|
|
|
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:
|
||||||||||||||||
|
|
|
charges |
object |
The list of charges |
|||||||||||||||||
|
|
|
|
data |
array |
Related object information:
|
||||||||||||||||
|
|
|
corrections |
object |
The list of corrections (see Complete payment by document ID) |
|||||||||||||||||
|
|
|
|
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:
|
|||||||||||||||||||
|
links |
object |
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 |
||||||||||||||||||
Request example
GET /api/v3/resellers/1/payments?page[size]=2&page[number]=7&filter[created_at][gt]=2022-03-22&include=invoices,orders,account,payment_method,reseller,charges
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "9714",
"type": "payments",
"attributes": {
"created_at": "2022-03-22T16:37:21.321874+0300",
"updated_at": "2022-03-22T16:37:30.163316+0300",
"account_id": 1349,
"discount_amount": "0.0",
"total": "715.76",
"amount_paid_from_balance": null,
"initial_total": "715.76",
"currency_code": "USD",
"comment": "Payment for order 14759",
"status": "completed",
"document_id": "2007136",
"expiration_date": null,
"payment_method_id": 3,
"requester_ip": "10.20.30.40",
"manager_id": null,
"purpose": "",
"external_total": null,
"external_currency": null,
"due_date": null,
"payment_method_name": "Bank Transfer",
"closed_at": "2022-03-22T16:37:30.163316+0300"
},
"relationships": {
"orders": {
"data": [
{
"id": "14759",
"type": "prolong_orders"
}
]
},
"invoices": {
"data": []
},
"charges": {
"data": [
{
"id": "94591",
"type": "charges"
}
]
},
"corrections": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "1349",
"type": "accounts"
}
},
"payment_method": {
"data": {
"id": "3",
"type": "payment_methods"
}
}
}
},
{
"id": "9715",
"type": "payments",
"attributes": {
"created_at": "2022-03-22T16:51:34.290462+0300",
"updated_at": "2022-03-22T16:53:35.452802+0300",
"account_id": 1349,
"discount_amount": "0.0",
"total": "511.26",
"amount_paid_from_balance": null,
"initial_total": "511.26",
"currency_code": "USD",
"comment": "Payment for order 14760",
"status": "completed",
"document_id": "2007137",
"expiration_date": null,
"payment_method_id": 3,
"requester_ip": "10.20.30.40",
"manager_id": null,
"purpose": "",
"external_total": null,
"external_currency": null,
"due_date": null,
"payment_method_name": "Bank Transfer",
"closed_at": "2022-03-22T16:53:35.452802+0300"
},
"relationships": {
"orders": {
"data": [
{
"id": "14760",
"type": "renewal_orders"
}
]
},
"invoices": {
"data": []
},
"charges": {
"data": [
{
"id": "94592",
"type": "charges"
},
{
"id": "94593",
"type": "charges"
}
]
},
"corrections": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "1349",
"type": "accounts"
}
},
"payment_method": {
"data": {
"id": "3",
"type": "payment_methods"
}
}
}
}
],
"included": [
{
"id": "14759",
"type": "prolong_orders",
"attributes": {
...
}
},
{
"id": "94591",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "1",
"type": "resellers",
"attributes": {
...
}
},
{
"id": "1349",
"type": "accounts",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "3",
"type": "payment_methods",
"attributes": {
...
}
},
{
"id": "14760",
"type": "renewal_orders",
"attributes": {
...
}
},
{
"id": "94592",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "94593",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
}
],
"links": {
"self": "https://test.activeplatform.com/api/v3/resellers/1/payments?filter%5Bcreated_at%5D%5Bgt%5D=2022-03-22&include=invoices%2Corders%2Caccount%2Cpayment_method%2Creseller%2Ccharges&page%5Bnumber%5D=7&page%5Bsize%5D=2",
"first": "https://test.activeplatform.com/api/v3/resellers/1/payments?filter%5Bcreated_at%5D%5Bgt%5D=2022-03-22&include=invoices%2Corders%2Caccount%2Cpayment_method%2Creseller%2Ccharges&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"prev": "https://test.activeplatform.com/api/v3/resellers/1/payments?filter%5Bcreated_at%5D%5Bgt%5D=2022-03-22&include=invoices%2Corders%2Caccount%2Cpayment_method%2Creseller%2Ccharges&page%5Bnumber%5D=6&page%5Bsize%5D=2",
"next": "https://test.activeplatform.com/api/v3/resellers/1/payments?filter%5Bcreated_at%5D%5Bgt%5D=2022-03-22&include=invoices%2Corders%2Caccount%2Cpayment_method%2Creseller%2Ccharges&page%5Bnumber%5D=8&page%5Bsize%5D=2",
"last": "https://test.activeplatform.com/api/v3/resellers/1/payments?filter%5Bcreated_at%5D%5Bgt%5D=2022-03-22&include=invoices%2Corders%2Caccount%2Cpayment_method%2Creseller%2Ccharges&page%5Bnumber%5D=153&page%5Bsize%5D=2"
}
}