The request used for payment via Samsung Pay is samsungPay
.
Use the following URL to connect to the Test Service (WSDL):
https://3dsec.sberbank.ru/payment/webservices/merchant-ws?wsdl.
Use the standard requests to the payment gateway for the operations of reversal, refund and payment completion.
In this document, the following data type conventions are used when describing request and response 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 |
The number (identifier) of the order in the store system is unique for each store within the system – up to 30 characters. If the order number is generated on the Payment Gateway side, this parameter is not mandatory. |
|||||||||
|
String | Yes |
The contents of the |
|||||||||
|
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. |
|||||||||
|
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. |
|||||||||
|
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. For each additional parameter, use the
Below is an example of how to use this parameter.
<entry> <key>parameter_1</key> <value>value_1</value> </entry> <entry> <key>parameter_2</key> <value>value_2</value> </entry> 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. |
|||||||||
|
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. |
|||||||||
|
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 |
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). |
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
A..5 | Yes |
Designates a successful request. The following values are available:
|
data block (returned only if the request was successful) |
|||
|
ANS36 | Yes |
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. |
error block (returned only if the request resulted in an error) |
|||
|
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. |
|
|
Yes |
|
Error code | Error text |
---|---|
0 |
The request has been processed without system errors. |
1 |
The funds on the card are not sufficient. |
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 |
Invalid parameter value |
10 |
Encryption of the data passed in unsuccessful. |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://engine.paymentgate.ru/webservices/merchant"> <soapenv:Header/> <soapenv:Body> <mer:samsungPay> <arg0> <merchant>OurBestMerchantLogin</merchant> <orderNumber>UAF-203974-DE</orderNumber> <description>Test description</description> <paymentToken>ew0KICB7DQoJICAidmVyc2lvbiI6ICJSU0FfdjEiLA0KCSAgInNpZ25hdHVyZSI6ICJabUZyWlNCemFXZHVZWFIxY21VPSIsDQoJICAiaGVhZGVyIjogew0KCQkiZXBoZW1lcmFsUHVibGljS2V5IjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRW14Q2hDcGpLemY5YVh6MjZXVDZaVE4yekUzaUdYUWpjWlJZWUFkUUlURFgyUmtBTmJ0N2s5cmFoRjFoempqbWVWVHhjZ0NvZkg4MXprMkdOVFozZHRnPT0iICAgICAgIA0KCQkid3JhcHBlZEtleSI6ICJYejI2V1Q2WlROMnpFM2lHWFFqYz0iDQoJCSJwdWJsaWNLZXlIYXNoIjogIk9yV2dqUkdrcUVXamRrUmRVclhmaUxHRDBoZS96cEV1NTEyRkpXckdZRm89IiwNCgkJInRyYW5zYWN0aW9uSWQiOiAiYXBwbGUtMTIzNDU2Nzg5MEFCQ0RFRiINCgkgIH0sDQoJICAiZGF0YSI6ICIxZFhFMTNrdnpUVlA2bldFTjhEMnBoclBsZlFjR3I4VzN5ajJTSFlZai9QeWNIV1RqbnBWN3ovRXI3OGJyaT09Ig0KICB9DQp9</paymentToken> <language>RU</language> <additionalParameters> <entry> <key>firstParamName</key> <value>firstParamValue</value> </entry> </additionalParameters> <preAuth>true</preAuth> <ip>127.0.0.1</ip> </arg0> </mer:samsungPay> </soapenv:Body> </soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:samsungPayResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant"> <return> <success>true</success> <data> <orderId>12312312123</orderId> </data> <orderStatus errorCode="0"/> </return> </ns1:samsungPayResponse> </soap:Body> </soap:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:samsungPayResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant"> <return> <success>false</success> <error> <code>1</code> <description>The funds on the card are not sufficient</description> </error> <orderStatus errorCode="0"/> </return> </ns1:samsungPayResponse> </soap:Body> </soap:Envelope>