COPYandPAY Integration Guide
A practical guide for preparing a checkout, rendering the hosted payment widget, and verifying payment status using Zimswitch Online.
Three steps to a verified payment
Use COPYandPAY when you want hosted card entry with lower PCI scope and server-side status confirmation.
Prepare the Checkout
Your server sends amount, currency, payment type and entity ID to the gateway. The gateway returns a checkout ID.
Create the Payment Form
Load paymentWidgets.js with the checkout ID and render the hosted widget. The shopper enters payment details securely.
Get Payment Status
After payment, verify the result server-side using resourcePath before fulfilling goods or services.
Implementation progress
Never expose bearer tokens in frontend JavaScript. Prepare checkout and verify status on your server.
Prepare the checkout
Test your UAT credentials safely — your server requests a checkout ID from the gateway.
Create the payment form
Add the widget script and form to your page, then let the shopper enter payment details in hosted fields.
Confirm the final outcome server-side
After the shopper pays, verify the result using resourcePath before fulfilling goods or services.
Implementation snippets
1. Prepare checkout
2. Payment widget
3. Verify status
Run prepare + verify on your server. Do not ship bearer tokens to browsers.