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



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

userName

AN..30

Yes Login issued to the Store upon integration with the Payment Gateway.

password

AN..30

Yes Password issued to the Store upon integration with the Payment Gateway.

orderId

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.

orderNumber

AN..32

Yes*

Order identifier in the Store system.

language

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

orderNumber

AN..32

Yes

Order identifier in the Store system.

All versions.

orderStatus

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:

  • 0 – order is registered but unpaid;
  • 1 – the pre-authorized amount is held (for two-phase payments);
  • 2 – full authorization of the order amount was carried out;
  • 3 – authorization is canceled;
  • 4 – a refund operation was performed for the transaction;
  • 5 – authorization has been initiated through the access control server of the issuing bank;
  • 6 – authorization is declined.
All versions.

actionCode

N3

Yes Response code. All versions.

actionCodeDescription

AN..512

Yes

Description of the response code in the language that is passed in language parameter of the request.

All versions.

errorCode

N3

No

Error code.

All versions.

errorMessage

AN..512

No

Error description in the language passed in the language parameter in the request.

All versions.

amount

N..20

Yes The payment amount in kopecks (or cents). All versions.

currency

N3

No ISO 4217 code of the payment currency. If the code is not specified, the default value is 810 (Russian rubles). All versions.

date

ANS

Yes

Order registration date.

All versions.

orderDescription

AN..512

No

Order description passed upon its registration.

All versions.

ip

ANS..39

Yes

IP-address of the buyer. IPv6 is supported in all requests (up to 39 characters).

All versions.

authDateTime

ANS

No The authorization date and time. 02 and higher.

authRefNum

AN..24

No

Registration number of the payment authorization that has been assigned to it on the payment registration.

02 and higher.

terminalId

AN..10

No

Identifier of the terminal in processing through which the payment was made.

02 and higher.

paymentWay

AS..14

Yes

The way of order completion (a payment with entering card data, a payment using a binding, etc.). Possible values:

  • CARD – payment with entering of card details;
  • CARD_BINDING - payment by binding;
  • CARD_MOTO - payment through call center;
  • CARD_PRESENT - payment by cardPresent;
  • SBRF_SBOL – payment through Sberbank Online;
  • UPOP - payment through China Union Pay;
  • FILE_BINDING - payment by file;
  • SMS_BINDING - payment by SMS;
  • P2P - transfer from card to card;
  • P2P_BINDING - transfer by binding;
  • PAYPAL – payment from a PayPal account;
  • MTS – payment from MTS account;
  • APPLE_PAY - Apple Pay;
  • APPLE_PAY_BINDING - payment by Apple Pay binding;
  • ANDROID_PAY - Android Pay;
  • ANDROID_PAY_BINDING - payment by Android Pay binding;
  • GOOGLE_PAY_CARD - Google Pay, non-tokenized;
  • GOOGLE_PAY_CARD_BINDING - payment by binding with non-tokenized Google Pay card;
  • GOOGLE_PAY_TOKENIZED - Google Pay, tokenized;
  • GOOGLE_PAY_TOKENIZED_BINDING - payment by binding with tokenized Google Pay card;
  • SAMSUNG_PAY - Samsung Pay;
  • SAMSUNG_PAY_BINDING - payment by Samsung Pay binding;
  • IPOS - iPOS payment;
  • SBERPAY – SberPay payment;
  • SBERID – SberID payment.
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):

pan

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.

expiration

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.

cardholderName

A..64

No

Cardholder's name in Latin characters, if available.

All versions.

approvalCode

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

eci

N..4

No

Electronic Commerce Indicator.

All versions.

cavv

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.

xid

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

clientId

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.

bindingId

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

approvedAmount

N..12

No

The amount put on hold on the card (is used only for two-phase payments).

03 and higher.

depositedAmount

N..12

No

The amount confirmed for debiting from the card.

03 and higher.

refundedAmount

N..12

No

The refund amount.

03 and higher.

paymentState

A..10

No

Payment status.

03 and higher.
bankInfo element (comprises bankName, bankCountryCode and bankCountryName):

bankName

AN..200

No

Name of the issuing bank.

.

03 and higher.

bankCountryCode

AN..7

