POSTMerchant key required
Initialize a routed collection
/api/v1/initiateInitiate Checkout
Request body
11 fieldsFieldTypeRequiredDescriptionExample
customerCustomerYesNo description provided.{"email":"buyer@example.com","name":"string"}
customer.emailstring (email)YesNo description provided.buyer@example.com
customer.namestringNoNo description provided.string
amountnumberYesNo description provided.25000
currencyNGN | KES | GES | XAF | XOF | EGP | TZS | BTC | ETH | USDT | SOLYesCurrency in lower caseNGN
referencestringYesNo description provided.ORD_1001
redirect_urlstringNoNo description provided.https://merchant.example.com/callback
notification_urlstringNoNo description provided.https://merchant.example.com/callback
narrationstringNoNo description provided.string
modecard | bank_transfer | crypto | mobile_moneyNoNo description provided.card
metadataobjectNoNo description provided.{}
Request payload
JSON{
"customer": {
"email": "buyer@example.com",
"name": "string"
},
"amount": 25000,
"currency": "NGN",
"reference": "ORD_1001",
"redirect_url": "https://merchant.example.com/callback",
"notification_url": "https://merchant.example.com/callback",
"narration": "string",
"mode": "card",
"metadata": {}
}cURL
Ready to copycurl --request POST \
--url "https://routexapi.xoroai.cloud/api/v1/initiate" \
--header "Authorization: Bearer ROUTEX_TEST_xxx" \
--header "Content-Type: application/json" \
--data '{
"customer": {
"email": "buyer@example.com",
"name": "string"
},
"amount": 25000,
"currency": "NGN",
"reference": "ORD_1001",
"redirect_url": "https://merchant.example.com/callback",
"notification_url": "https://merchant.example.com/callback",
"narration": "string",
"mode": "card",
"metadata": {}
}'Responses
5 variantsHTTP 200HTTP 200
Successful Response
{
"status": true,
"message": "Charge created successfully",
"reference": "ORD_1001",
"checkout_url": "https://merchant.example.com/callback",
"selected_gateway": "string",
"gateway_reference": "ORD_1001",
"routing": {
"decision_id": "string",
"selection_reason": "highest score among eligible gateways",
"fallback_order": [
"string"
],
"score_breakdown": {}
}
}HTTP 400Duplicate reference
Bad request, e.g., duplicate transaction reference
{
"detail": "Transaction reference not unique for merchant"
}HTTP 403Invalid token
Invalid payment secret key
{
"detail": "Invalid payment secret key provided"
}HTTP 404Merchant not found
Merchant not found
{
"detail": "Merchant not found"
}HTTP 422HTTP 422
Validation Error
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}