Environments
The path is case-insensitive.
Before you start
- A public key. PayChoice provides it when onboarding completes. It identifies your merchant (or, for partners, your agency).
- A registered webhook. The final transaction result is delivered there; it is the only message you should fulfil orders from. See Webhooks.
Embed the Widget
Load the payment page in an iframe with the parameters below as a query string. URL-encode the values, in particularPublicKey.
decimal
required
Transaction amount, e.g.
10.00. Must be greater than 0. Charged as-is in the merchant’s currency; there is no currency parameter.string
required
Your reference for the transaction, e.g.
INV-10101534. It should be unique per transaction. It becomes the charge’s reference and is echoed back in the postMessage and in the webhook, so use it to match the result to your order.string
required
Public key provided during onboarding. Can be a merchant-level or agency-level key.
uuid
Required when the public key covers more than one merchant (an agency or agency-group key), to identify which merchant the payment belongs to.
string
default:"all"
card, bank or all. Lowercase. Restricts which payment types the customer can choose.boolean
true keeps the Pay button disabled until your page posts { "type": "pc-submit-status", "data": true } into the iframe. Any other value posted later disables it again. See Messages from your page to the Widget.string
Free-text value passed through to the charge as
meta_data_reference. Silently dropped if longer than 2048 characters. Not included in the webhook payload.Payment flow
1
The customer pays
They see the payment methods enabled for your merchant account, enter their details, accept the PayChoice terms and click Confirm and Pay.
2
The Widget creates the charge
It shows the result to the customer and sends a
postMessage to your page so you can update your own UI.3
The webhook delivers the final result
Every Widget charge triggers the merchant webhook with the standard
charge payload. Match on charge.reference (your MerchantReference), check charge.status_code, and verify the signature before acting.Bank payments are Processing (status code 9) at submit time; the final outcome comes only through the webhook.Messages from the Widget to your page
All messages are sent towindow.parent. Always check event.origin against the Widget host you embedded.
- Charge completed
- Page could not load
- Submit errors
Sent whenever a charge was created, whatever its status (Approved, Dishonoured, Processing …):
data.datais the charge object.data.data.idis the charge ID and matchescharge.idin the webhook.data.TransactionReferenceis the Widget’s own session identifier. It does not appear in the webhook; match onreferenceoridinstead.status_codeis a string here and a number in some API responses — compare loosely or normalise.
Listener
Messages from your page to the Widget
Only used withRequireConfirm=true:
Next
- Brand settings to match the Widget to your site.
- Webhooks to receive the result.
- Create Token page to capture a payment method without charging it.

