Card Requests
Invite a cardholder to submit their card through a secure hosted form -- by email or SMS -- and get a vaulted card profile back when they do.
How it works
- You create a request with the recipient's email and/or SMS number and a time-to-live.
- The cardholder receives a link to a Card Vault-hosted submission form. Their card data goes straight to the vault -- it never touches your systems.
- When they submit, the request is marked completed and linked to the new card profile. The
request.completedwebhook can notify you the moment it happens.
POST /v1/card-requests
{
"name": "Jamie Cardholder",
"email": "jamie@example.com", // email and/or sms
"sms": "5555550100",
"message": "For your March booking.",
"segmentId": 3, // optional; targets a segment
"usageId": null, // optional; card usage for the vaulted card
"ttl": 48 // hours the link stays valid (1-255)
}
The response includes the request's id and its
requestToken -- the short token embedded in the submission URL.
Nothing is sent until you call dispatch; resend only
re-activates an expired request, so follow it with dispatch.
GET /v1/card-requests
Lists requests for your account. Query parameters:
segmentId-- filter by segmentcompleted--truecompleted only,falsepending onlyexpired--trueexpired only,falseactive onlypage(default 1),pageSize(default 50, max 200)
Other operations
GET /v1/card-requests/{id}-- one request by GUID, including fulfillment details once completed (card profile reference, brand, last4).PUT /v1/card-requests/{id}-- updatename,message, orttlon a pending request.POST /v1/card-requests/{id}/resend-- re-activate an expired request (restarts its time-to-live).POST /v1/card-requests/{id}/dispatch-- send the invitation now. Body{ "channel": "email" }or"sms"; omitted, email is used when the request has one. Returns202 Acceptedwith the masked destination.DELETE /v1/card-requests/{id}-- cancel a pending request; its link stops working.
Delivery checks and bounces
Before an invitation is emailed, Card Vault checks that the recipient's domain can receive mail. A domain that does not exist, publishes a null MX, or has neither a mail server nor an address record is refused instead of being sent:
422 Email Undeliverable(type: https://api.cardvault.dev/errors/email-undeliverable) fromdispatch-- thedetailnames the domain. Correct the address by creating a new request -- an existing request's address cannot be changed through the API -- and dispatch that. Nothing was sent.- A temporary DNS failure never blocks a send; the check only refuses what DNS proves.
Some addresses pass that check and still bounce -- a mailbox that does not exist on a real domain, a full mailbox, a receiving server's policy. Card Vault reads the bounce and marks the request Undeliverable in the account portal (Requests list and request details, with the receiving server's reason). When the request was sent from the portal, the person who sent it also receives an email saying it could not be delivered, and can resend to a corrected address from the request details. Requests dispatched with an API key have no sending user, so they are marked in the portal but no email is sent.
Fulfillment fields
A completed request carries completed (timestamp), cardId
(the new card profile's reference), cardLastFour, and the card brand --
enough to link the vaulted card to your customer record without ever seeing the PAN.
Webhook notification
When a request completes, Card Vault raises the request.completed event through
your standard webhook endpoints. It is not offered in the
dashboard's per-event picker, so it reaches endpoints subscribed to all events.
Its Data is the standard card result: the card token, CardId, brand,
last four digits, BIN (first six digits), cardholder name, expiry, usage and verification
result, with Ref set to the card request's reference. It never contains the full
card number or CVV.
Legacy card request notification & token verification
Some card request forms also send an older, separate notification: if a
Card Request webhook URL is configured on your account, Card Vault POSTs to
it once when the request completes (a single attempt with a 10-second timeout -- it is not
retried and does not appear in webhook delivery history). The notification carries a signed
token in the Authorization header (the body is an empty JSON object);
verifying that token proves the notification came from Card Vault and was not
tampered with in transit. Prefer request.completed above for new integrations.
POST https://your-domain.example/card-request-webhook Authorization: Bearer <token> Content-Type: application/json {}
The token is a JWT signed with HS256. Its claims describe the vaulted card. No PAN or CVV is ever included; the claims do include the cardholder name, last four digits and expiry, and the token is readable by anyone who holds it (signed, not encrypted), so treat it as sensitive and keep it out of logs:
{
"ReqTxId": "...", // the card request this completes
"Token": "...", // the vaulted card token
"CardId": "...", // not sent by every form; may be empty
"Brand": "Visa",
"BrandCode": "4",
"LastFour": "1111",
"CardHolder": "JANE DOE", // example value
"Expiry": "12/31/2028", // M/d/yyyy; use month and year
"iss": "card-vault", // issuer -- verify this
"aud": "partner-service", // audience -- verify this
"jti": "...", // unique token id
"nbf": 1712345558,
"iat": 1712345558,
"exp": 1712345678 // expires ~2 minutes after issue
}
Verifying the token
- Get your Webhook Verification Key from the console: Settings → your Card Request interface → Webhook Verification Key. It is a 64-character hex string (one key per account).
- Hex-decode the key to its 32 raw bytes.
- Verify the JWT's HS256 signature using those 32 bytes as the HMAC key. Most JWT libraries accept the raw key bytes directly.
- Confirm
issiscard-vault,audispartner-service, and the token is unexpired (exp).