Инструменты страницы
Request for order registration with pre-authorization (registerOrderPreAuth)
The request used for registering an order with pre-authorization is registerPreAuth
.
Use the following URL to connect to the Test Service (WSDL):
https://3dsec.sberbank.ru/payment/webservices/merchant-ws?wsdl.
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 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ANS..32 | See description |
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 any format. Only the first 24 characters of this field are transferred to Sberbank's processing for inclusion in the merchant's financial statements. To enable sending this field to the processing system, contact the technical support service. |
|||||||||
|
N..12 | Yes |
Payment amount in minimum currency units. |
|||||||||
|
N3 | No |
ISO 4217 code of the payment currency. If not specified, default value is used. |
|||||||||
|
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. |
|||||||||
|
ANS..20 | No |
The value of this parameter defines what kind of pages of the payment interface will be loaded for the Customer. The available values are:
Where:
If the parameter is missing or its value is in incorrect format, the default value is pageView=DESKTOP. |
|||||||||
|
N..9 | No |
Order lifetime in seconds. If the parameter is not specified, the value specified in the Merchant settings or the default value (1200 seconds = 20 minutes) will be used. If the request contains the expirationDate parameter, then the value of sessionTimeoutSecs parameter is disregarded. |
|||||||||
|
AN..255 | No |
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: |
|||||||||
|
ANS | No |
The date and time of the order lifetime expiration. Format: yyyy-MM-ddTHH:mm:ss.
If this parameter is not passed in the request, |
|||||||||
|
ANS..512 | Yes |
The URL to which the user is to be redirected in case of a successful payment (and also in case of a failed payment where the |
|||||||||
|
ANS..512 | No |
The address to which the user is to be redirected in case of a failed payment. The address must be specified in full including the protocol used (for example, https://test.ru instead of test.ru). Otherwise, the user will be redirected to the address of the following type: http://<payment_gateway_address>/<merchant_address>.
The parameter is optional. In this case, an unsuccessful payment will lead to a redirect to |
|||||||||
|
ANS..512 | No |
This parameter enables dynamic callback functionality. In it, you can pass the address to which all «payment» callback notifications activated for the merchant will be sent. Payment-related notifications are callback notifications about the following events: successful hold, payment rejected by timeout, cardpresent payment rejected, successful debiting, refund, reversal. Notably, payment-unrelated callbacks that are active for the Merchant (enabling/disabling a binding, binding creation) will be sent to static callback URL. |
|||||||||
|
See column with the description. | No |
Additional tag with the attributes for passing additional parameters.
The fields for additional information and its subsequent storage. These fields can be submitted for processing by the bank for further display in the registers. By default, the order number
Enabling the functionality is possible upon agreement with the Bank during the integration period. To pass N parameters, a request must contain N
In the app2app and back2app payment scenario, as well as in the initial payment of recurring payments, the following parameters are also passed. It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):
|
|||||||||
|
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. |
|||||||||
|
ANS..255 | No |
To register an order on behalf of a child Merchant, specify the Merchant login in this parameter. |
|||||||||
|
AN..255 | No |
Container for the
Below is an example of how to use this parameter.
<features> <feature>AUTO_PAYMENT</feature> </features> |
|||||||||
|
ANS..19 | No |
Date and time of the two-phase payment autocompletion in the following format.
To enable this functionality, please contact technical support. |
|||||||||
|
ANS..40 | No |
Customer's email address. |
|||||||||
|
NS..12 | No |
Customer's phone number. It can be of the following format:
If the number is passed in a separate parameter and in additional parameters, the number specified in this |
|||||||||
|
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 |
By default, the following fields are passed to the Bank processing system:
orderNumber
– order number in the store system;description
– order description (no more than 24 characters; %, +, carriage return \r, and line feed \n cannot be used).
billingPayerData block parameters
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..50 | No |
City registered for the card at the Issuer Bank. |
|
AN..50 | No |
|
|
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. |
|
AN..50 | No |
Address registered for the card at the Issuer Bank. Line 2. |
|
AN..50 | No |
Address registered for the card at the Issuer Bank. Line 3. |
|
AN..50 | No |
Postal code registered for the card at the Issuer Bank. Mandatory if «AVS/AVV use allowed» permission is enabled for merchant. |
|
AN..50 | No |
State registered for the card at the Issuer Bank (ISO 3166-2). |
Parameters for app2app payment scenario
Name | Type | Required | Description |
---|---|---|---|
|
Boolean | No |
Attribute indicating the payment method through the SBOL application (app2app). The following values are available:
To use this parameter, the merchant must have the corresponding permission enabled. |
|
ANS..32 | See description |
OS type. The possible values are:
Required only if |
|
ANS..255 | See description |
Link to the merchant's application for a return with successful payment.
Required only if |
Parameters for the back2app payment scenario
Name | Type | Mandatory | Description |
---|---|---|---|
|
boolean | No |
Attribute indicating a payment method for |
Recurring payment parameters
In the initial payment of recurring payments, the parameters specified below are passed.
recurringFrequency
– the period of recurrent payments in days (an integer from 1 to 28).recurringExpiry
– the expiration date for recurrent payments (in the format YYYYMMDD).
If the request contains only one parameter or at least one parameter does not match the format, the request will fail.
Response parameters
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS36 | No |
Identifier of the order in the payment system. It is unique within the system. The identifier is missing if the order registration failed due to an error detailed in errorCode. |
|
AN..512 | No |
Payment form URL to redirect the client's browser to. This parameter is not returned if the registration of the order was not successful due to the error described in To be able to accept payment in this way, you must have the respective rights in the system. If in doubt, contact technical support. |
|
N3 | No |
Error code. |
|
|
No |
|
|
See description | No |
A block of key–value pairs, which is returned along with payment using the app2app and back2app schemes. The following parameters can be used (see table below). Below is an example of a response with an externalParams block.
<ns1:registerOrderResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant"> <return orderId="79cdbadf-4ec9-78e0-8c22-62f700a20c60" errorCode="0" errorMessage="Success"> <formUrl>https://host/payment/merchants/rbs/payment_ru.html?mdOrder=79cdbadf-4ec9-78e0-8c22-62f700a20c60</formUrl> <externalParams> <entry> <key>sbolBankInvoiceId</key> <value>79cdbadf-4ec9-78e0-8c22-62f700a2</value> </entry> <entry> <key>sbolDeepLink</key> <value>https://test.ru</value> </entry> </externalParams> </return> </ns1:registerOrderResponse> |
externalParams parameters in app2app payment scenario
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..1024 | No |
Link to the Bank's application to complete the payment. |
|
ANS..1024 | No |
Unique order identifier generated by the Bank. |
|
Boolean | No |
Attribute informing about the ongoing routine maintenance.
Value
Value
The parameter can appear if the merchant has the corresponding permission enabled, and |
externalParams parameters for back2app payment scenario
Name | Type | Mandatory | Description |
---|---|---|---|
|
Boolean | No |
Attribute informing about ongoing routine maintenance
Value
Value |
|
ANS..1024 | No |
Unique order identifier generated by the Bank. |
Error codes
Error code | Error text |
---|---|
0 |
The request has been processed without system errors. |
1 |
Wrong order number. |
1 |
An order with this number has already been processed. |
3 |
Unknown currency. |
4 |
The amount is missing. |
4 |
Order number is empty |
4 |
Empty return URL |
5 |
Payments using pre-authorization are forbidden. |
5 |
A parameter value has been specified incorrectly. |
5 |
Access denied. |
5 |
The user must change the password. |
7 |
System error. |
13 |
The merchant does not have the permission to process verification payments. |
14 |
Features are specified incorrectly. |
Examples
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:registerOrderPreAuth> <order merchantOrderNumber="asuaakdfadsfasdfasdd5" description=" " amount="10000" currency=" " language="ru" pageView="DESKTOP" sessionTimeoutSecs=" " bindingId=" " expirationDate="2014-09-08T14:14:14"> <returnUrl>https://server/applicaton_context/finish.html</returnUrl> <params name="param1" value="paramValue1"/> <params name="param2" value="paramValue2"/> <clientId>7777</clientId> <merchantLogin> </merchantLogin> <features> <feature>AUTO_PAYMENT</feature> </features> </order> </mer:registerOrderPreAuth> </soapenv:Body> </soapenv:Envelope>
Пример ответа
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:registerOrderPreAuthResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant"> <return orderId="5e5dc6bd-dee3-4c96-849a-09f3f575f4b6" errorCode="0" errorMessage="Success"> <formUrl> https://server/merchants/rbs/payment_ru.html?mdOrder=5e5dc6bd-dee3-4c96-849a-09f3f575f4b6 </formUrl> </return> </ns1:registerOrderPreAuthResponse> </soap:Body> </soap:Envelope>