Initiating a payment is two steps: create a payment intent, then start an attempt
with a method and country. You can also do both in a single call.
1. Create a payment intent
curl https://api.orqex.com/v1/payment/intents \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: order-1024" \
-d '{
"amount": 50,
"currency": "XOF",
"description": "Order #1024",
"webhook_url": "https://shop.example.com/webhooks/orqex",
"customer": { "email": "[email protected]", "first_name": "Ama", "last_name": "Mensah" }
}'
Request body
Amount to charge, in major units (e.g. 50 for 50 XOF). Minimum 1.
Three-letter ISO 4217 currency code, uppercase (e.g. XOF).
Short description of what the customer is paying for.
The customer being charged.
Customer email; receipts go here.
Customer country, ISO 3166-1 alpha-2.
URL Orqex POSTs this payment’s events to.
URL the customer is returned to after the payment.
Up to 10 arbitrary key/value pairs, returned as-is.
Optionally start a payment in the same call.
Method to attempt (e.g. momo_mtn).
Country to route to, ISO 3166-1 alpha-2.
Payer phone (number, country) for mobile money.
2. Start an attempt
Pick a method and country. For mobile money, include the payer’s phone.
curl https://api.orqex.com/v1/payment/intents/TRX123/attempt \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"method_code": "momo_mtn",
"country": "CI",
"phone": { "number": "0700000000", "country": "CI" }
}'
Then resolve the attempt’s next_action (OTP, redirect, QR, approval) — see
Core concepts. Once the customer has acted,
verify the payment.
Prefer not to build a payment UI? Use the hosted checkout
instead — Orqex drives method selection and next actions for you.