Инструменты страницы
Start of payment
In this document, the following data type conventions are used when describing request and response parameters:
- string – string;
- array – data array;
- object – data object;
- data – date;
- boolean – boolean (logical) data type;
- int. (integer) – integer data type;
- amount – a numeric data type (amount).
Request parameters:
Parameter | Type | Description | Example |
---|---|---|---|
| string |
A unique transaction number on the partner's side is required to maintain idempotence of transactions. | 7654321DS |
| object |
The object of the payment source, only «card» or «binding» can be specified for passing. |
|
| object |
Data object with information about the source card. |
|
| string |
Payment card number. | 5647637465647384 |
| date |
The validity of the card. | 2018-07 |
| string |
Cardholder's name in Latin characters, if available. | IVAN PETROV |
| boolean |
Indication to save the card data for the future use. | true |
| string |
Identifier. | 87414E0F13AB4542AA9D10E81F74A6E3 |
| amount | Data object about the amount of payment. | |
| amount |
Payment amount in minor currency units (61.00 rubles = 6100). | 6100 |
| amount |
The amount of the commission for payment in minor currency units (1.00 rubles = 100). | 100 |
| string |
Balance currency. | 643 |
| string |
Amount of «Spasibo» bonuses (in units of bonuses). | 59 |
| object |
Data object to specify the URL for the customer to return to. |
|
| string | URL address in case of successful completion of the operation. | https://success.domain.ru |
| string |
URL address in case of unsuccessful completion of the operation. | https://fail.domain.ru |
Request format:
POST /api/payment/start HTTP/1.1 Host: 3dsec.sberbank.ru/sbersafe Authorization: <accessToken> Content-Type: application/json Accept: application/json; version=1.0 Content-Length: <content-lenght> { "transactionNumber":"<transactionNumber>", "source":{ "card":{ "pan":"<pan>", "expiryDate":"<expiryDate>", "cardholderName":"<cardholderName>", "cvc":"<cvc>", "saveCard":<true|false> }, "binding":"<binding>" }, "amount":{ "transactionAmount":<transactionAmount>, "transactionFee":<transactionFee>, "currency":"<currency>", "loyaltyPointsAmount":"<loyaltyPointsAmount>" } "returnUrl":{ "success":<success>, "fail":"<fail>" } }
Response parameters:
Parameter | Type | Description | Example |
---|---|---|---|
| string |
Order number in the payment gateway. Unique within the payment gateway. | 906bf262-bd53-4ac7-983c-07127954681b |
| string |
A unique transaction number on the partner's side is required to maintain idempotence of transactions. | 7654321DS |
| string |
Result of a payment attempt. | Your payment has been processed, redirecting. |
| string |
URL address the customer to redirect to. | https://test.paymentgate.ru/acs/auth/start.do |
| string |
Parameter to pass to ACS for authentication. | eJxVUk1zgjAQ/SsM95KEr1pnjUOLnXqgYxUvvVHYAVQ+DFDUX99EUeshM/t2N2/3vQSmXCV5mU70dfj+N |
| string |
Request identifier. | gbhjnkme-rdcfgv-hbjnkm-7689ui-okp3ew |
| string |
Indication of the status of the request processing result | SUCCESS |
Response format:
HTTP/1.1 200 OK Content-Type: application/json Content-Length: <content-lenght> Cache-Control: no-store { "mdOrder":"<mdOrder>", "info":"<info>", "redirectUrl":"<redirectUrl>", "paReq":"<paReq>", "requestId":"<requestId>", "status": "<status>" }