StarEx Docs
RU
DocumentationMerchant API

Merchant API

v1

Integration contract for pay-ins, payouts, and events

Base URL {{base_url}}/api/v1
Authorization Bearer token
Format JSON · strings

Decimal places: usually 2 · KRW — 0 · BHD/JOD — 3

Base URL: {{base_url}}/api/v1. Include these headers in every request:

TEXT
Authorization: Bearer {{merchant_token}}
Content-Type: application/json

Amounts are strings. Decimal places depend on the currency: usually 2, KRW — 0, BHD/JOD — 3.

#Pay-ins

POST /api/v1/pay-in/{method}. The request body contains amount, currency, and merchant_order_id (your identifier and idempotency key). Payment details are returned in the response (see Response).

#RUB

#Card

SHELL
curl '{{base_url}}/api/v1/pay-in/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-1"}'

#SBP

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-2"}'

#Bank account

SHELL
curl '{{base_url}}/api/v1/pay-in/account' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-3"}'

#NSPK QR

SHELL
curl '{{base_url}}/api/v1/pay-in/qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-4"}'

#Card · Single-bank

SHELL
curl '{{base_url}}/api/v1/pay-in/mono-card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","bank_name":"Альфа-Банк","merchant_order_id":"order-5"}'

#SBP · Single-bank

SHELL
curl '{{base_url}}/api/v1/pay-in/mono-sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","bank_name":"Сбербанк","merchant_order_id":"order-6"}'

#QR · Single-bank

SHELL
curl '{{base_url}}/api/v1/pay-in/mono-qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","bank_name":"Т-Банк","merchant_order_id":"order-7"}'

#Universal QR

SHELL
curl '{{base_url}}/api/v1/pay-in/qr-req' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-7b"}'

#Card · Cross-border

SHELL
curl '{{base_url}}/api/v1/pay-in/transgran-card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-8"}'

#SBP · Cross-border

SHELL
curl '{{base_url}}/api/v1/pay-in/transgran-sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-9"}'

#QR · Cross-border

SHELL
curl '{{base_url}}/api/v1/pay-in/transgran-qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-10"}'

#VietQR

SHELL
curl '{{base_url}}/api/v1/pay-in/vietqr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-10b"}'

#Mobile commerce

SHELL
curl '{{base_url}}/api/v1/pay-in/mobcom' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-11"}'

#Mobile commerce · Cross-border

SHELL
curl '{{base_url}}/api/v1/pay-in/transgran-mobcom' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"RUB","merchant_order_id":"order-12"}'

#UZS

#UZS card

SHELL
curl '{{base_url}}/api/v1/pay-in/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"50000","currency":"UZS","merchant_order_id":"order-13"}'

#Humo

SHELL
curl '{{base_url}}/api/v1/pay-in/humo' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"50000","currency":"UZS","merchant_order_id":"order-13b"}'

#KZT

#KZT card

SHELL
curl '{{base_url}}/api/v1/pay-in/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"15000","currency":"KZT","merchant_order_id":"order-14"}'

#KZT card · Cross-border

SHELL
curl '{{base_url}}/api/v1/pay-in/transgran-card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"15000","currency":"KZT","merchant_order_id":"order-14b"}'

#Kaspi · Kazakhstan

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"15000","currency":"KZT","bank_name":"Kaspi Bank","merchant_order_id":"order-15"}'

#KRW

#KRW bank account

SHELL
curl '{{base_url}}/api/v1/pay-in/account' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100000","currency":"KRW","merchant_order_id":"order-16"}'

#KakaoPay · KRW

SHELL
curl '{{base_url}}/api/v1/pay-in/kakaopay' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100000","currency":"KRW","merchant_order_id":"order-krw-kakao-1","payer_name":"Gildong","payer_surname":"Hong"}'

#TRY

#IBAN · Türkiye

SHELL
curl '{{base_url}}/api/v1/pay-in/iban' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"500","currency":"TRY","payer_name":"Ivan","payer_surname":"Petrov","merchant_order_id":"order-17"}'

