Инструменты страницы
Request for order extended status
The request used for getting the status of a registered order is «getOrderStatusExtended.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:
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..30 | Yes | Login issued to the Store upon integration with the Payment Gateway. |
|
AN..30 | Yes | Password issued to the Store upon integration with the Payment Gateway. |
|
AN..64 | 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. |
|
AN..32 | Yes* |
Order identifier in the Store system. |
|
A2 | Yes |
Language code in accordance with ISO 639-1. If this parameter is not specified, it is considered that the language is Russian. An error message will be returned in this language. |
* Either orderId
or orderNumber
must be present in the request. If both parameters are present in the request, orderId
has priority.
Several sets of response parameters exist. The exact sets of parameters to be returned depend on the version of getOrderStatusExtended specified in the merchant settings.
Response parameters for versions 01 and higher:
These parameters will be returned in the response regardless of the version getOrderStatusExtended
.
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
AN..32 | Yes |
Order identifier in the Store system. | All versions. |
|
N1 | No |
The order status in the payment system is defined by the value of this parameter. It is missing if the order has not been found. Below is a list of possible values:
| All versions. |
|
N3 | Yes | Response code. | All versions. |
|
AN..512 | Yes |
Description of the response code in the language that is passed in language parameter of the request. | All versions. |
|
N3 | No |
Error code. | All versions. |
|
|
No |
|
All versions. |
|
N..20 | Yes | The payment amount in kopecks (or cents). | All versions. |
|
N3 | No | ISO 4217 code of the payment currency. If the code is not specified, the default value is 810 (Russian rubles). | All versions. |
|
ANS | Yes |
Order registration date. | All versions. |
|
AN..512 | No |
Order description passed upon its registration. | All versions. |
|
ANS..39 | Yes |
IP-address of the buyer. IPv6 is supported in all requests (up to 39 characters). | All versions. |
|
ANS | No | The authorization date and time. | 02 and higher. |
|
AN..24 | No |
Registration number of the payment authorization that has been assigned to it on the payment registration. | 02 and higher. |
|
AN..10 | No |
Identifier of the terminal in processing through which the payment was made. | 02 and higher. |
|
AS..14 | Yes |
The way of order completion (a payment with entering card data, a payment using a binding, etc.). Possible values:
| 09 and higher. |
cardAuthInfo element (the element contains a structure consisting of a list of elements of type secureAuthInfo and attributes pan, expiration, cardholderName and approvalCode ): |
||||
|
N12…19 | No |
Masked number of the card that has been used for the payment. This parameter is to be specified only after the order has been paid. | All versions. |
|
N6 | No |
The expiration date of the card validity period, in the format YYYYMM. This parameter is to be specified only after the order has been paid | All versions. |
|
A..64 | No |
Cardholder's name in Latin characters, if available. | All versions. |
|
AN6 | No |
International payment system authorization code. This field has a fixed length (six characters) and can contain digits and Latin letters. | All versions. |
The secureAuthInfo element contains the eci element and the threeDSInfo element, the latter being an object with the cavv and xid parameters): |
||||
|
N..4 | No |
Electronic Commerce Indicator. | All versions. |
|
ANS..200 | No |
The value of the cardholder authentication check. Indicated only after payment of the order and in case of respective permission. | All versions. |
|
ANS..80 | No |
Electronic Commerce Indicator of the transaction. The indicator is specified only after an order has been paid and in case the corresponding permission is present. | All versions. |
BindingInfo element (consists of clientId and bindingId ): |
||||
|
AN..255 | No |
Identifier of the Customer in the Store system passed on the order registration. This parameter is present only if a Store has the permission to create bindings. | All versions. |
|
AN..255 | No |
Identifier of a binding created on an order payment or used to pay for an order. This parameter is present only if a Store has the permission to create bindings. . | All versions. |
paymentAmountInfo element (comprises approvedAmount , depositedAmount , refundedAmount and paymentState ): |
||||
|
N..12 | No |
The amount put on hold on the card (is used only for two-phase payments). | 03 and higher. |
|
N..12 | No |
The amount confirmed for debiting from the card. | 03 and higher. |
|
N..12 | No |
The refund amount. | 03 and higher. |
|
A..10 | No |
Payment status. | 03 and higher. |
bankInfo element (comprises bankName, bankCountryCode and bankCountryName ): |
||||
|
AN..200 | No |
Name of the issuing bank. . | 03 and higher. |
|
AN..7 | No |
Country codes of the issuing bank. | 03 and higher. |
|
AN..160 | No |
Name of the country of the issuing bank passed in the language parameter of the request or in the language of the user who has called the method if the language has not been specified in the request. | 03 and higher. |
loyaltyInfo/loyaltyInfos element (consists of the element loyaltyName and tags paymentBonus and awardBonus ) – tag containing data about the status of bonus points for loyalty programs in the order |
||||
loyaltyInfo element (consists of the element loyaltyName and tags paymentBonus and awardBonus ) | No | Tag containing data about the status of bonus points for loyalty programs in the order | 04 and higher. | |
loyaltyInfos element (consists of the element loyaltyName and tags paymentBonus and awardBonus ) | No | Tag containing data about the status of bonus points for loyalty programs in the order | Version 15 and higher. | |
|
ANS..512 | No |
The name of the loyalty program (for Sberbank Spasibo bonuses, these are «sbrf_spasibo» and «sbrf_sbermiles»). | Version 15 and higher. |
paymentBonus | No | Tag with attributes containing data about the status of used points to be debited along with payment for an order | 04 and higher. | |
awardBonus | No | Tag with attributes containing data about the state of funds used to accrue points along with payment for an order | 04 and higher. |
paymentBonus element attributes:
Name | Type | Mandatory | Description |
---|---|---|---|
|
N..20 | No |
The amount of points to be debited along with payment for the order. |
|
N..20 | No |
The confirmed amount in points to be debited at the time of the request. |
|
N..20 | No |
Refund amount in points at the time of request. |
|
ANS..512 | No |
The identifier of the last performed operation with the amount for the accrual of points in the loyalty processing. |
|
ANS..512 | Yes |
A feature of the success of the operation, the following values are possible:
|
|
ANS..512 | Yes |
Type of the last transaction performed with the points being debited (PAYMENT, REVERSE, REFUND_PAYMENT) |
awardBonus element attributes:
Name | Type | Mandatory | Description |
---|---|---|---|
|
N..20 | No |
The initial amount for which the bonus points were accrued. |
|
N..20 | No |
The confirmed order amount for which the bonus points were accrued. |
|
N..20 | No |
The amount of the order refunded, for which the bonus points were accrued. |
|
AN..512 | No |
The identifier of the last performed operation with the amount for the accrual of points in the loyalty processing. |
|
AN..512 | Yes |
A feature of the success of the operation, the following values are possible:
|
|
ANS..512 | Yes |
The type of the last transaction performed with the amount for the accrual of points (AWARD, REVERSE, REFUND_AWARD). |
If the request for registering an order included a cart, then in response to the request for the extended status of the order would include an orderBundle
block containing the shopping cart of the order. Description of orderBundle
block is given below. (Applicable to getOrderStatusExtended 03
and higher.).
orderBundle parameter:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..21 | No |
Order creation date in the format YYYY-MM-DDTHH:MM:SS. | 03 and higher. |
| No |
Block containing attributes with data about the customer. The description of the attributes is given below. | 03 and higher. | |
| No |
Block with the attributes of the items in the cart. The description of the attributes is given below. | 03 and higher. | |
| No |
A block with attributes of bonus programs in which line items from the Shopping cart participate. The description of the attributes is given below. If the loyalties block parameter is not passed in the request and the amount to be debited in points is calculated not on the merchant's side, then this block will still be returned in response to an extended order status request. | 03 and higher. |
customerDetails block parameters:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..40 | No |
Customer's email address. | 03 and higher. |
|
NS..12 | No | Customer's phone number. | 03 and higher. |
|
ANS..40 | No |
Customer's preferred way of communication. | 04 and higher. |
|
|
No |
|
04 and higher. |
deliveryInfo block parameters:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..20 | No |
Delivery method. | 04 and higher. |
|
A..2 | Yes |
The two-letter country code for the delivery country. | 04 and higher. |
|
ANS..40 | Yes |
Delivery city. | 04 and higher. |
|
ANS..255 | Yes |
Delivery address. | 04 and higher. |
cartItems block parameters:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
| No |
An element of the array containing attributes of an item in the cart. The description of the attributes is given below. | 03 and higher. |
items element attributes:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..12 | Yes |
The identifier of the line item participating in the specified bonus program. | 03 and higher. |
Name
TypeAN..20 Type2ANS..255 Type3A7 Type4ANS..100 DescriptionRESTName of the additional parameter. REST Online LendingThe attribute name, always takes the value of mdOrder. WSName of the additional parameter. SpasiboName or the description of an item in any format. Spasibo2Name of the parameter describing the details of a line item |
ANS..100 | Yes |
Name or the description of an item in any format. | 03 and higher. |
| No |
Additional block containing the parameters describing a line item. The description of the attributes is given below. | 04 and higher. | |
| Yes |
Element describing the total of items of one | 03 and higher. | |
|
N..18 | Yes |
The total cost of all instances of one | 03 and higher. |
|
N3 | No |
Currency code of a line item according to ISO 4217. If the parameter is not specified, it is considered to be equal to the order currency. | 03 and higher. |
|
ANS..100 | Yes |
Number (identifier) of a line item in the store system. | 03 and higher. |
quantity element attributes:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
N..18 | Yes |
Quantity of line items in given | 03 and higher. |
|
ANS..20 | Yes |
The unit of measurement for the quantity of line item instances. | 03 and higher. |
itemDetails block parameters:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
| No |
Parameter describing additional information regarding a line item. The description of the attributes is given below. | 04 and higher. |
itemDetailsParams parameter attributes:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..255 | Conditional. Mandatory if itemDetailsParams parameter is present |
Additional information on a line item. | 04 and higher. |
Name
TypeAN..20 Type2ANS..255 Type3A7 Type4ANS..100 DescriptionRESTName of the additional parameter. REST Online LendingThe attribute name, always takes the value of mdOrder. WSName of the additional parameter. SpasiboName or the description of an item in any format. Spasibo2Name of the parameter describing the details of a line item |
ANS..255 | Conditional. Mandatory if itemDetailsParams parameter is present |
Name of the parameter describing the details of a line item | 04 and higher. |
loyalties block parameters:
Name | Type | Mandatory | Description | Version of getOrderStatusExtended |
---|---|---|---|---|
|
ANS..20 | Yes |
The conventional name of the bonus program, in which the item is involved, is issued by the payment gateway. | 04 and higher. |
|
ANS..12 | Yes |
The identifier of the line item participating in the specified bonus program. | 04 and higher. |
|
N..18 | Yes |
The total amount of bonuses of all line items for this | 04 and higher. |
|
N..18 | No |
The total amount of bonuses of all line items for this | 04 and higher. |
Error codes (errorCode
field):
Value | Description |
---|---|
0 | Request processing took place without system errors |
1 | An order with this number is already registered in the system |
2 | Order is declined because of an error in the payment details |
3 | Unknown (forbidden) currency |
4 | There is no mandatory request parameter |
5 | Incorrect value of a request parameter |
6 | Unregistered OrderId |
7 | System error |
An example of the POST request:
orderId=694312ed-9dd1-4178-9009-e1ac1aa5fb92&language=ru
Example response for version getOrderStatusExtended 04
:
{"errorCode":"0", "errorMessage":"Successful", "orderNumber":"24398", "orderStatus": 2, "actionCode": 0, "actionCodeDescription":"Payment processed successfully","amount":30000,"currency":"643", "date":1394094689585,"orderDescription":"testCart singlestep","ip":"0.0.0.7", "merchantOrderParams":[{"name":"sbrf_spasibo:amount_bonus","value":"300"}], "attributes":[{"name":"mdOrder","value":"694312ed-9dd1-4178-9009-e1ac1aa5fb92"}], "cardAuthInfo":{"expiration":"201512","cardholderName":"cardholder name","approvalCode":"123456","pan":"478978**1233"}, "authDateTime":1394094689585,"terminalId":"999714","authRefNum":"111111111111", "paymentAmountInfo":{"paymentState":"DEPOSITED","approvedAmount":30000,"depositedAmount":30000,"refundedAmount":0}, "bankInfo": {"bankCountryCode":"UNKNOWN", "bankCountryName":"<Unknown>"}, "orderBundle":{"orderCreationDate":1373622660000, "customerDetails":{"email":"johnsmith@mail.ru","phone":"89851231234","contact":"Mega Tester", "deliveryInfo": {"deliveryType":"courier", "country":"RU", "city":"Moscow", "postAddress":"Zemlyanoy Val 50A p.2"}}, "cartItems":{"items":[{"positionId":"1","name":"Metzeler Enduro 3 Sahara", "itemDetails":{"itemDetailsParams":[{"value":"Metzeler","name":"brand"},{"value":"17inch","name":"radius"}]}, "quantity":{"value":1.0,"measure":"pieces"},"itemAmount":10000,"itemCurrency":643,"itemCode":"T-M-14", "discount":{"discountType":"discount","discountValue":"777"}}, {"positionId":"2","name":"Universal Mirror Enduro", "itemDetails":{"itemDetailsParams":[{"value":"Noname","name":"brand"},{"value":"12mm","name":"diameter"}]}, "quantity":{"value":1.0,"measure":"pieces"},"itemAmount":10000,"itemCurrency":643,"itemCode":"NM-15"}, {"positionId":"3","name":"Warm Grips","itemDetails":{"itemDetailsParams":[{"value":"Noname","name":"brand"}]}, "quantity":{"value":1.0,"measure":"pieces"},"itemAmount":10000,"itemCurrency":643,"itemCode":"G-16"}]}}, "loyaltyInfo":{"loyaltyName":"sbrf_spasibo","paymentBonus": {"approvedAmountBonus":300,"depositedAmountBonus":300,"refundedAmountBonus":0,"pcId":"3139154", "successful":true,"paymentOperation":"PAYMENT"}, "awardBonus":{"approvedAmountAward":30000,"depositedAmountAward":30000,"refundedAmountAward":0,"pcId":"3139155", "successful":true,"paymentOperation":"AWARD"}}}
Example response for version getOrderStatusExtended 15
:
{ "errorCode":"0", "errorMessage":"Successful", "orderNumber":"9064", "orderStatus":2, "actionCode":0, "actionCodeDescription":"", "amount":9800, "currency":"643", "date":1584012874234, "depositedDate":1584012899439, "orderDescription":"", "ip":"10.99.50.35", "merchantOrderParams":[ { "name":"sbrf_sbermiles:amount_bonus", "value":"100" }, { "name":"loyaltyId", "value":"sbrf_spasibo,sbrf_sbermiles" }, { "name":"sbrf_spasibo:amount_bonus", "value":"100" }, { "name":"sbrf_spasibo:change_rate", "value":"2.0" }, { "name":"sbrf_sbermiles:change_rate", "value":"1" }, { "name":"client_uuid", "value":"DB0427E0D30749FABBE8E9B214590A25" }, { "name":"new_card_payment", "value":"true" } ], "transactionAttributes":[ { "name":"merchantIp", "value":"10.99.50.35" } ], "attributes":[ { "name":"mdOrder", "value":"b6f698e1-fb8d-7b6d-8f56-130700ef5d58" } ], "cardAuthInfo":{ "maskedPan":"427601**6064", "expiration":"202412", "cardholderName":"CARDHOLDER NAME", "approvalCode":"123456", "paymentSystem":"VISA", "pan":"427601**6064" }, "authDateTime":1584012899096, "terminalId":"123456", "authRefNum":"580849427803", "paymentAmountInfo":{ "paymentState":"DEPOSITED", "approvedAmount":9800, "depositedAmount":9800, "refundedAmount":0, "feeAmount":0 }, "bankInfo":{ "bankName":"SBERBANK of Russia", "bankCountryCode":"RU", "bankCountryName":"Russia" }, "payerData":{ "email":"a-sbersafe0009@bpcbt.com", "phone":"9993330009" }, "loyaltyInfos":[ { "loyaltyName":"sbrf_sbermiles", "paymentBonus":{ "approvedAmountBonus":100, "depositedAmountBonus":100, "refundedAmountBonus":0, "pcId":"81753909", "successful":true, "paymentOperation":"PAYMENT" }, "awardBonus":{ "approvedAmountAward":9800, "depositedAmountAward":9800, "refundedAmountAward":0, "pcId":"81753912", "successful":true, "paymentOperation":"AWARD" } }, { "loyaltyName":"sbrf_spasibo", "paymentBonus":{ "approvedAmountBonus":100, "depositedAmountBonus":100, "refundedAmountBonus":0, "pcId":"81753908", "successful":true, "paymentOperation":"PAYMENT" }, "awardBonus":{ "approvedAmountAward":9800, "depositedAmountAward":9800, "refundedAmountAward":0, "pcId":"81753910", "successful":true, "paymentOperation":"AWARD" } } ], "chargeback":false, "paymentWay":"CARD" }