// Card entry templates

Hosted page

A complete card page hosted by Card Vault. Your site links to it and receives the result on your return URL.

Preview mode -- nothing you type is stored, verified or charged. Try 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.

Open the hosted page

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:

TOKEN PAYLOADJSON
{
  "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
}
  1. 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.
  2. Hex-decode it to 32 raw bytes and verify the JWT's HS256 signature with those bytes as the HMAC key.
  3. Confirm iss is cardvault and the token is unexpired, then confirm ref matches the checkout you started.
The return URL is visible. The token is signed, not encrypted: anyone who sees the URL can read its claims, and URLs end up in browser history, server and analytics logs, and the Referer header. On your return page:
  • Send Referrer-Policy: no-referrer (or same-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 token query value out of your access and analytics logs, and redirect to a clean URL once it is verified.
  • Treat the card.vaulted webhook as the record of truth; the redirect is how the cardholder gets back to your site.