3.9. /api/v2/status
Введение
Получение статуса транзакции осуществляется через запрос методом HTTPS POST на указанный ниже URL с использованием указанных параметров. Для аутентификации запроса используется SHA-1. См. Статусы транзакций.
API URL
Интеграционная среда |
Производственная среда |
---|---|
https://sandbox.sbctech.ru/paynet/api/v2/status/ENDPOINTID |
https://gate.sbctech.ru/paynet/api/v2/status/ENDPOINTID |
https://sandbox.sbctech.ru/paynet/api/v2/status/group/ENDPOINTGROUPID |
https://gate.sbctech.ru/paynet/api/v2/status/group/ENDPOINTGROUPID |
Параметры запроса
Note
Название параметра |
Описание параметра |
Необходимость |
---|---|---|
login |
Логин Присоединяющейся Стороны в Платёжном Шлюзе. |
Обязательно |
client_orderid |
Уникальный идентификатор заказа, присвоенный Присоединяющейся Стороной. |
Обязательно |
orderid |
Идентификатор заказа на стороне Платёжного Шлюза. |
Условно |
by-request-sn |
Серийный номер, присвоенный SBC конкретному API-запросу. Если параметр присутствует в запросе статуса, ответ на запрос будет возвращён только для той стадии транзакции, на которой она находилась в момент совершения запроса с таким серийным номером. Параметр может быть включён в запрос для получения такой стадии в специальных случаях. Для получения наиболее актуального статуса транзакции, не следует включать этот параметр в запрос. request. |
Опционально |
control |
Контрольная сумма, сгенерированная SHA-1. Строка для подписи представляет собой объединение следующих параметров:
1. Параметр запроса: login,
2. Параметр запроса: client_orderid,
3. Параметр запроса: orderid,
4. merchant_control (Контрольный ключ Присоединяющейся Стороны в Платёжном Шлюзе SBC).
|
Обязательно |
Параметры ответа
Note
Параметры ответа на запрос статуса CReqForm |
Описание параметра |
---|---|
type |
The type of response. May be status-response. |
status |
See Список статусов for details. |
amount |
Actual transaction amount. This value can be changed during the transaction flow. |
currency |
Currency the transaction is charged in (three-letter currency code). Example of valid parameter values are: USD for US Dollar EUR for European Euro. |
paynet-order-id |
Идентификатор заказа на стороне Платёжного Шлюза. |
merchant-order-id |
Connecting Party order id. |
phone |
Payer’s full international phone number, including country code. |
html |
HTML code of 3DS authorization form, encoded in application/x-www-form-urlencoded MIME format. Merchant must decode this parameter before showing the form to the Payer. gate.sbctech.ru System returns the following response parameters when it gets 3DS authorization form from the Issuer Bank. It contains auth form HTML code which must be passed through without any changes to the client’s browser. This parameter exists and has value only when the redirection HTML is already available. For non-3DS this never happens. For 3DS HTML has value after some short time after the processing has been started. |
redirect-to |
For 3DS authorization the merchant can redirect the Payer to URL provided in this parameter instead of rendering the page provided in html parameter. The redirect-to parameter is returned only if the html parameter is returned. Merchant should use GET HTTP method to redirect. This parameter must be used to work with 3DS 2.0. |
serial-number |
Unique number assigned by gate.sbctech.ru server to particular request from the Connecting Party. |
last-four-digits |
Last four digits of Payer bank card number. |
dest-last-four-digits |
Last four digits of customer credit card number. Relevant only for transfer transactions. |
bin |
Bank BIN of Payer bank card number. |
card-type |
Type of Payer bank card (VISA, MASTERCARD, etc). |
gate-partial-reversal |
Processing gate support partial reversal (enabled or disabled). |
gate-partial-capture |
Processing gate support partial capture (enabled or disabled). |
transaction-type |
Transaction type (sale, reversal, capture, preauth). |
processor-rrn |
Bank Receiver Registration Number. |
processor-tx-id |
Acquirer transaction identifier. |
receipt-id |
Electronic link to receipt https://gate.sbctech.ru/paynet/view-receipt/ENDPOINTID/receipt-id/. |
name |
Название параметра |
card-ref-id |
Card reference ID used in subsequent recurrent payments. Relevant only if card-ref-id was created for initial transaction. |
cardholder-name |
Cardholder’s name. |
card-exp-month |
Bank card expiration month. |
card-exp-year |
Bank card expiration year. |
card-hash-id |
Unique card identifier to use for loyalty programs or fraud checks. |
card-country-alpha-three-code |
Three letter country code of source card issuer. See Коды стран и штатов for details. |
destination-card-country-alpha-three-code |
Three letter country code of destination card issuer. See Коды стран и штатов for details. |
dest-bin |
Bank BIN of customer credit card number. |
dest-card-type |
Type of customer credit card (VISA, MASTERCARD, etc). |
dest-bank-name |
Bank name by customer card BIN. |
destination-hash-id |
Unique card identifier to use for loyalty programs or fraud checks. Relevant only for transfer transactions. |
destination-card-hash-id |
Unique card identifier to use for loyalty programs or fraud checks. |
first-name |
Payer’s first name. |
last-name |
Payer’s last name. |
Payer’s e-mail. |
|
country * |
Payer’s country (two-letter country code). Please see Коды стран и штатов for a list of valid country codes. |
state * |
Payer’s state . Please see Коды стран и штатов for a list of valid state codes. Обязательно for USA, Canada and Australia. |
city * |
Payer’s city. |
zip_code * |
Payer’s ZIP code. |
address1 * |
Payer’s address line 1. |
purpose |
Destination to where the payment goes. It is useful for the merchants who let their payers to top up their accounts with bank card (Mobile phone accounts, game accounts etc.). Sample values are: +7123456789; gamer0001@ereality.com etc. This value can be used by the fraud monitoring system. |
bank-name |
Bank name by Payer card BIN. |
terminal-id |
Acquirer terminal identifier to show in receipt. |
paynet-processing-date |
Acquirer transaction processing date. |
approval-code |
Bank approval code. |
order-stage |
The current stage of the transaction processing. See Стадии транзакции for details. |
total-reversal-amount |
Total amount of processed reversals. Relevant only for reversal transactions. |
reversal-amount |
The amount of the last processed reversal. Relevant only for reversal transactions. |
auth-response-code |
Response code used in Iso8583 protocol. Only returned in specific cases. |
acquirer-processing-date |
Acquirer transaction processing date. |
processor-auth-credit-code |
Approval credit code. Only returned in specific cases. |
processor-credit-rrn |
Retrieval Reference Number for credit transaction. |
processor-credit-arn |
Acquirer card reference number for credit transaction. |
processor-debit-arn |
Acquirer card reference number for debit transaction. |
loyalty-balance |
The current bonuses balance of the loyalty program for current operation. if available. |
loyalty-message |
The message from the loyalty program. if available. |
loyalty-bonus |
The bonus value of the loyalty program for current operation if available. |
loyalty-program |
The name of the loyalty program for current operation if available. |
Описание параметра |
Bank identifier of the payment recipient. |
original-gate-descriptor |
Descriptor, which is set on gate level in the system. |
error-message |
If status in declined, error, filtered this parameter contains the reason for decline. |
error-code |
The error code is case status in declined, error, filtered. |
by-request-sn |
Serial number assigned to the specific request by gate.sbctech.ru. If this field exist in status request, status response return for this specific request. |
verified-3d-status |
See Список статусов 3D Secure for details. |
verified-rsc-status |
Returned if Random Sum Check was performed. See Alternative cardholder authentication |
eci |
Electronic Commerce Indicator (Visa). |
ips-src-payment-product-code |
Code for card set by multinational financial service (Visa/Mastercard). |
ips-src-payment-product-name |
Decrypted code for card set by multinational financial service (Visa/Mastercard). |
ips-src-payment-type-code |
Type of card code set by multinational financial service (Visa/Mastercard). |
ips-src-payment-type-name |
Decrypted code for type of card set by multinational financial service (Visa/Mastercard). |
merchantdata |
If provided in initial request, merchant_data parameter and its value will be included in status response. |
initial-amount |
Amount, set in initiating transaction, without any fees or commissions. This value can’t change during the transaction flow. |
seller-commission |
Total commission for processed transaction. This is optional parameter. Please contact your manager in SBC, if you would like to receive it. |
acquirer-commission |
Acquirer commission for processed transaction. This is optional parameter. Please contact your manager in SBC, if you would like to receive it. |
motivational-message |
This is an optional message which contains extended information about the reason for the declined transaction. |
transaction-date |
Date of final status assignment for transaction. |
orig-amount |
Contains the original request amount if it was converted on auxiliary endpoint in Parallel form integration. Relevant only for Payment Cashier transactions. |
orig-currency |
Contains the original request currency if it was converted on auxiliary endpoint in Parallel form integration. Relevant only for Payment Cashier transactions. |
Параметры ответа на запрос статуса CReqForm
Описание параметра
qr-code
QR code in base 64 format.
qr-code-payload-type
QR Code type = SBP.
qr-code-payload-value
Link to the QR code =https://qr.nspk.ru/BS***** (only for H2H integration).
Параметры ответа на запрос статуса PaReqForm
Название |
Описание параметра |
---|---|
tds-pareq-form-pareq |
Данные ACS 3DS PaReq, полученные Присоединяющейся Стороной. |
tds-pareq-form-acs-url |
ACS URL для перенаправления Плательщика в рамках сценария аутентификации 3DS 1.0.2. |
Параметры ответа на запрос статуса CReqForm
Название |
Описание параметра |
---|---|
tds-creq-form-creq |
Сообщение CReq инициирует взаимодействие держателя карты в полной проверке 3DS (Challenge) и используется для передачи аутентификационных данных. Формируется сервером 3DS торговцем через браузер держателя карты в адрес ACS URL. |
tds-creq-form-acs-url |
ACS URL для перенаправления Плательщика для полной проверки 3DS (Challenge). |
Параметры ответа на запрос статуса MethodUrlFrame
Название |
Описание параметра |
---|---|
tds-method-url-frame-3ds-server-trans-id |
Универсально уникальный идентификатор транзакции, присвоенный сервером 3DS. |
tds-method-url-frame-3ds-method-url |
URL 3DS Метода используется в форме iframe, передающейся от торговца к Плательщику. |
Правила создания HTML формы.
Пример запроса
POST /paynet/api/v2/status/37211 HTTP/1.1
Host: sandbox.sbctech.ru
User-Agent: curl/7.77.0
Accept: */*
Content-Length: 99
Content-Type: application/x-www-form-urlencoded
Connection: close
login=TestYujik
&client_orderid=123
&orderid=6863082
&control=647f0581bbceb804a73e98d9ea7e78640a75bf1c
Пример успешного ответа
type=status-response
&serial-number=00000000-0000-0000-0000-0000037704d3
&merchant-order-id=902B4FF5
&paynet-order-id=6863082
&status=processing
&amount=10.42
¤cy=RUB
&original-gate-descriptor=PAYMENT-RUB
&transaction-type=sale
&receipt-id=7d59a029-2316-36e5-b29b-96139fc7af38
&card-exp-month=0
&card-exp-year=0
&email=john.smith@gmail.com
&order-stage=sale_3d_validating
&merchantdata=VIP customer
&card-type=SBP
&phone=12063582043
&paynet-processing-date=2023-03-29 13:47:40 MSK
&first-name=John
&last-name=Smith
&initial-amount=10.42
&qr-code=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAFIklEQVR42u3dSXLjQAwEQP7/0/IbHFIXUM2sMyfYC5IHQBN+PiIvzuMIBAARAEQAEAFABAARAEQAEAFABAARAEReBuDZly/XeWKbR67nu8WfeFF1hQAAAAAAAAAAAAAAAAAAAAAAAAAAAADAqdOJFUHL1S58+4l/XlEhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPCbbvTs4cYa+fdt88Tit1UIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJRtb3ZiEDuQ2QoGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACKAbT011u6+wAAAAAAAAAAAAAAAAAAAAAAAAAAAABwJ4ATqQawcLYwi2q2QgAAAAAAAAAAAAAAAAAAAAAAAAAAAABg/sQXTgw8GejuD+oFwJMAAOBJAADwJAAAeBIAADwJAACeBKAsJzrc1QOH2fZ8R80AAAA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AAAAAAAAAAAAAAAAAAAAAoB7AYDs5OXCIFVbLsAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3g7g2ZfecvkE/2xZ5ugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAILqU8bc/zVl4njG9i+YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXAZg4X3fB/XN0jL3DgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAilwcAAUAEABEARAAQAUAEABEARAAQAUAEABEARO7IH3aFPM1k5o6oAAAAAElFTkSuQmCC
&qr-code-payload-type=SBP
&qr-code-payload-value=https://qr.nspk.ru/BS100069IM4ESCN090DP55N859KG1AAD
Пример неуспешного ответа
HTTP/1.1 200 OK
Server: server
Date: Mon, 12 Sep 2022 09:08:02 GMT
Content-Type: text/html;charset=utf-8
Connection: close
Vary: Accept-Encoding
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Content-Language: en-US
X-Cached: MISS
Content-Length: 137
type=validation-error
&serial-number=00000000-0000-0000-0000-000002ddb057
&error-message=End+point+with+id+372118+not+found
&error-code=3
Коллекция Postman
Конструктор запросов
String to sign |
---|
Signature |
---|
|