Инструменты страницы
Request for payment using Android Pay (payment.do)
The request used for registering an order is «payment.do» (see below). |
|
Use the standard requests to the payment gateway for the operations of reversal, refund and payment completion.
Request parameters
The request parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..255 | Yes |
Merchant login in the payment gateway. |
|
ANS..32 | Yes |
Number (identifier) of the order in the store system. It is unique for every store within the Payment Gateway. If the order number is generated on the Payment Gateway side, this parameter is not mandatory. |
|
ANS..512 | No |
Description of the order in free form. To enable sending this field to the processing system, contact the technical support service. |
|
A2 | No |
Language in the ISO 639-1 encoding. If the language is not specified, the default language defined in the store settings is used. |
|
Not applicable | No |
Additional parameters of the order that are stored in the merchant personal account for the subsequent viewing. Each new pair of a parameter name and its value must be separated by a comma. Below is an example of how to use this parameter.
{ "firstParamName": "firstParamValue", "secondParamName": "secondParamValue" } If the merchant has fiscalization set up, when indicating email (the buyer's email address) and/or phone (the buyer's cell phone number) as additional parameters, these parameters are first used to send the fiscal receipt. It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):
|
|
A..5 | No |
Parameter that defines the necessity of a pre-authorization (putting the amount on hold on the customer's account until its debiting). The following values are available:
If the parameter is not specified in the request, a one-phase payment occurs. |
|
ANS..255 | No |
Identifier of the Customer in the Store system. This parameter is used for the binding functionality. May be present if the store is allowed to create bindings. Specifying this parameter when processing payments with the use of bindings is mandatory. Otherwise, a payment will be unsuccessful. |
|
String | Yes |
A token received from Android Pay and encoded in Base64. |
|
ANS..39 | No |
IP-address of the buyer. IPv6 is supported in all requests (up to 39 characters). |
|
N..12 | No |
Payment amount in minimum currency units (kopecks, cents, etc.). Must match the total amount for all line items in the shopping cart. Before summing up all line items, the product of quantity and price for each good item is rounded to an integer. If the value is followed by 5 or greater after the decimal point, it is rounded up. Below there are examples of rounding.
Therefore, the «amount» parameter value must be equal to the sum of the line items rounded. |
|
N3 | No |
Numeric ISO 4217 code of the payment currency. If this parameter is not specified, it is considered to be equal to the default currency code. |
Response parameters
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
A..5 | Yes |
Designates a successful request. The following values are available:
|
|
Not applicable | Yes |
It is returned only if the payment was successful and contains one nested parameter (see below).
Identifier of the order in the payment system. It is unique within the system. Missing if order registration failed due to an error detailed in ErrorCode. The following parameter is returned if bindings are used.
The identifier of the previously created binding. Can only be used if the merchant has permission to work with bindings. If this parameter is passed in the given request, it means that: The parameters below are required only if additional authentication is used on the ACS of the issuing bank.
On a successful response in case of payment using 3-D Secure. The URL to go to the access control server.
On a successful response in case of payment using 3-D Secure. Payment Authentication Request – payment authentication request.
In case of a successful response, in the case of a payment in which a check was made to ensure that the card belongs to 3-D Secure. The URL to return from the access control server. |
|
Not applicable | Yes |
This parameter is returned only if the payment failed. Listed below are the nested parameters.
Error code.
A detailed technical explanation of the error – the contents of this parameter is not to be displayed to the customer. |
Error codes
Error code | Error text |
---|---|
0 |
The request has been processed without system errors. |
5 |
Access denied. |
5 |
The user must change the password. |
7 |
System error. |
10 |
Invalid parameter value |
10 |
Invalid parameter value |
10 |
Invalid parameter value |
10 |
Invalid parameter value |
10 |
Encryption of the data passed in unsuccessful. |
POST request example
{ "merchant": "OurBestMerchantLogin", "orderNumber": "UAF-203974-DE", "language": "RU", "preAuth": true, "description" : "Test description", "additionalParameters": { "firstParamName": "firstParamValue", "secondParamName": "secondParamValue" }, "paymentToken": "eyJtZXJjaGFudCI6ICJrdXBpdmlwIiwib3JkZXJOdW1iZXIiOiAyMDUxOTIzMzkxLCJwYXltZW50VG9rZW4iOiAie1wiZXBoZW1lcmFsUHVibGljS2V5XCI6XCJrZXlcIixcImVuY3J5cHRlZE1lc3NhZ2VcIjpcIm1lc3NhZ2VcIixcInRhZ1wiOlwidGFnXCJ9In0=", "ip" : "127.0.0.1", "amount" : "230000", "currency" : "643" }
Response example
Successful payment
{ "success":true, "data": { "orderId": "12312312123" } }
Failed payment
{ "error": { "code": 1, "description": "Processing Error", "message": "The funds on the card are not sufficient" }, "success": false }