Skip to content

PayUI

PayUI is the hosted checkout UI that can be embedded in your checkout experience, designed for merchants who want a fast, low‑risk way to accept payments without handling sensitive card data directly. It exists to reduce PCI scope, speed up integration, and improve conversion by delivering a modern, mobile‑friendly payment experience that you can still customize and control.

Use PayUI when you want a single drop‑in form that supports cards today (with digital wallets coming soon), works across devices, and keeps payment data inside a secure iframe while your application focuses on the order and customer experience.

Requirements

Browser Support

Desktop Browsers:

  • Chrome 60+
  • Safari 17+
  • Firefox 60+
  • Edge 79+

Mobile Browsers:

  • iOS Safari 17+
  • Android Chrome 60+
  • Samsung Browser 10+

TLS 1.2 must be supported by the browser.

Before You Start

To integrate PayUI, you need:

  • Server-side access to the API to create Payment Requests and mint One‑Time Tokens (do not call /tokens from the browser).
  • Card Not Present API Capability enabled on your merchant account during onboarding.
  • Apple Pay domain registration if you plan to offer Apple Pay when wallets are available (see PayUI Digital Wallets).

Script Include

Sandbox:

<script src="https://sandbox.hosted.gpaunz.com/static/pay/js/payui.js"></script>

Production:

<script src="https://hosted.gpaunz.com/static/pay/js/payui.js"></script>

Note: The script URL is version-agnostic; specify the version in the configuration object.

Integration Summary

Integrating PayUI involves following main steps:

Steps (quick reference)

StepWhereWhatAPI / EventOutput
1BackendCreate Payment RequestPOST /paymentrequestspaymentRequestId
2BackendGenerate One‑Time Token (OTT), scope=payuiPOST /tokenstoken (OTT)
3FrontendInclude script + initialise PayUIGPAUNZ.PayUI.initialise(config)PayUI ready
4CustomerEnter details and submit paymentPayUI hosted iframeAttempt submitted
5FrontendShow immediate processing resultprocess eventProcessing outcome
6aBackend (recommended)Receive final state and update databaseWebhooks: transactions + payment requestsFinal state
6bBackend (fallback)Fetch final state and update databaseGET /paymentrequests/{id}, then GET /transactions/{id}Final state

Transactions & refunds

  • PayUI supports standard once-off transactions “purchase” or “authorize”.
  • When it is time to capture an authorized transaction, use the standard API: POST /transactions/{id}/capture.
  • Refunds follow the standard API flow: POST /transactions/{id}/refunds.

Customisation (visual only)

  • Use ui.theme for light/dark modes.
  • Use ui.variables to customise colors, spacing, and typography.
  • Customisation is visual only (no field order or layout changes).
  • Only system fonts are supported; external web fonts are not loaded.

For the full list of variables and examples, see PayUI Customisation.

For the full step-by-step integration, architecture diagrams, and event/error handling, see the Integration Guide: PayUI Integration or, for a quick start refer to PayUI Examples.

Features Support

PayUI Feature Matrix

A snapshot of current and upcoming PayUI capabilities.

FeatureStatusNotes
CNP — Once-OffSupportedOnce-off customer-initiated payments processed via PayUI
CNP — SurchargingSupportedApplies if merchant has surcharging enabled
Wallet — Apple PayComing soonBrowser/platform dependent, Requires domain registration to support Apple Pay via GP API
Wallet — Google PayComing soonBrowser/platform dependent
Wallet — SurchargingComing soonPlanned support for surcharging on wallet transactions
CNP — Card-on-fileComing soonCard stored during transaction from PayUI for use in future for recurring transactions (requires consent + token handling)
CNP — 3DSComing soon3DS integration planned for stronger authentication

Terms

TermDefinitionNotes
CNPCard Not PresentTransactions where the card is not physically presented (online/in-app)
3DS3D SecureStrong customer authentication protocol