Payment Intents
A PaymentIntent represents a payment flow. It tracks the lifecycle from creation to completion.
The PaymentIntent object
{
"id": "pi_1a2b3c4d5e",
"object": "payment_intent",
"amount": 10000,
"currency": "xof",
"status": "requires_payment_method",
"payment_method_types": ["mobile_money", "card"],
"description": "Order #1234",
"metadata": {},
"created": 1708300800
}
Create a PaymentIntent
POST /v1/payment-intents
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | ✅ | Amount in smallest currency unit |
currency | string | ✅ | Three-letter ISO currency code |
payment_method_types | string[] | Allowed payment methods | |
description | string | Description for the payment | |
metadata | object | Key-value metadata | |
confirm | boolean | Confirm immediately if true | |
customer | string | Customer ID | |
payment_method | string | Payment method ID |
Retrieve a PaymentIntent
GET /v1/payment-intents/{id}
Confirm a PaymentIntent
POST /v1/payment-intents/{id}/confirm
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_method | string | Payment method ID | |
payment_method_data | object | Inline payment method data |
Cancel a PaymentIntent
POST /v1/payment-intents/{id}/cancel
List PaymentIntents
GET /v1/payment-intents
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (1–100) |
starting_after | string | Pagination cursor |
status | string | Filter by status |
customer | string | Filter by customer |