Skip to main content
POST
Initiate a payment

Headers

Authorization
string
default:NONE
required

Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.

Example:

"Bearer eyJraWQ..."

X-Api-Key
string
default:NONE
required

API key for server-to-server flows, or the literal string NONE when authenticating via JWT.

Example:

"pcx_abc123_xxxx"

Body

application/json
amount
number<float>
required

Source amount

target_amount
number<float>
required

Destination amount. For same-currency flows must equal amount. For cross-currency flows must match amount × rate from the locked org_rate_id.

currency
string
required

ISO 4217 source currency

Example:

"NGN"

target_currency
string
required

ISO 4217 destination currency. Must equal currency for single-currency flows.

Example:

"KES"

payment_method
enum<string>
required
Available options:
mobile_money,
bank_transfer,
card
direction
enum<string>
required
Available options:
payin,
payout
user_id
string

Injected automatically from the authenticated API key or session — you do not need to include it.

org_id
string

Injected automatically from the authenticated API key or session — you do not need to include it.

country
string

Optional ISO alpha-2 country code of the payin origin

Example:

"NG"

org_rate_id
string | null

Rate ID from the exchange rate lookup. Required when currency ≠ target_currency.

client_reference
string | null

Your own idempotency reference for this transaction.

description
string | null
payer_details
object

Required for payin flows.

mobile_money_details
object | null

Required when payment_method is mobile_money.

card_details
object | null

Required when payment_method is card.

bank_details
object | null

Payer's source bank account. Required for bank transfer flows.

bank_account
object | null

Destination bank account. Required for bank transfer flows.

beneficiary_id
string | null

Required for payout flows.

return_url
string<uri> | null

URL the customer is redirected back to after completing payment. When next_action is redirect, the hosted checkout carries this URL through the flow and sends the customer to it once checkout finishes. PCX appends status (completed or failed) and reference (your client_reference, or a payment ID prefix) query parameters to this URL on the return redirect.

metadata
object | null

Response

Payment initiated

statusCode
integer
Example:

200

response
object

When the provider returns funding instructions (for example a bank transfer flow), the instruction fields are merged into this object at the top level alongside the fields below.