Skip to main content
POST
https://api-sandbox.pavewaygroup.com/v1
/
payment-intents
Create a PaymentIntent
curl --request POST \
  --url https://api-sandbox.pavewaygroup.com/v1/payment-intents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstname": "<string>",
  "lastname": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "amount": "<string>",
  "currency": "<string>",
  "description": "<string>",
  "merchant_reference": "<string>",
  "fee_bearer": "<string>",
  "confirmation_method": "<string>",
  "confirm": true,
  "items": [
    {}
  ],
  "redirect_url": "<string>",
  "metadata": {},
  "collect_shipping_address": true,
  "payment_method_types": [
    {}
  ]
}
'
{
  "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": {}
  }
}
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

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

Payment Details

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

Configuration

fee_bearer
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.
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.
confirm
boolean
default:"false"
Set to true to immediately attempt to confirm the PaymentIntent if a payment method is already attached or provided.
items
array
An array of objects representing line items in the order. Each item should have name, price, currency, and quantity.
redirect_url
string
The URL to redirect the customer to after they complete the payment on a external gateway or hosted page.
metadata
object
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.
collect_shipping_address
boolean
default:"false"
Whether to prompt the customer for a shipping address during the checkout process.
payment_method_types
array
The list of payment method types (e.g., ['card', 'mobile_money']) that this PaymentIntent is allowed to use.

Response

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