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



Request for recurrent payments (recurrentPayment)

The request used for registering an order is recurrentPayment

Request parameters

The request parameters are given in table below.

Name Type Mandatory Description

orderNumber

ANS..32

Yes

Order number in the store system.

bindingId

AN..255

Yes

Identifier of the binding created earlier.

amount

N..12

Yes

Payment amount in minimum currency units.

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

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

Not applicable

Yes

It is returned only if the payment was successful and contains one nested parameter (see below).

orderId

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

Not applicable

Yes

This parameter is returned only if the payment failed. Listed below are the nested parameters.

code

Error code.

description

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

message

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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://engine.paymentgate.ru/webservices/merchant">
   <soapenv:Header/>
   <soapenv:Body>
      <mer:recurrentPayment>
         <arg0>
            <orderNumber>123123</orderNumber>
            <bindingId>binding_id</bindingId>
            <amount>123</amount>
            <description>description</description>
            <additionalParameters>
               <entry>
                  <key>firstParamName</key>
                  <value>firstParamName</value>
               </entry>
            </additionalParameters>
         </arg0>
      </mer:recurrentPayment>
   </soapenv:Body>
</soapenv:Envelope>

Example of successful payment

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns1:recurrentPaymentResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant">
         <return>
            <success>true</success>
            <data>
               <orderId>134561314642</orderId>
            </data>
            <orderStatus errorCode="0"/>
         </return>
      </ns1:recurrentPaymentResponse>
   </soap:Body>
</soap:Envelope>

Example of unsuccessful payment

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns1:recurrentPaymentResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant">
         <return>
            <success>false</success>
            <error>
               <code>10</code>
               <description>An order with this number has already been registered.</description>
            </error>
            <orderStatus errorCode="0"/>
         </return>
      </ns1:recurrentPaymentResponse>
   </soap:Body>
</soap:Envelope>