Initiate Off-Ramp Checkout
Create a hosted off-ramp checkout session and get a redirect URL.
Last updated
curl -X POST https://ramp-api.ivorypay.io/api/v1/offramp/checkout/initiate \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "amina@example.com",
"blockchain": "POLYGON",
"reference": "550e8400-e29b-41d4-a716-446655440000",
"token": "USDT",
"fiatCurrency": "UGX",
"cryptoAmount": 10,
"businessFeeInCrypto": 0
}'const response = await fetch(
"https://ramp-api.ivorypay.io/api/v1/offramp/checkout/initiate",
{
method: "POST",
headers: {
Authorization: "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "amina@example.com",
blockchain: "POLYGON",
reference: crypto.randomUUID(),
token: "USDT",
fiatCurrency: "UGX",
cryptoAmount: 10,
businessFeeInCrypto: 0,
}),
},
);
const { data } = await response.json();
window.location.href = data.checkoutUrl;import requests, uuid
response = requests.post(
"https://ramp-api.ivorypay.io/api/v1/offramp/checkout/initiate",
headers={
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
json={
"email": "amina@example.com",
"blockchain": "POLYGON",
"reference": str(uuid.uuid4()),
"token": "USDT",
"fiatCurrency": "UGX",
"cryptoAmount": 10,
"businessFeeInCrypto": 0,
},
)
print(response.json()["data"]["checkoutUrl"]){
"success": true,
"message": "Query successful",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"checkoutUrl": "https://checkout.ivorypay.io/offramp/550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING"
}
}