Инструменты страницы



Request for recurrent payments (recurrentPayment.do)

The request used for registering an order is recurrentPayment.do

In this document, the following data type conventions are used when describing request and response parameters:

  • A<n> – a sequence of Latin letters of length <n>;
  • A..<n> – a sequence of Latin letters with a length not exceeding <n>;
  • N<n> – a sequence of digits of length <n>;
  • N..<n> – a sequence of digits with a length not exceeding <n>;
  • AN<n> – a sequence of Latin letters and numbers of fixed length <n>;
  • AN.. <n> – a sequence of Latin letters and numbers with a length not exceeding <n>;
  • ANS<n> – a sequence of Latin letters, numbers and characters of fixed length <n>
  • ANS.. <n> – a sequence of Latin letters, numbers and characters with a length not exceeding <n>;
  • UTC – date and time, in this case: the date must be passed without specifying the time zone, Moscow time, for the SOAP protocol, the standard encoding xs: dateTime is used.

Request parameters

The request parameters are given in table below.

Name Type Mandatory Description

userName

AN..30

Yes

Login of the service account of the merchant.

password

AN..30

Yes

Merchant's service account password.

orderNumber

ANS..32

Yes

Order number in the store system.

language

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.

bindingId

AN..255

Yes

Identifier of the binding created earlier.

amount

N..12

Yes

Payment amount in minimum currency units.

currency

N3

No

ISO 4217 code of the payment currency. If not specified, default value is used.

description

ANS..512

No

Description of the order in free form.

To enable sending this field to the processing system, contact the technical support service.

additionalParameters

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

  • sbrf_spasibo:amount_bonus
  • sbrf_sbermiles:amount_bonus
  • loyaltyId

billingPayerData

See description

No

Customer's registration data (street address, postal code). Required for AVS/AVV checks.

Mandatory if «AVS/AVV use allowed» permission is enabled for merchant

billingPayerData



billingPayerData block parameters

Name Type Mandatory Description

billingCity

AN..50

No

City registered for the card at the Issuer Bank.

billingCountry

AN..50

No

billingAddressLine1

AN..50

No

Address registered for the card at the Issuer Bank.

Line 1.

Mandatory if «AVS/AVV use allowed» permission is enabled for merchant.

billingAddressLine2

AN..50

No

Address registered for the card at the Issuer Bank.

Line 2.

billingAddressLine3

AN..50

No

Address registered for the card at the Issuer Bank.

Line 3.

billingPostalCode

AN..50

No

Postal code registered for the card at the Issuer Bank.

Mandatory if «AVS/AVV use allowed» permission is enabled for merchant.

billingState

AN..50

No

State registered for the card at the Issuer Bank (ISO 3166-2).

Response parameters

The response parameters are given in table below.

Name Type Mandatory Description

success

A..5

Yes

Designates a successful request. The following values are available:

  • true – request is processed successfully;
  • false – request failed.
data block (returned only if the request was successful)

orderId

ANS36

Yes

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.

error block (returned only if the request resulted in an error)

code

N3

Yes

Error code.

description ANS..512 Yes A detailed technical explanation of the error – the contents of this parameter is not to be displayed to the customer.

message

AN..512

Yes

Comprehensive error description – it is intended for displaying to the user.

Error codes

Error code Error text
0

The request has been processed without system errors.

1

The funds on the card are not sufficient.

1

Wrong order number.

2

The binding is not found.

4
5

Using binding is disabled.

5

Invalid amount [amount].

5

Incorrect login.

5 Incorrect password
5 Authentication error
7

System error.

10

An order with this number has already been registered.

10 Incorrect value of [currency]
10 Incorrect value of [language]
10 Duplicate order number
10 Incorrect value of [orderNumber]
10 Incorrect value of [orderDescription]. Links in the order description are not allowed

Examples

POST request example

{
  "userName": "userName",
  "password": "password",
  "orderNumber": "UAF-203974-DE-12",
  "language": "RU",
  "bindingId": "binding_id",
  "amount": 12300,
  "currency": "810",
  "description" : "Test description",
  "additionalParameters": {
    "firstParamName": "firstParamValue",
    "secondParamName": "secondParamValue"
  }
 }

Example of successful payment

{
    "success": true,
    "data": {
        "orderId": "f7beebe4-7c9a-43cf-8e26-67ab741f9b9e"
    },
    "orderStatus": {
        "errorCode": "0",
        "orderNumber": "UAF-203974-DE-12",
        "orderStatus": 2,
        "actionCode": 0,
        "actionCodeDescription": "",
        "amount": 12300,
        "currency": "810",
        "date": 1491333938243,
        "orderDescription": "Test description",
        "merchantOrderParams": [
            {
                "name": "firstParamName",
                "value": "firstParamValue"
            },
            {
                "name": "secondParamName",
                "value": "secondParamValue"
            }
        ],
        "attributes": [],
        "cardAuthInfo": {
            "expiration": "201912",
            "cardholderName": "sdf sdf",
            "approvalCode": "123456",
            "paymentSystem": "VISA",
            "pan": "411111**1111"
        },
        "authDateTime": 1491333939454,
        "terminalId": "11111",
        "authRefNum": "111111111111",
        "paymentAmountInfo": {
            "paymentState": "DEPOSITED",
            "approvedAmount": 12300,
            "depositedAmount": 12300,
            "refundedAmount": 0
        },
        "bankInfo": {
            "bankCountryName": "<UNKNOWN>"
        },
        "chargeback": false,
        "operations": [
            {
                "amount": 12300,
                "cardHolder": "sdf sdf",
                "authCode": "123456"
            }
        ]
    }
}

Example of unsuccessful payment

{
  "error": {
    "code": "10",
    "description": "An order with this number has already been registered",
    "message": "An order with this number has already been registered."
  },
  "success": false
}