#MNT

#IBAN · Mongolia

SHELL
curl '{{base_url}}/api/v1/pay-in/iban' \
  -H 'Authorization: Bearer {{api_key}}' -H 'Content-Type: application/json' \
  -d '{"amount":"250000","currency":"MNT","merchant_order_id":"order-mn-1"}'

#AZN

#Card · Azerbaijan

SHELL
curl '{{base_url}}/api/v1/pay-in/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"AZN","merchant_order_id":"order-18"}'

#Phone · Azerbaijan

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"AZN","merchant_order_id":"order-19"}'

#KGS

#Card · Kyrgyzstan

SHELL
curl '{{base_url}}/api/v1/pay-in/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"1000","currency":"KGS","merchant_order_id":"order-20"}'

#Phone · Kyrgyzstan

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"1000","currency":"KGS","merchant_order_id":"order-21"}'

#EGP

#InstaPay · Egypt

SHELL
curl '{{base_url}}/api/v1/pay-in/qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"200","currency":"EGP","merchant_order_id":"order-22"}'

#Phone · Egypt

SHELL
curl '{{base_url}}/api/v1/pay-in/sim' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"200","currency":"EGP","merchant_order_id":"order-23"}'

#BHD

#Phone · Bahrain

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"5.500","currency":"BHD","merchant_order_id":"order-24"}'

#JOD

#Phone · Jordan

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"5.500","currency":"JOD","merchant_order_id":"order-25"}'

#SAR

#BarqWallet · Saudi Arabia

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"SAR","merchant_order_id":"order-26"}'

#ARS

#Bank transfer · Argentina

SHELL
curl '{{base_url}}/api/v1/pay-in/bank-transfer' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"5000","currency":"ARS","merchant_order_id":"order-27"}'

#QR · Argentina

SHELL
curl '{{base_url}}/api/v1/pay-in/qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"5000","currency":"ARS","merchant_order_id":"order-28"}'

#PKR

#JazzCash/EasyPaisa · Pakistan

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"1000","currency":"PKR","merchant_order_id":"order-29"}'

#LBP

#WhishWallet · Lebanon

SHELL
curl '{{base_url}}/api/v1/pay-in/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100000","currency":"LBP","merchant_order_id":"order-30"}'

#BRL

#PIX · Brazil

SHELL
curl '{{base_url}}/api/v1/pay-in/qr' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100","currency":"BRL","merchant_order_id":"order-31"}'

#Method specifics

  • bank_name is required for mono-card, mono-sbp, and mono-qr.
  • Kaspi · Kazakhstan: use bank_name with the value Kaspi Bank.
  • For kakaopay, payer_name and payer_surname are required. In the response, payment_link is a direct KakaoPay URL; bank details and phone_number are null.
  • For iban with TRY, payer_name and payer_surname are required.
  • For qr-req, qr and payment_link point to the payment page. qr_image_url is a direct PNG QR URL; replace .../qr.png with .../qr.svg for SVG.
  • For vietqr, qr contains the VietQR (EMVCo) payload rendered on payment_link; qr_image_url is null.

#Response

201 (a retry with the same merchant_order_id returns 200 and the same transaction):

JSON
{
  "id": "ceadf9ea-6eba-4664-a99c-4404eb412c9d",
  "merchant_order_id": "order-1",
  "status": "pending",
  "sub_status": "waiting_for_payment",
  "expires_at": "2026-06-12T13:57:36Z",
  "amount": "100.00",
  "currency": "RUB",
  "currency_rate": "78.2",
  "amount_usdt": "1.27",
  "commission_percent": "8.00",
  "commission": "0.10",
  "card_number": "2202 2050 1234 5678",
  "phone_number": null,
  "iban": null,
  "account_number": null,
  "qr": null,
  "qr_image_url": null,
  "owner_name": "IVAN PETROV",
  "bank_name": "sberbank",
  "country_name": "Россия",
  "payment_currency": "RUB",
  "payment_link": "https://pay.example.com/pay/ceadf9ea-…",
  "created_at": "2026-06-12T13:42:36Z"
}

