3.4. /api/v2/capture

Introduction

Capture is initiated through HTTPS POST request to the URLs and the parameters specified below. Use SHA-1 for authentication. Capture may only be initiated when Preauth have final success status. See Statuses.

API URLs

Integration

Production

https://sandbox.sbctech.ru/paynet/api/v2/capture/ENDPOINTID

https://gate.sbctech.ru/paynet/api/v2/capture/ENDPOINTID

https://sandbox.sbctech.ru/paynet/api/v2/capture/group/ENDPOINTGROUPID

https://gate.sbctech.ru/paynet/api/v2/capture/group/ENDPOINTGROUPID

Request Parameters

Note

Request must have content-type=application/x-www-form-urlencoded.

Request Parameter

Description

login

Connecting Party login name.

client_orderid

Connecting Party order identifier of the transaction for which the status is requested.

orderid

Order id assigned to the order by SBC

currency

Currency the transaction is charged in (See: Currency codes). Sample values are: USD for US Dollar EUR for European Euro. This parameter may or may not be sent.

amount

Amount to be charged. The amount has to be specified in the highest units with . delimiter. For instance, 10.5 for USD means 10 US Dollars and 50 Cents. This parameter may or may not be sent.

control

Checksum generated by SHA-1. Control string is represented as concatenation of the following parameters:
1. Request parameter: login.
2. Request parameter: merchant-order-id.
3. Request parameter: paynet-order-id.
4. Request parameter: amount in minor units (if sent).
5. request parameter: currency (if amount sent)
6. merchant_control (Control key assigned to Connecting Party account in the SBC gateway system).

Response Parameters

Note

Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value.

Response Parameter

Description

type

The type of response. May be async-response, validation-error, error. If type equals validation-error or error, error-message and error-code parameters contain error details.

paynet-order-id

Order id assigned to the order by SBC.

merchant-order-id

Connecting Party order id.

serial-number

Unique number assigned by SBC server to particular request from the Connecting Party.

error-message

If status is error this parameter contains the reason for decline or error details.

error-code

The error code is case of error status.

end-point-id

Endpoint id used for the transaction.

Request Example

POST /paynet/api/v2/capture/39914 HTTP/1.1
Host: sandbox.sbctech.ru
User-Agent: curl/7.83.0
Accept: */*
Content-Length: 119
Content-Type: application/x-www-form-urlencoded
Connection: close

login=TestMerchant
&client_orderid=902B4FF5
&orderid=6863088
&amount=345
&currency=USD
&control=da832c0fcff0105728e26465d5f99e6f83179a45

Success Response Example

HTTP/1.1 200 OK
Server: server
Date: Mon, 22 Aug 2022 13:15:19 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
Strict-Transport-Security: max-age=31536000
Content-Length: 140

type=async-response
&serial-number=00000000-0000-0000-0000-000002ddb06a
&merchant-order-id=902B4FF5
&paynet-order-id=6863088
&end-point-id=37211

Fail Response Example

HTTP/1.1 200 OK
Server: server
Date: Mon, 22 Aug 2022 12:59:09 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
Strict-Transport-Security: max-age=31536000
Content-Length: 154

pe=validation-error
&serial-number=00000000-0000-0000-0000-000002ddb06b
&error-message=Can+not+make+capture+for+order+state+AUTH_3D_VALIDATING
&error-code=27

Postman Collection

Request Builder

endpointid or groupid

input ENDPOINTID or ENDPOINTGROUPID

login
client_orderid

input Invoice Number

orderid
amount
currency
merchant_control

input Control Key

String to sign
Signature