Skip to main content

Payment Intents

A PaymentIntent represents a payment flow. It tracks the lifecycle from creation to completion.

Current implemented route family: api/v1/payment-intents

The PaymentIntent object

{
"id": "pi_1a2b3c4d5e",
"object": "payment_intent",
"created": 1708300800,
"livemode": false,
"amount": 10000,
"currency": "XOF",
"status": "requires_payment_method",
"description": "Order #1234",
"metadata": {
"order_id": "order_123"
},
"next_action": null,
"customer": "cus_123"
}

Create a PaymentIntent

POST /api/v1/payment-intents
ParameterTypeRequiredDescription
amountinteger:int64YesAmount in the smallest currency unit.
currencystringYesThree-letter ISO currency code, for example XOF.
transaction_countrystringYesISO 3166-1 alpha-2 transaction country code, for example SN, CI, or BJ.
payer_countrystringNoISO 3166-1 alpha-2 payer country code when different or known.
rail_countrystringNoISO 3166-1 alpha-2 rail/operator country code.
descriptionstringNoHuman-readable payment description.
metadataobject<string,string>NoBusiness metadata. Keys and values must be strings.
customerstringNoPublic ID of an existing customer.
customer_emailstringNoCustomer email used to find or create a customer.
customer_phonestringNoCustomer phone used to find or create a customer.
{
"amount": 10000,
"currency": "XOF",
"transaction_country": "SN",
"description": "Order #1234",
"metadata": {
"order_id": "order_123",
"checkout_session_id": "cs_123"
},
"customer_email": "customer@example.com"
}

Country Parameters

transaction_country is required. It defines the primary country context used by country/currency eligibility rules and rail selection.

payer_country and rail_country are optional. Use them only when the payer country or payment rail country must be explicit. All three values are two-character ISO 3166-1 alpha-2 codes.

Metadata

metadata is an object&lt;string,string&gt; for business references such as order_id, cart_id, checkout_session_id, or source.

Non-string values are not returned on the PaymentIntent object. Do not use the reserved keys Description, FailureReason, Environment, or the prefixes country_context., internal., and technical.: they are reserved for platform data and filtered from responses.

Retrieve a PaymentIntent

GET /api/v1/payment-intents/{id}
ParameterTypeRequiredDescription
idstringYesPublic PaymentIntent ID.

Update a PaymentIntent

PATCH /api/v1/payment-intents/{id}
ParameterTypeRequiredDescription
idstringYesPublic PaymentIntent ID.
descriptionstringNoNew description.
metadataobject<string,string>NoMetadata keys to add or replace.

Confirm a PaymentIntent

POST /api/v1/payment-intents/{id}/confirm
ParameterTypeRequiredDescription
idstringYesPublic PaymentIntent ID.
payment_method.typestringYesMethod type, for example mobile_money or card.
payment_method.mobile_money.countrystringMobile moneyISO 3166-1 alpha-2 country code. Must match the PaymentIntent transaction_country.
payment_method.mobile_money.operatorstringMobile moneyMobile money operator, for example orange_money, wave, or mtn.
payment_method.mobile_money.msisdnstringMobile moneyPayer mobile money number.
payment_method.mobile_money.preferred_flowstringNoPreferred flow when supported by the provider.
payment_method.card.tokenstringCardCard token.
return_urlstringNoReturn URL for redirected flows.
{
"payment_method": {
"type": "mobile_money",
"mobile_money": {
"country": "SN",
"operator": "orange_money",
"msisdn": "+221770000000"
}
}
}

Cancel a PaymentIntent

POST /api/v1/payment-intents/{id}/cancel
ParameterTypeRequiredDescription
idstringYesPublic PaymentIntent ID.

List PaymentIntents

GET /api/v1/payment-intents
ParameterTypeRequiredDescription
limitinteger:int32NoNumber of results requested.