Payment details are returned in the field matching the method (card_number / phone_number / iban / account_number / qr); all other detail fields are null. Normally, payment_link points to our payment page. currency_rate / amount_usdt / commission_percent / commission provide a USDT fee preview (or "" when no rate or fee is configured).

country_name and payment_currency are derived from currency (country_name is the country's Russian display name). Use the ISO code in currency for application logic instead of these display fields.

status: pendingsuccess | fail. sub_status: waiting_details_to_be_selectedwaiting_for_paymentsuccessfully_paid | expired | cancelled | declined_no_requisites.

GET /api/v1/pay-in/{id} returns the transaction status.

#Order receipt

After payment, you can attach a receipt to the order. Send multipart/form-data with the PDF in the receipt field; {id} is the order ID from the pay-in response.

SHELL
curl -X POST '{{base_url}}/api/v1/pay-in/{id}/receipt' \
  -H 'Authorization: Bearer {{merchant_token}}' \
  -F 'receipt=@check.pdf;type=application/pdf'

#Payouts

POST /api/v1/pay-out/{method}. The request body contains merchant_payout_id (the idempotency key), amount, currency, and destination details.

#Card

SHELL
curl '{{base_url}}/api/v1/pay-out/card' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-1","amount":"4000","currency":"RUB","card_number":"2202209912345678"}'

#Humo

SHELL
curl '{{base_url}}/api/v1/pay-out/humo' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-1b","amount":"50000","currency":"UZS","card_number":"9860123412345678"}'

#SBP / phone

SHELL
curl '{{base_url}}/api/v1/pay-out/sbp' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-2","amount":"4000","currency":"RUB","phone_number":"+79991234567"}'

#Bank account

SHELL
curl '{{base_url}}/api/v1/pay-out/account' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-3","amount":"4000","currency":"RUB","account_number":"40817810099910004312"}'

#IBAN

SHELL
curl '{{base_url}}/api/v1/pay-out/iban' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-4","amount":"500","currency":"TRY","iban":"TR33...","recipient_name":"Ivan","recipient_surname":"Petrov"}'

#IBAN · Mongolia

SHELL
curl '{{base_url}}/api/v1/pay-out/iban' \
  -H 'Authorization: Bearer {{api_key}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-mn-1","amount":"250000","currency":"MNT","iban":"MN12 1234 1234 5678 9123","recipient_name":"Bat-Erdene","recipient_surname":"Bold"}'

#Mobile operator (SIM)

SHELL
curl '{{base_url}}/api/v1/pay-out/sim' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-5","amount":"200","currency":"EGP","phone_number":"+201234567890"}'

#Bank transfer

SHELL
curl '{{base_url}}/api/v1/pay-out/bank-transfer' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"merchant_payout_id":"po-6","amount":"5000","currency":"ARS","account_number":"0001234567890123456789"}'

#Method specifics

  • For iban, recipient_name and recipient_surname are required.

#Response

201:

JSON
{
  "id": "9f1c…",
  "merchant_payout_id": "po-1",
  "status": "pending",
  "currency": "RUB",
  "amount": "4000.00",
  "destination": "2202209912345678",
  "fee_usdt": "0.51",
  "fail_reason": null,
  "created_at": "2026-06-12T13:42:36Z"
}

The amount and fee are deducted from the balance when the payout is created. Insufficient balance returns INSUFFICIENT_FUNDS; funds are returned when the payout becomes failed. status: pendingtakencompleted | failed.

GET /api/v1/pay-out/{id} returns the payout status.

#Balance

GET /api/v1/balance returns the merchant's USDT balance.

SHELL
curl '{{base_url}}/api/v1/balance' -H 'Authorization: Bearer {{merchant_token}}'
JSON
{"balance_usdt": "1250.00"}

