Get a List of Payments
The method returns a List of Payments.
GET /api/vendor/v1/payments.json?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/ | Description |
---|---|---|---|---|
api_token | query | string | Required | API token of the manager who perform the operation (see API Token Authentication) |
page | query | integer | Optional | Returning a list of Payments by current page number |
per_page | query | integer | Optional | Setting a number of items in the page |
sorting[field] | query | string | Optional | Sorting the list by the specified field |
sorting[reversed] | query | string | Optional | Set the reversed sorting mode by the specified field:
|
filters[created_at] | query | date | Optional | Filtering the list by a creation date |
filters[updated_at] | query | date | Optional | Filtering the list by an update date |
filters[account_id] | query | integer | Optional | Filtering the list by an Account ID |
filters[payment_method_id] | query | integer | Optional | Filtering the list by a Payment method ID |
filters[status] | query | string | Optional | Filtering the list by a status |
Response model
Name | Data type | Description |
---|---|---|
id | integer | A Payment ID |
document_id | string | A Payment document number. The mask of a Payment number is set in the platform settings in the "Document ID format" group (see System settings in the ActivePlatform. Operator Control Panel) |
status | One of the following statuses of the Payment:
| |
account_id | integer | An Account ID linked to the Payment |
created_at | date | A date and time of the Payment's creation |
updated_at | date | A date and time of the Payment's changes last time |
total | float | An amount of the Payment |
comment | string | Additional information about the Payment |
requester IP | string | An IP address of the user who makes the Payment |
manager_id | integer | A manager ID who is responsible for the handling of the Payment |
payment_method_id | integer | A Payment method ID |
payment_method_name | string | A Payment method name |
orders | array | A list of orders which are linked with the Payment (see Get a List of Orders). |
Request example
GET http://billing.activeplatform.com:80/api/vendor/v1/payments.json?api_token=654321
Response example
{
"id": 2000466,
"document_id": "P000005",
"status": "completed",
"account_id": 2000039,
"created_at": "2014-12-03T11:56:49.898+03:00",
"updated_at": "2014-12-03T11:57:09.629+03:00",
"total": "24.0",
"comment": "The payment for order 2000231",
"requester_ip": null,
"manager_id": null,
"payment_method_id": 1,
"payment_method_name": "Check",
"orders": [
{
"id": 2000231,
"document_id": "RN000001",
"status": "provisioning",
"account_id": 2000039,
"type": "RenewalOrder",
"created_at": "2014-12-03T11:56:49.313+03:00",
"updated_at": "2014-12-03T11:57:09.471+03:00",
"expiration_date": "2014-12-17",
"total": "24.0",
"promo_code": "",
"payment_id": 2000466,
"items": [
{
"id": 4217,
"target_id": 2000177,
"target_type": "Subscription",
"type": "ProvisioningItem::Renew",
"status": "provisioning",
"description": "Fanta"
}
],
"charges": [
{
"id": 22521,
"subscription_id": 2000177,
"subscription_resource_id": null,
"subscription_resource_name": null,
"plan_resource_id": null,
"resource_id": null,
"quantity": 1,
"operate_from": "2014-12-03",
"operate_to": "2014-12-03",
"duration": 3,
"description": "Renewal subscription (recurring fee) #2000177 Fanta",
"unit_price": "5.0",
"amount": "15.0",
"status": "closed",
"type": "Charge::Recurring",
"order_id": 2000231,
"close_date": null,
"created_at": "2014-12-03T11:56:49.774220+0300",
"updated_at": "2016-03-28T09:47:19.628221+0300"
},
{
"id": 22520,
"subscription_id": 2000177,
"subscription_resource_id": null,
"subscription_resource_name": null,
"plan_resource_id": null,
"resource_id": null,
"quantity": 1,
"operate_from": "2014-12-03",
"operate_to": "2014-12-03",
"duration": null,
"description": "translation missing: ru.descriptions.charge.renewal_order.charge/renewal_subscription",
"unit_price": "9.0",
"amount": "9.0",
"status": "closed",
"type": "Charge::Renewal",
"order_id": 2000231,
"close_date": null,
"created_at": "2014-12-03T11:56:49.457668+0300",
"updated_at": "2016-03-28T09:47:15.179083+0300"
}
]
}
]
}