curl --request POST \
--url https://api.stablepay.ai/v1/payments/out \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fiatAmount": 1350,
"sourceCurrency": "USDC",
"destinationCurrency": "KES",
"country": "KE",
"blockchain": "SOLANA",
"paymentMethod": "MOMO",
"accountName": "Jane Doe",
"accountNumber": "+254712345678",
"paymentCode": "MPESA",
"reference": "csh-txn-20260506-001",
"rateId": "RATE_ROXX01ARZ3NDEKTSV4RRFFQ69G5FAV",
"depositTxHash": "4Nd1mZQhJb7oVdz3sMKtjRTn9AA7Fer6HsRVDkbgxsF2eATdt6xUpNc2WcqLKt4d2Ce4Y2xJ7DoZq1t9UyF8x4Zt"
}
'{
"paymentId": "ISS_XX01ARZ3NDEKTSV4RRFFQ69G5FAV",
"status": "provider_accepted",
"createdAt": "2023-11-07T05:31:56Z",
"providerRef": "<string>"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 422,
"code": "insufficient_balance",
"message": "Insufficient balance on SOLANA: requested 10.500000 USDC, available 3.200000 USDC."
}{
"statusCode": 502,
"code": "provider_unavailable",
"message": "circuit open — retrying in ~45s"
}Create Payment
Submit a stablecoin-to-fiat payment to a merchant or recipient.
curl --request POST \
--url https://api.stablepay.ai/v1/payments/out \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fiatAmount": 1350,
"sourceCurrency": "USDC",
"destinationCurrency": "KES",
"country": "KE",
"blockchain": "SOLANA",
"paymentMethod": "MOMO",
"accountName": "Jane Doe",
"accountNumber": "+254712345678",
"paymentCode": "MPESA",
"reference": "csh-txn-20260506-001",
"rateId": "RATE_ROXX01ARZ3NDEKTSV4RRFFQ69G5FAV",
"depositTxHash": "4Nd1mZQhJb7oVdz3sMKtjRTn9AA7Fer6HsRVDkbgxsF2eATdt6xUpNc2WcqLKt4d2Ce4Y2xJ7DoZq1t9UyF8x4Zt"
}
'{
"paymentId": "ISS_XX01ARZ3NDEKTSV4RRFFQ69G5FAV",
"status": "provider_accepted",
"createdAt": "2023-11-07T05:31:56Z",
"providerRef": "<string>"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 400,
"message": "fiatAmount must be a positive number.",
"code": "validation_error"
}{
"statusCode": 422,
"code": "insufficient_balance",
"message": "Insufficient balance on SOLANA: requested 10.500000 USDC, available 3.200000 USDC."
}{
"statusCode": 502,
"code": "provider_unavailable",
"message": "circuit open — retrying in ~45s"
}Authorizations
Stablepay API key. Include as Authorization: Bearer <key>.
Headers
Client-generated UUID. Required to prevent duplicate payments.
Body
The payment amount in local currency.
1350
Stablecoin sent onchain for payment settlement.
USDC, USDT Fiat currency received by the merchant or recipient.
CDF, GHS, KES, NGN, TZS, UGX, XAF, XOF, ZAR, ZMW Merchant or recipient country code.
BF, BJ, CD, CI, CM, GH, KE, NG, SN, TZ, UG, ZA, ZM Supported blockchains for onchain settlement.
SOLANA The supported payment method used to deliver funds to the merchant or recipient.
BANK, MOMO, PAYBILL, TILL Merchant or recipient full name associated with the payment method.
"Jane Doe"
The bank account number, mobile money number, or merchant identifier.
"+254712345678"
Available MOMO options: MPESA, MTN, AIRTEL, TIGO, ZAMTEL, HALOTEL, VODAFONE, VODACOM, ORANGE, MOOV, FREE. Available BANK options: OPAY, PALMPAY, MONIEPOINT, BANKCODE. Available PAYBILL options: MPESA, TIPS. Available TILL options: MPESA, TIPS.
Wallet issuer's unique reference.
"csh-txn-20260506-001"
Required when paymentMethod is PAYBILL. A method-specific identifier required for processing the payment. Available PAYBILL options: PAYBILL business number (KE), PAYBILLCODE (TZ).
"123456"
The customer this payment is for. Required when KYC is enabled for your account.
"cus_01KXG3R0X8DXTKB849FFFEPT7Y"
Identifier for the quoted rate. Locked for 1 hour.
"RATE_ROXX01ARZ3NDEKTSV4RRFFQ69G5FAV"
Transaction hash of the stablecoin deposit sent to the issuer's stablecoin wallet.
"4Nd1mZQhJb7oVdz3sMKtjRTn9AA7Fer6HsRVDkbgxsF2eATdt6xUpNc2WcqLKt4d2Ce4Y2xJ7DoZq1t9UyF8x4Zt"
Response
Payment accepted. Processing is async. Poll or await webhook.

