Create a Payment

The Create a Payment method is used to create a Payment.
POST /api/vendor/v1/payments.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

account_id

form

integer

Required

An account ID.

manager_id

form

integer

Optional

A manager ID who is responsible for managing the payment.

total

form

decimal

Required

An amount of the payment.

comment

form

string

Required

Additional information about the payment.

Response model

Name

Data type

Description

id

integer

An order ID.

account_id

integer

An account ID, which makes the payment.

totalfloatAn amount of the payment.
commentstringAdditional information about the payment.

created_at

date

A date and time of the payment's creation.

updated_at

date

A date and time of the changes last time.

statusstring

One of the following statuses of the payment:

  • waiting for payment – payment has been added, but not approved;
  • completed – payment has been successfully processed (added and approved);
  • receipt creating - a receipt is being created by the manager manually;
  • receipt sent - receipt has been manually created by the manager;
  • cancelled – an order has been cancelled.
payment_method_idintegerA payment method ID.
document_idstring

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).

requester IP

stringAn IP address of the user who makes the payment.

manager_id

integerA manager ID who is responsible for the handling of the payment.

denominated

 

An internal parameter which was used during the denomination process of the Belorussian ruble:

  • true - an amount of a payment in BYN;
  • false - an amount of a payment in BYR.
expiration_datedata

An expiration date of the payment, which is used for payments with "Post-pay" payment method. This parameter is not used in the current version of ActivePlatform.

Request example

POST http://billing.activeplatform.com:80/api/vendor/v1/payments.json?api_token=654321
{  
 "account_id": 2000532,
 "total": 100,
 "comment": "Cash"
}

Response example

{
  "id": 2007039,
  "account_id": 2000532,
  "total": "100.0",
  "comment": "Cash",
  "created_at": "2016-10-04T10:52:17.813+03:00",
  "updated_at": "2016-10-04T10:52:17.813+03:00",
  "status": "waiting_for_payment",
  "payment_method_id": null,
  "document_id": "P006131",
  "requester_ip": "178.159.242.50",
  "manager_id": null,
  "denominated": false,
  "expiration_date": null
}