Hosted page
A complete card page hosted by Card Vault. Your site links to it and receives the result on your return URL.
4242 4242 4242 4242 (approve), 4000 0000 0000 0002
(decline) or 4000 0000 0000 0069 (card not accepted), with any future
expiry and any CVC.
The hosted page is a complete card form served by Card Vault. Your site links to it (or redirects to it); the cardholder enters the card there, and Card Vault sends the browser back to your return URL with the outcome.
What comes back
On success the browser returns to your return URL with
?status=success&token=<signed result>; on failure,
?status=failure. Your server verifies the signed result before trusting
it. In this preview the return URL is a docs page and the token is a plain
preview_ reference -- nothing is signed, stored or charged.
Hosted pages are vault-only: they save the card, and your server charges the token afterwards. Set-up is described in Hosted card iframes.
The signed result
On a live interface token is a JWT signed with HS256 that
expires 5 minutes after it is issued. Its claims describe the saved card; no card number
or security code is ever included:
{
"status": "success",
"tok": "...", // the card token your server stores and charges
"cid": "...", // card id
"brand": "Visa",
"bid": 4, // brand code
"last4": "4242",
"expiry": "...",
"ref": "...", // your reference, echoed back
"corr": "...", // correlation id for support
"iss": "cardvault", // issuer -- verify this
"iat": 1712345378,
"exp": 1712345678 // 5 minutes after issue
}
- Get your Webhook Verification Key from the console: Settings → your Card Request interface → Webhook Verification Key (a 64-character hex string, one per account). The same key verifies the hosted return token and the card request webhook, and regenerating it changes both.
- Hex-decode it to 32 raw bytes and verify the JWT's HS256 signature with those bytes as the HMAC key.
- Confirm
issiscardvaultand the token is unexpired, then confirmrefmatches the checkout you started.
Referer header. On your return page:
- Send
Referrer-Policy: no-referrer(orsame-origin) so the URL is not passed to third-party scripts, images or fonts. - Verify the token on your server, never in the browser, and store the card token from the verified claims.
- Keep the
tokenquery value out of your access and analytics logs, and redirect to a clean URL once it is verified. - Treat the
card.vaultedwebhook as the record of truth; the redirect is how the cardholder gets back to your site.