Generate Card Details Token
Card
Generate Card Details Token
Generate a secure token for displaying sensitive card details through an image-based display
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 environmentstring
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
Customization Examples
Dark Mode Theme
Light Mode Theme
Brand Colors
Security Considerations
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
imageUrlas 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
Token Expired
Token Expired
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.
Colors Not Readable
Colors Not Readable
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.
Image Not Displaying
Image Not Displaying
Symptom: Image element shows broken image iconCause: Token may be invalid, expired, or network issueSolution:
422 Validation Error
422 Validation Error
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 #1A1ARelated Endpoints
GET /v1/card/status- Get basic card information before generating tokenPOST /v1/card/pin/token- Generate token to view card PINPOST /v1/card/set-pin/token- Generate token to set/change card PINPOST /v1/card/freeze- Temporarily disable cardPOST /v1/card/order- Order a new card