Skip to main content

Request examples

Examples

Purchase (one-step, card, with billing address)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-656c-...-7e11ae873370",
"operation": "purchase",
"methods": ["card"],
"session_expiry": 60,
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "USD",
"description": "Important gift"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"expiry_url": "https://example.com/expiry",
"url_target": "_blank",
"customer": {
"name": "John Doe",
"email": "[email protected]"
},
"billing_address": {
"country": "US",
"state": "CA",
"city": "Los Angeles",
"address": "Moor Building 35274",
"zip": "123456",
"phone": "347771112233"
},
"req_token": true,
"hash": "<sha1(md5(uppercase(order.number+amount+currency+description+password)))>"
}'
Debit (charge with a saved token)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "debit",
"methods": ["card"],
"card_token": ["f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97075ee5e539bb662fceff4dc1"],
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "USD",
"description": "Important gift"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"customer": { "name": "John Doe", "email": "[email protected]" },
"hash": "<auth signature>"
}'
Transfer (P2P)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "transfer",
"order": {
"number": "order-1234",
"amount": "100.55",
"currency": "USD",
"description": "P2P transfer"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"customer": { "name": "John Doe", "email": "[email protected]" },
"payee": { "name": "Jane Doe", "email": "[email protected]" },
"billing_address": { "country": "US", "state": "CA", "city": "Los Angeles", "address": "Moor Building 35274", "zip": "94538", "phone": "0987654321" },
"payee_billing_address": { "country": "US", "state": "NY", "city": "New York", "address": "123 Park Ave", "zip": "10001", "phone": "0987654321" },
"hash": "<auth signature>"
}'
Credit (payout to a card)
curl -X POST "$CHECKOUT_URL/api/v1/session" \
-H "Content-Type: application/json" \
-d '{
"merchant_key": "27106696-...-7e11ae873370",
"operation": "credit",
"methods": ["airtel"],
"order": {
"number": "order-1234",
"amount": "100.55",
"currency": "USD",
"description": "Reward payout"
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"payee_billing_address": { "country": "US", "phone": "347771112255" },
"hash": "<auth signature>"
}'