Cross-border pay in invoice
Direct request of bank details involves creating an API request
POST /api/merchant/invoices
with required parameters:
- type - type of request
in
- crossBorderCurrency - currency, for example:
TJS
, - currency - store currency,
RUB
- paymentOption - only
CROSS_BORDER
for this type of payments - paymentMethod - payment bank code, for example
dcbank
. A full list of supported banks can be reached via the Public API and here - startDeal -
true
- this parameter indicates that within the request it is mandatory to create a deal with the trader. Bank details for the created deal will be in the response.
In casepaymentMethod
is set as null
- you will receive the first available bank details.
Bank details for transfer are returned in the response in the array deals
. There will be either 1 element or an empty array.
If the array deals
is empty, it means that there are no avalible bank details at the moment.
Request params
Name | Type | Description |
---|---|---|
type | DirectionType | Direction Type — in |
amount | string | Amount, for example: 1011 |
currency | string | Store currency, RUB |
notificationUrl | string | URL to receive invoice status changes via notifications |
notificationToken | string | Token for notification validation |
internalId | string (optional) | ID in merchant's system |
userId | string (optional) | Client ID in the merchant's system |
paymentOption | string | CROSS_BORDER |
paymentMethod | PaymentMethod (optional) | Bank code |
crossBorderCurrency | string | Currency for cross-border payments, for example ,TJS |
crossBorderRequisiteType | string (optional) | Requisite type, for example: PHONE ,CARD |
successUrl | string (optional) | URL to redirect on successful payment, e.g. http://success |
cancelUrl | string (optional) | URL to redirect if payment is canceled, e.g. http://fail |
startDeal | boolean | true for this type of request |
Request example
- CURL
curl --request POST \
--url https://{{domain}}/api/merchant/invoices \
--header 'Content-Type: application/json' \
--header 'X-Identity: {{api_key}}' \
--header 'X-Signature: {{sign}}' \
-d '{
"internalId": "00001",
"type": "in",
"paymentOption": "CROSS_BORDER",
"paymentMethod": "dcbank",
"crossBorderCurrency": "TJS",
"crossBorderRequisiteType": "PHONE",
"userId": "0001",
"amount": "1011",
"currency": "RUB",
"notificationUrl": "https://webhook.site/0ee5387c-c0c1-41aa-a4ca-c87173be8bf",
"successUrl": "http://success",
"cancelUrl": "http://fail",
"strictlySingleTransfer": true,
"notificationToken": "test_token",
"startDeal": true
}'
Response example
{
"id": "425ee282-e2f3-4fc5-9644-02ddf0a0bbe0",
"internalId": "00001",
"userId": "0001",
"type": "in",
"status": "new",
"paymentMethod": null,
"paymentOption": "CROSS_BORDER",
"paymentRequisites": null,
"sum": {
"amount": "1011.00",
"currency": "RUB",
"subunit": 2
},
"storeId": 444,
"storeName": "СrossB_TEST",
"receivedSumFromTaker": {
"amount": "1011.00",
"currency": "RUB",
"subunit": 2
},
"receivedSumFromMaker": {
"amount": "11.58075601",
"currency": "USDT",
"subunit": 8
},
"serviceFeeSum": {
"amount": "1.15807561",
"currency": "USDT",
"subunit": 8
},
"payoutSum": {
"amount": "10.42268040",
"currency": "USDT",
"subunit": 8
},
"createdAt": "2025-04-07T13:57:02+00:00",
"expireAt": "2025-04-07T14:57:02+00:00",
"updatedAt": "2025-04-07T13:57:02+00:00",
"invoiceUrl": "https:\/\/go-pay.club\/invoice?id=425ee282-e2f3-4fc5-9644-02ddf0a0bbe",
"crossBorderCurrency": "TJS",
"deals": [
{
"id": "425ee282-e2f3-4fc5-9644-02ddf0a0bbe0",
"type": "in",
"status": "transfer_waiting",
"paymentMethod": "dcbank",
"paymentOption": "CROSS_BORDER",
"requisites": {
"requisites": "5678 4829 4678 2390",
"holder": "test"
},
"canceledAt": "2025-04-07T14:12:02+00:00",
"disputeAttachment": null,
"disputeReason": null,
"disputeReasonData": [],
"payment": null,
"rate": "87.30",
"isActive": true,
"qrCodeLink": "https:\/\/www.sberbank.com\/sms\/pbpn?requisiteNumber=5678482946782390",
"disputeResult": null,
"attachments": []
}
]
}