Skip to main content
POST
Generate Card Details Token

Overview

Generates a time-limited secure token that allows you to display sensitive card information (full PAN, CVV, expiry date) as an image without ever handling this data directly in your application. The token provides access to a secure image URL that renders card details in a PCI-compliant manner.
PCI Compliance Made EasyThis endpoint eliminates PCI compliance burden by returning card details as a secure image. Your application never touches or stores the actual card details.

Authentication

This endpoint requires authentication via Bearer token:

Request

Headers

string
required
Your public API client key
boolean
default:false
Set to true to route requests to the US backend environment
string
required
Bearer token for authentication

Body

The request body is optional. If omitted, default styling will be applied to the card image.
object
Customize the visual appearance of the card details image to match your brand

Request Example

Response

Success Response

string
Secure, time-limited token (UUID format)Lifetime: ~10 minutesUsage: Single-use token that becomes invalid after the image is accessed
string
URL that renders card details as a secure imageUsage: Display card details by using this URL as the src attribute of an <img> tagFormat: <HOST>/details-image?token={token}Security: Treat this URL as highly sensitive. Do not log or store it.

Error Responses

Integration Method

Display card details as a secure image without interactive elements.

Basic Implementation

React Component Example

Security NoteImage URLs contain sensitive card information. Always:
  • Use HTTPS only
  • Never log or store the imageUrl
  • Display in secure contexts only
  • Clear the image from DOM when user is done viewing

Customization Examples

Dark Mode Theme

Light Mode Theme

Brand Colors

Security Considerations

Token Lifetime and Single-Use
  • Tokens expire after ~10 minutes
  • Tokens are single-use and become invalid after first access
  • Generate a new token each time the user wants to view card details
  • Never store or cache tokens
PCI ComplianceBy using this endpoint, you avoid PCI compliance requirements as sensitive card data is delivered as an image. Your servers and frontend code never handle the actual card details.
URL Security
  • Treat imageUrl as highly sensitive data
  • Don’t log or store these URLs
  • Use HTTPS only
  • Display only in authenticated, secure contexts

Best Practices

Error Handling

Cleanup After Viewing

Common Issues and Solutions

Symptom: Image fails to load with “Invalid or expired token” errorCause: Token has expired (>10 minutes old) or was already usedSolution: Generate a new token. Never reuse or cache tokens.
Symptom: Text is difficult to read on the card imageCause: Text color and background color are too similarSolution: Ensure sufficient contrast between text and background colors. Avoid using the same hex value for both.
Symptom: Image element shows broken image iconCause: Token may be invalid, expired, or network issueSolution:
Symptom: Request fails with 422 status codeCause: Invalid customCss parameters (e.g., malformed hex colors)Solution: Ensure all color values are valid 6-digit hex codes starting with #. Example: #1A1A1A, not 1A1A1A or #1A1A
  • GET /v1/card/status - Get basic card information before generating token
  • POST /v1/card/pin/token - Generate token to view card PIN
  • POST /v1/card/set-pin/token - Generate token to set/change card PIN
  • POST /v1/card/freeze - Temporarily disable card
  • POST /v1/card/order - Order a new card