Skip to main content
Before rendering the iFrame, your platform must initiate a payment with PCX. PCX returns a redirect_url containing base64-encoded payment data. Pass this URL to your front end to use as the iFrame src.

Why platform-side initiation matters

Payment parameters — amount, currency, payer details — are set on your platform and sent directly to PCX. The returned redirect_url carries an encoded reference to the payment record. This means the payer cannot modify the payment amount or currency before the iFrame loads.

Initiate a payment

Call the PCX payment initiation endpoint from your platform:
Response:
Use response.redirect_url as the src of the iFrame. Do not construct this URL yourself — always use the value returned by PCX.

Request headers

Both headers must always be present. Set whichever one you are not using to the literal string NONE.

Request fields


Response fields


The redirect URL

The redirect_url contains a base64-encoded ref parameter with the payment identifiers:
Decoded ref structure:
Do not modify the ref parameter. The payment details are validated against the database when the payment is processed. Tampering with the parameter will cause the payment to fail.
Do not expose your API key in client-side code. The payment initiation call must always originate from your platform.