Skip to main content
POST
Create a PaymentIntent
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 Information

string
required
Customer’s first name.
string
required
Customer’s last name.
string
Customer’s email address. Required if phone is not provided. Used for sending receipts and linking saved payment methods.
string
Customer’s phone number with country prefix (e.g., 237612345678). Required if email is not provided.

Payment Details

string
required
Amount in the smallest currency unit. e.g., “1000” for 1000 XAF. This should be a string to maintain precision.
string
default:"XAF"
Three-letter ISO currency code. e.g., XAF, NGN, USD.
string
required
A brief description of the transaction, often shown on the customer’s bank statement or receipt.
string
required
Your unique identifier for the transaction. This is used for reconciliation and prevents duplicate charges via idempotency.

Configuration

string
default:"merchant"
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.
string
default:"automatic"
How the payment should be confirmed.
  • automatic: (Default) Suitable for hosted checkout pages.
  • manual: Requires a separate server-side confirmation call.
boolean
default:"false"
Set to true to immediately attempt to confirm the PaymentIntent if a payment method is already attached or provided.
array
An array of objects representing line items in order. Each item should have name, price, currency, and quantity.
string
The URL to redirect the customer to after they complete the payment on an external gateway or hosted page.
object
A 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.
boolean
default:"false"
Whether to prompt the customer for a shipping address during the checkout process.
array
The list of payment method types (e.g., ['card', 'mobile_money']) that this PaymentIntent is allowed to use.

Response

string
Unique identifier for the PaymentIntent.
string
String representing the object’s type. Objects of the same type share the same value. Value is payment_intent.
string
Amount intended to be collected, in the smallest currency unit (e.g., “1000” for 1000 XAF).
string
Three-letter ISO currency code.
string
Status of the PaymentIntent: requires_action, processing, succeeded, failed, canceled.
string
The client secret of this PaymentIntent. Used for client-side retrieval and confirmation.
string
PaveWay’s unique public reference for this transaction (e.g., PWG_...).
string
Your unique identifier for the transaction.
string
The URL to redirect your customer to for hosted checkout.
object