Skip to main content
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
number
required
Amount to charge, in major units (e.g. 50 for 50 XOF). Minimum 1.
currency
string
required
Three-letter ISO 4217 currency code, uppercase (e.g. XOF).
description
string
required
Short description of what the customer is paying for.
customer
object
required
The customer being charged.
webhook_url
string
URL Orqex POSTs this payment’s events to.
return_url
string
URL the customer is returned to after the payment.
metadata
object
Up to 10 arbitrary key/value pairs, returned as-is.
attempt
object
Optionally start a payment in the same call.

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.