Initiate swap (step 1/2)
curl --request POST \
--url https://api.sendpadi.com/api/v1/merchant/crypto/swap \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"quotationId": "qt_swap_001",
"fromCurrency": "usdt",
"toCurrency": "btc",
"fromAmount": 100
}
'const options = {
method: 'POST',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quotationId: 'qt_swap_001',
fromCurrency: 'usdt',
toCurrency: 'btc',
fromAmount: 100
})
};
fetch('https://api.sendpadi.com/api/v1/merchant/crypto/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendpadi.com/api/v1/merchant/crypto/swap"
payload = {
"quotationId": "qt_swap_001",
"fromCurrency": "usdt",
"toCurrency": "btc",
"fromAmount": 100
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"Idempotency-Key": "<idempotency-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "OK",
"data": {
"intentId": "intent_swap",
"operation": "swap",
"confirmationToken": "tok_secret_xyz",
"status": "pending_confirmation"
}
}Crypto
Initiate swap (step 1/2)
Start a swap using a quotation id. Scope: crypto:write. Requires Idempotency-Key.
POST
/
api
/
v1
/
merchant
/
crypto
/
swap
Initiate swap (step 1/2)
curl --request POST \
--url https://api.sendpadi.com/api/v1/merchant/crypto/swap \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"quotationId": "qt_swap_001",
"fromCurrency": "usdt",
"toCurrency": "btc",
"fromAmount": 100
}
'const options = {
method: 'POST',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>',
'Idempotency-Key': '<idempotency-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quotationId: 'qt_swap_001',
fromCurrency: 'usdt',
toCurrency: 'btc',
fromAmount: 100
})
};
fetch('https://api.sendpadi.com/api/v1/merchant/crypto/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendpadi.com/api/v1/merchant/crypto/swap"
payload = {
"quotationId": "qt_swap_001",
"fromCurrency": "usdt",
"toCurrency": "btc",
"fromAmount": 100
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>",
"Idempotency-Key": "<idempotency-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "OK",
"data": {
"intentId": "intent_swap",
"operation": "swap",
"confirmationToken": "tok_secret_xyz",
"status": "pending_confirmation"
}
}This product may be disabled on your deployment. Contact support@sendpadi.com if calls return unavailable.
Live API key required for this endpoint.
Authorizations
API key id (sp_test_… / sp_live_…)
Headers
Unix time in seconds
HMAC-SHA256 signature
UUID. Required on money-moving writes.
Body
application/json
Response
200 - application/json
OK
The response is of type object.

