Overview
This guide shows how to integrate Secure Payment Pages in a production-ready way. The recommended pattern is:- Create secure payment links with
POST /v2/secure-payments - Store returned
requestIdsin your system - Redirect the payer to the secure page
- Use webhooks as the source of truth for payment status updates
Prerequisites
Before you integrate, make sure you have:- An API key or a Client ID linked to your integration domain
- A webhook endpoint configured in Request Portal
- Your webhook signing secret stored securely on your backend
Quick start
Persist payment mapping in your database
Store at least:
- your internal metadata
- returned
requestIds tokensecurePaymentUrl
Integration pattern: generated URL + redirect
Backend example (Node.js/Express)
server.js
Frontend redirect examples
Payment status updates with webhooks
Use webhook events as your payment status source of truth. Typical mapping:payment.confirmed-> mark order as paidpayment.partial-> mark order as partially paidpayment.failed-> mark order as failed
Webhook handler example (signature verification + reconciliation)
webhook.js
Using destination IDs
Instead of specifyingpayee, invoiceCurrency, and paymentCurrency separately, you can use a destinationId that encodes all three in a single ERC-7828 composite ID:
destinationId can be omitted entirely — the API resolves it from the Client ID configuration.
Crosschain payments on secure pages
Secure payment pages support crosschain payments automatically. When the payer connects a wallet, the page checks balances across supported chains and shows payment options. The payer selects a route, and the page handles the rest. The two-endpoint flow is:GET /v2/secure-payments/:token— returns metadata andpaymentOptionswith balance info per chainGET /v2/secure-payments/:token/pay?wallet=&chain=&token=— returns executable calldata for the selected route
POST /v2/secure-payments/:token/intent with the transaction hash.
See the Secure Payments API Reference for full endpoint details.
Expiry handling
Secure payment links expire after one week by default. If a payer opens an expired link, create a new secure payment link and redirect again.Troubleshooting
401 Unauthorized when creating secure payments
401 Unauthorized when creating secure payments
403 when loading secure payment token
403 when loading secure payment token
- The token may be expired
- Create a fresh secure payment link and retry
409 already completed
409 already completed
- Payment is already completed
- Show a paid/completed state in your app instead of retrying payment
Webhook events not updating order status
Webhook events not updating order status
- Verify HMAC signature validation uses raw request body
- Ensure your endpoint returns
2xxafter successful processing - Confirm your DB lookup maps incoming
requestId/requestIDto stored request IDs
Related docs
Secure Payments API Reference
Full request and response schema details.
Webhooks
Event types, signing, retries, and payload details.
Authentication
API key and Client ID setup.