Security
HTTPS is required
All requests to the GlobalPay API and all pages where payment data is entered or processed must use HTTPS. Unencrypted connections are not allowed in Production.
Storing credentials
- Never store
OAuth Passwordin code or in a repository. - Use environment variables (
ENV) or a secrets manager (Vault, AWS Secrets Manager, etc.). - Keep Sandbox and Production credentials separate — they must never be mixed.
Access tokens
- A JWT token is valid for 1 hour. Do not cache it longer.
- Use
refreshTokento refresh without re-authenticating. - Do not expose
accessTokento the frontend — call the API only from the backend.
Webhook signatures
If GlobalPay sends a webhook with a signature, always verify the headers:
X-GlobalPay-Signature: <HMAC signature of the request body>
X-GlobalPay-Timestamp: <send time>
Verification algorithm:
- Build the string
timestamp + "." + body - Compute HMAC-SHA256 using your webhook secret
- Compare with
X-GlobalPay-Signature
Reject requests where timestamp is older than 5 minutes.
externalId — duplicate protection
Always pass a unique externalId for each payment. GlobalPay rejects duplicate payments with the same externalId (code 1013). This protects against double charges on network errors and retries.
PCI DSS
GlobalPay is a certified provider that handles the storage and processing of card data. When using Checkout, you are completely out of PCI DSS scope — card data never passes through your servers.
For Back2Back (Gateway) integration, card data is passed via the GlobalPay Cards API — make sure your site uses HTTPS and never logs card data.