curl --request POST \
--url "https://api.stablepay.co/api/v1/transfer" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
}'
const response = await fetch("https://api.stablepay.co/api/v1/transfer", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
})
});
console.log(await response.json());
{
"transfer_id": "9000000011",
"merchant_id": "2000000001",
"transfer_type": "on_ramp",
"quote_id": "9000000017",
"fiat_deposit_id": "9000000090",
"source_amount": 100500,
"target_amount": 100479,
"rate_type": "fixed",
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"target_account_no": "00000001",
"status": "processing",
"created": 1718726400
}
Stablecoin Exchange API
Create a transfer (fiat to stablecoin, stablecoin to fiat, stablecoin swap)
Create a transfer (fiat to stablecoin, stablecoin to fiat, stablecoin swap)
POST
/
api
/
v1
/
transfer
curl --request POST \
--url "https://api.stablepay.co/api/v1/transfer" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
}'
const response = await fetch("https://api.stablepay.co/api/v1/transfer", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
})
});
console.log(await response.json());
{
"transfer_id": "9000000011",
"merchant_id": "2000000001",
"transfer_type": "on_ramp",
"quote_id": "9000000017",
"fiat_deposit_id": "9000000090",
"source_amount": 100500,
"target_amount": 100479,
"rate_type": "fixed",
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"target_account_no": "00000001",
"status": "processing",
"created": 1718726400
}
See authentication, signing, data conventions, and errors. Regenerate the timestamp, nonce, and signature on every retry.
POST /transfer One conversion: on_ramp fiat to stablecoin, off_ramp stablecoin to fiat, swap stablecoin to stablecoin.
Request headers
string
required
Bearer API Key.
string
required
Unix seconds, within five minutes of server time.
string
required
Unique per request, 16–64 characters.
string
required
Lowercase hexadecimal HMAC-SHA256 signature for the exact request body.
string
Idempotency key
Request parameters
string
Must match the quote merchant when
quote_id is usedstring
required
on_ramp, off_ramp, swapinteger
required
Sell amount; must equal the deposit amount for
on_rampstring
Business reference
string
Quote to execute; exclusive with
rate_typestring
fixed or floating
string
Required for
on_rampstring
Sell currency for swap and
off_rampstring
Source network
string
Required for swap and
off_rampstring
Buy currency
string
Target network
string
Target account for
on_rampstring
Required for
off_ramp; optional for on_ramp and swapobject
Custom metadata
Response
string
required
Transfer ID
string
required
Merchant ID
string
Business reference
string
required
on_ramp, off_ramp, swapstring
Executed quote ID
string
Deposit record for
on_rampstring
Sell currency
string
Buy currency
string
Source network
string
Target network
integer
Sell amount excluding fees
integer
Buy amount; estimate under floating
string
fixed or floating
string
Rate, decimal string
integer
Fee
string
Fee currency
string
Source account
string
Target account
string
Recipient ID
object
Address and memo, or bank fields
string
required
processing,
payment_submitted, completed, funds_refunded, bounced_backstring
Failure reason
object
Custom metadata
integer
required
Creation time
integer
Last update time
Status and errors
400 invalid parameters; 404 unknown quote or deposit; 409 quote consumed, expired, or insufficient funds.curl --request POST \
--url "https://api.stablepay.co/api/v1/transfer" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
}'
const response = await fetch("https://api.stablepay.co/api/v1/transfer", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"transfer_type": "on_ramp",
"fiat_deposit_id": "9000000090",
"amount": 100500,
"target_currency": "USDC",
"target_network": "solana",
"rate_type": "fixed"
})
});
console.log(await response.json());
{
"transfer_id": "9000000011",
"merchant_id": "2000000001",
"transfer_type": "on_ramp",
"quote_id": "9000000017",
"fiat_deposit_id": "9000000090",
"source_amount": 100500,
"target_amount": 100479,
"rate_type": "fixed",
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"target_account_no": "00000001",
"status": "processing",
"created": 1718726400
}
Last modified on October 29, 2026
Was this page helpful?
