Creates a PaymentIntent object. After the PaymentIntent is created, attach a payment method and confirm to continue the payment.
Authentication
Include your Secret Key in the Authorization header as a Bearer token.
Request Body
Customer’s email address. Required if phone is not provided. Used for sending receipts and linking saved payment methods.
Customer’s phone number with country prefix (e.g., 237612345678). Required if email is not provided.
Payment Details
Amount in the smallest currency unit. e.g., “1000” for 1000 XAF. This should be a string to maintain precision.
Three-letter ISO currency code. e.g., XAF, NGN, USD.
A brief description of the transaction, often shown on the customer’s bank statement or receipt.
Your unique identifier for the transaction. This is used for reconciliation and prevents duplicate charges via idempotency.
Configuration
Specifies who bears the transaction fees.
merchant: (Default) Fees are deducted from the payout amount you receive. The customer pays exactly the amount.
customer: Fees are added on top of the amount. The customer pays amount + fees, and you receive the full amount.
confirmation_method
string
default:"automatic"
How the payment should be confirmed.
automatic: (Default) Suitable for hosted checkout pages.
manual: Requires a separate server-side confirmation call.
Set to true to immediately attempt to confirm the PaymentIntent if a payment method is already attached or provided.
An array of objects representing line items in the order. Each item should have name, price, currency, and quantity.
The URL to redirect the customer to after they complete the payment on a external gateway or hosted page.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Whether to prompt the customer for a shipping address during the checkout process.
The list of payment method types (e.g., ['card', 'mobile_money']) that this PaymentIntent is allowed to use.
Response
Unique identifier for the PaymentIntent.
String representing the object’s type. Objects of the same type share the same value. Value is payment_intent.
Amount intended to be collected, in the smallest currency unit (e.g., “1000” for 1000 XAF).
Three-letter ISO currency code.
Status of the PaymentIntent: requires_action, processing, succeeded, failed, canceled.
The client secret of this PaymentIntent. Used for client-side retrieval and confirmation.
PaveWay’s unique public reference for this transaction (e.g., PWG_...).
Your unique identifier for the transaction.
The URL to redirect your customer to for hosted checkout.
{
"status_code": 200,
"response_type": "success",
"data": {
"id": "695e7cdf77f104409c0e5760",
"object": "payment_intent",
"amount": "1000",
"currency": "XAF",
"status": "requires_action",
"client_secret": "pi_695e7cdf..._secret_...",
"payment_ref": "PWG_d4e9cd66d451",
"checkout_url": "https://checkout.pavewaygroup.com/initpay/695e7cdf77f104409c0e5760?client_secret=...",
"customer": {
"firstname": "John",
"lastname": "Doe",
"email": "john@example.com"
},
"metadata": {}
}
}