#Settlement withdrawal

POST /api/v1/settlements creates a balance withdrawal request. The TRC20 wallet is taken from the account settings; send only the amount.

SHELL
curl '{{base_url}}/api/v1/settlements' \
  -H 'Authorization: Bearer {{merchant_token}}' -H 'Content-Type: application/json' \
  -d '{"amount":"100"}'

Response 201:

JSON
{
  "id": "3f2b9c10-8a1d-4e77-9c2e-5b0f1a2d3e44",
  "status": "pending",
  "amount": "100.00",
  "currency": "USDT",
  "network": "TRC20",
  "wallet": "••••4F2a",
  "tx_hash": "",
  "created_at": "2026-07-14T10:00:00Z"
}
  • The amount is held on the balance; an amount above the available balance returns INSUFFICIENT_FUNDS.
  • The request does not accept a wallet address. If no TRC20 wallet is configured, the API returns VALIDATION_ERROR.
  • status: pendingpaid | rejected (the amount is returned when rejected).
  • GET /api/v1/settlements/{id} returns the withdrawal request status.

#Disputes (appeals)

POST /api/v1/appeals accepts multipart/form-data.

SHELL
curl '{{base_url}}/api/v1/appeals' -H 'Authorization: Bearer {{merchant_token}}' \
  -F 'transaction_id=ceadf9ea-6eba-4664-a99c-4404eb412c9d' \
  -F 'amount=1001' \
  -F 'attachments=@receipt.jpg' \
  -F 'attachments=@proof.mp4'
  • transaction_id is either our id (UUID) or your merchant_order_id.
  • attachments: 1–10 files, up to 50 MiB each; supported formats: jpg, jpeg, png, webp, gif, heic, pdf, mp4, mov, webm, m4v, avi.
  • One dispute per transaction.

Response 201: id, status (open), amount, currency, and attachments. GET /api/v1/appeals?limit=&offset= lists disputes; GET /api/v1/appeals/{id} returns one dispute; GET /api/v1/appeals/{id}/files/{aid} downloads an attachment.

#Webhooks

We send a POST request to your callback_url whenever a status changes. Return 2xx to acknowledge receipt. A 5xx response or timeout triggers exponential backoff (up to 7 attempts over approximately 1 hour); 4xx responses are not retried because they indicate an intentional rejection. Process events idempotently. If an event is missed, poll GET /api/v1/pay-in/{id} or the corresponding payout or dispute endpoint. The signature is sent in X-Starex-Signature: hex(HMAC-SHA256(raw body, your callback token)). Event type is determined by type: absent means pay-in, "payout" means payout, and "dispute" means dispute.

  • Pay-in: id, merchant_order_id, status, sub_status, currency, amount, requisite, holder_name, bank, expires_at, created_at, event_at.
  • Payout: type, id, merchant_payout_id, status, currency, amount, destination, fail_reason, event_at.
  • Dispute: type, event (dispute.approved / dispute.rejected), id, transaction_id, merchant_order_id, status, amount, currency, reason, created_at, event_at.

#Error codes

CodeHTTPWhen
VALIDATION_ERROR422Invalid fields, amount, JSON, or an unknown field
METHOD_NOT_AVAILABLE422The method is unavailable for the currency
METHOD_NOT_ENABLED422The method is not enabled for your account
AMOUNT_OUT_OF_RANGE422The amount is outside your configured range (min/max)
RATE_SOURCE_NOT_CONFIGURED422No exchange rate source is configured for the currency
INSUFFICIENT_FUNDS422The balance is insufficient for the payout and fee
UNAUTHORIZED401The token is missing or invalid, or the IP is outside the allowlist
PAYIN_NOT_FOUND / PAYOUT_NOT_FOUND / APPEAL_NOT_FOUND404The object was not found
INTERNAL_ERROR500Internal error; retry the request
StarEx · Merchant API v1 Top