Initiate a crypto ramp
Initiate an on-ramp (fiat → crypto) or off-ramp (crypto → fiat) conversion. PCX acts as the orchestrator — your users send or receive fiat, and PCX handles the crypto settlement automatically.
On-ramp: the customer pays in fiat using their preferred payment method. Once the fiat collection is confirmed, the crypto is settled directly to the wallet_address you provide. No further action is needed after a successful initiation.
Off-ramp: the customer sends crypto and receives fiat to a registered beneficiary’s bank or mobile money account.
You must fetch a fresh rate from GET /organizations/admin/exchange-rate immediately before presenting it to the user and before submitting this request. The rate must be fetched in the same direction the funds flow — fromCurrency=fiat&toCurrency=crypto for on_ramp, and fromCurrency=crypto&toCurrency=fiat for off_ramp. The client_rate you send is validated against the current live rate for that direction — if it has drifted more than 0.5% (or was fetched in the wrong direction), the request is rejected with RATE_STALE and you must re-fetch.
Headers
Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.
"Bearer eyJraWQ..."
API key for server-to-server flows, or the literal string NONE when authenticating via JWT.
"pcx_abc123_xxxx"
Body
on_ramp — customer pays fiat, receives crypto to wallet_address. off_ramp — customer sends crypto, receives fiat to beneficiary.
on_ramp, off_ramp ID of the initiating user.
Your organisation ID.
ISO 4217 fiat currency code (e.g. NGN, KES, GHS).
"NGN"
Amount in fiat currency — what the customer pays (on-ramp) or receives (off-ramp).
10000
The rate you fetched from GET /organizations/admin/exchange-rate and showed to the user. Validated against the current live rate on submission — must be within 0.5% or the request is rejected with RATE_STALE.
0.00000645
Crypto asset code (e.g. USDC, USDT, EURC, BTC, ETH).
"USDC"
Blockchain network (e.g. ethereum, polygon, tron).
"ethereum"
Fiat payment method.
mobile_money, bank_transfer ISO alpha-2 country code of the fiat side (e.g. NG, KE).
"NG"
Use institution for business customers. Requires business_id and business_name.
retail, institution Required when customer_type is institution.
Required when customer_type is institution.
On-ramp only. The destination crypto wallet address. PCX settles crypto here directly after fiat collection.
"0xABC123...your-wallet-address"
Required for mobile_money payment method.
On-ramp bank transfer — payer's source bank account.
Off-ramp only. ID of the registered beneficiary receiving the fiat payout.
Off-ramp only. Full name of the beneficiary.
Off-ramp only. Destination routing details for the fiat payout.
Arbitrary key-value pairs included in webhook payloads.