No

Country codes of the issuing bank.

03 and higher.

bankCountryName

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.

loyaltyName

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

approvedAmountBonus

N..20

No

The amount of points to be debited along with payment for the order.

depositedAmountBonus

N..20

No

The confirmed amount in points to be debited at the time of the request.

refundedAmountBonus

N..20

No

Refund amount in points at the time of request.

pcId

ANS..512

No

The identifier of the last performed operation with the amount for the accrual of points in the loyalty processing.

successful

ANS..512

Yes

A feature of the success of the operation, the following values are possible:

  • true (successful);
  • false (unsuccessful).

paymentOperation

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

approvedAmountAward

N..20

No

The initial amount for which the bonus points were accrued.

depositedAmountAward

N..20

No

The confirmed order amount for which the bonus points were accrued.

refundedAmountAward

N..20

No

The amount of the order refunded, for which the bonus points were accrued.

pcId

AN..512

No

The identifier of the last performed operation with the amount for the accrual of points in the loyalty processing.

successful

AN..512

Yes

A feature of the success of the operation, the following values are possible:

  • true (successful);
  • false (unsuccessful).

paymentOperation

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

orderCreationDate

ANS..21

No

Order creation date in the format YYYY-MM-DDTHH:MM:SS.

03 and higher.

customerDetails

No

Block containing attributes with data about the customer. The description of the attributes is given below.

03 and higher.

cartItems

No

Block with the attributes of the items in the cart. The description of the attributes is given below.

03 and higher.

loyalties

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

email

ANS..40

No

Customer's email address.

03 and higher.

phone

NS..12

No Customer's phone number. 03 and higher.

contact

ANS..40

No

Customer's preferred way of communication.

04 and higher.

deliveryInfo

Not applicable

No

Block containing the attributes of the delivery address. The description of the attributes is given below.

04 and higher.

deliveryInfo block parameters:

Name Type Mandatory Description Version of getOrderStatusExtended

deliveryType

ANS..20

No

Delivery method.

04 and higher.

country

A..2

Yes

The two-letter country code for the delivery country.

04 and higher.

city

ANS..40

Yes

Delivery city.

04 and higher.

postAddress

ANS..255

Yes

Delivery address.

04 and higher.

cartItems block parameters:

Name Type Mandatory Description Version of getOrderStatusExtended

items

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

positionId

ANS..12

Yes

The identifier of the line item participating in the specified bonus program.

03 and higher.

Name

name

Type

AN..20

Type2

ANS..255

Type3

A7

Type4

ANS..100

Description

REST

Name of the additional parameter.

REST Online Lending

The attribute name, always takes the value of mdOrder.

WS

Name of the additional parameter.

Spasibo

Name or the description of an item in any format.

Spasibo2

Name 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.

itemDetails

No

Additional block containing the parameters describing a line item. The description of the attributes is given below.

04 and higher.

quantity

Yes

Element describing the total of items of one positionId and its unit of measurement The description of the attributes is given below.

03 and higher.

itemAmount

N..18

Yes

The total cost of all instances of one positionId specified in minimum currency units.

03 and higher.

itemCurrency

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.

itemCode

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

value

N..18

Yes

Quantity of line items in given positionId. Use a decimal point as a separator in fractions.

03 and higher.

measure

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

itemDetailsParams

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

value

ANS..255

Conditional. Mandatory if itemDetailsParams parameter is present

Additional information on a line item.

04 and higher.

Name

name

Type

AN..20

Type2

ANS..255

Type3

A7

Type4

ANS..100

Description

REST

Name of the additional parameter.

REST Online Lending

The attribute name, always takes the value of mdOrder.

WS

Name of the additional parameter.

Spasibo

Name or the description of an item in any format.

Spasibo2

Name 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

loyaltyProgramName

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.

positionId

ANS..12

Yes

The identifier of the line item participating in the specified bonus program.

04 and higher.

bonusAmountForDebit

N..18

Yes

The total amount of bonuses of all line items for this positionId to debiting, indicated in kopecks.

04 and higher.

bonusAmountForCredit

N..18

No

The total amount of bonuses of all line items for this positionId to accrual, indicated in kopecks.

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"
}