Skip to content

E-commerce Payment Requests

Note: Parameters marked with an asterisk (*) are required.

Creating a Payment Request

Request

POST example.com/api/merchant/"merchant"/create_payment_ecom

Headers

Name Value
Content-Type* application/json

Request Parameters

Name Type Format Description
order_id* string
max: 255
Request ID in your system
payment_type* string enum (russian, international) Payment type (Russian or international)
fiat_amount* string Request amount in fiat currency
fiat_currency* string enum (rub, eur, usd) Order currency
sign* string Request signature
success_callback_url* string
max: 512
URL for successful payment notification
error_callback_url string
max: 512
URL for error notification

Request Signature Generation Method:

The signature for creating a payment request is generated by calculating the SHA256 hash of the following string:

order_id : fiat_amount : fiat_currency : payment_type : sign_key

Request Example

{
  "order_id": "123456789",
  "payment_type": "russian",
  "fiat_amount": "1500.00",
  "fiat_currency": "rub",
  "sign": "d8d51ce43fe58b13be258a5b6ee2f261ae4d410fa8551105dcb0e16917b89045",
  "success_callback_url": "https://yourwebsite.com/success",
  "error_callback_url": "https://yourwebsite.com/error"
}

Response Parameters

Name Type Format Description
order_id* string
max: 255
Request ID in your system
payment_type* string enum (russian, international) Payment type (Russian or international)
fiat_amount* string Request amount
fiat_currency* string enum (rub, eur, usd) Order currency
payment_url* string URL to redirect to payment page
payment_id* string Unique payment identifier in our system
sign* string Response signature

Response Signature Generation Method:

The response signature is generated by calculating the SHA256 hash of the following string:

order_id : fiat_amount : payment_id : sign_key

Possible Errors in Response

Text Value
payment_type_not_available The specified payment type is not available for your merchant
currency_not_supported The specified currency is not supported for this payment type
unexpected error Unexpected error

Response Example

{
  "ok": true,
  "order_id": "123456789",
  "payment_type": "russian",
  "fiat_amount": "1500.00",
  "fiat_currency": "rub",
  "payment_url": "https://payment.gateway.com/pay/a1b2c3d4e5f6",
  "payment_id": "PG-123456789",
  "sign": "0df855e39b7910879cf2e91365ac06008a525f25e15f2f36575158342aa8f280"
}
{
  "ok": false,
  "error": "message"
}

Payment Request Confirmation/Cancellation by Platform

Description: This request is a callback from the platform when a request is cancelled or confirmed. The request is sent by the platform to the specified merchant URL (success_callback_url or error_callback_url) to notify about request status changes.

Request

POST error_callback_url

or

POST success_callback_url

Headers

Name Value
Content-Type* application/json

Request Parameters

Name Type Format Description
order_id* string
max: 255
Request ID in your system
standart_sign* string Standard signature
status* string enum (successful, rejected_timeout, rejected_merchant, rejected_gate) Request status (successful - success, rejected_timeout - rejected by timeout, rejected_merchant - rejected by merchant, rejected_gate - rejected by system)
fiat_amount* string Request amount in fiat currency
merchant_spent_usdt* string USDT amount credited to merchant. May be "none" until settlement
fiat_currency* string enum (rub, eur, usd) Fiat currency code
payment_type* string enum (russian, international) Payment type
payment_id* string Unique payment identifier in our system
created_at* string ISO 8601 Request creation date and time
updated_at* string ISO 8601 Request update date and time

Request Example

{
  "order_id": "123456789",
  "standart_sign": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "status": "successful",
  "fiat_amount": "1500.00",
  "merchant_spent_usdt": "15.2500",
  "fiat_currency": "rub",
  "payment_type": "russian",
  "payment_id": "PG-123456789",
  "created_at": "2024-02-15T09:30:45Z",
  "updated_at": "2024-02-15T09:45:12Z"
}

Payment Request Status Inquiry

Request

GET example.com/api/merchant/"merchant"/status_ecom/"order_id"/

Headers

Name Value
Content-Type* application/json
X-Api-Key* X-Api-Key

Response Parameters

Name Type Format Description
order_id* string
max: 255
Request ID in your system
status* string enum (expectation, successful, rejected_timeout, rejected_merchant, rejected_gate) Request status (expectation - awaiting payment, successful - success, rejected_timeout - rejected by timeout, rejected_merchant - rejected by merchant, rejected_gate - rejected by system)
fiat_amount* string Request amount in fiat currency
merchant_spent_usdt* string USDT amount credited to merchant. May be "none" until settlement
fiat_currency* string enum (rub, eur, usd) Fiat currency code
payment_type* string enum (russian, international) Payment type
payment_id* string Unique payment identifier in our system
payment_url* string URL to redirect to payment page
settle* boolean Flag indicating whether settlement was performed for the request
created_at* string ISO 8601 Request creation date and time
updated_at* string ISO 8601 Request update date and time

Response Example

{
  "ok": true,
  "order_id": "123456789",
  "status": "expectation",
  "fiat_amount": "1500.00",
  "merchant_spent_usdt": "none",
  "fiat_currency": "rub",
  "payment_type": "russian",
  "payment_id": "PG-123456789",
  "payment_url": "https://payment.gateway.com/pay/a1b2c3d4e5f6",
  "settle": false,
  "created_at": "2024-02-15T09:30:45Z",
  "updated_at": "2024-02-15T09:30:45Z"
}
{
  "ok": false,
  "error": "message"
}