Skip to main content
POST
/
payment
/
intents
/
{paymentIntentId}
/
attempt
Start a payment attempt
curl --request POST \
  --url https://api.orqex.com/v1/payment/intents/{paymentIntentId}/attempt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "method_code": "momo_mtn",
  "country": "<string>",
  "phone": {
    "number": "<string>",
    "country": "<string>"
  },
  "currency": "<string>"
}
'
{
  "message": "<string>",
  "data": {
    "id": "TRX1A2B3C4D",
    "amount": {
      "value": 5000,
      "formatted": "50.00 XOF",
      "short": "50 XOF",
      "currency": "XOF"
    },
    "customer": {
      "id": "cus_abc123",
      "first_name": "<string>",
      "last_name": "<string>",
      "email": "[email protected]",
      "avatar_url": "<string>"
    },
    "description": "<string>",
    "return_url": "<string>",
    "webhook_url": "<string>",
    "statement_descriptor": "<string>",
    "receipt_email": "<string>",
    "metadata": {},
    "active_attempt": {
      "id": "<string>",
      "method": {
        "value": "momo_mtn",
        "label": "MTN Mobile Money",
        "description": "<string>",
        "icon_url": "<string>"
      },
      "amount": {
        "value": 5000,
        "formatted": "50.00 XOF",
        "short": "50 XOF",
        "currency": "XOF"
      },
      "exchange_rate": 123,
      "correction_rate": 123,
      "gateway": {
        "transaction": {
          "id": "<string>",
          "reference": "<string>",
          "external_id": "<string>",
          "status": "<string>"
        }
      },
      "next_action": {},
      "failure": {
        "code": "<string>",
        "message": "<string>"
      },
      "is_fallback": true,
      "completed_at": "<string>",
      "failed_at": "<string>",
      "created_at": "<string>"
    },
    "completed_at": "<string>",
    "expires_at": "<string>",
    "created_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Project secret key, e.g. sk_live_..., sent as Authorization: Bearer sk_....

Headers

X-Idempotency-Key
string

Safely retry a write without duplicating it. 8-128 chars.

Required string length: 8 - 128

Path Parameters

paymentIntentId
string
required

Public payment intent id, e.g. TRX....

Body

application/json
method_code
string
required

Payment method code to attempt (e.g. momo_mtn).

Example:

"momo_mtn"

country
string
required

Country to route the attempt to, ISO 3166-1 alpha-2 (e.g. CI).

phone
object
required
currency
string

Optional currency override (ISO 4217). Defaults to the intent's currency.

Required string length: 3

Response

Created

message
string
data
object