Tokenization Keys – Secure Client-Side Card Collection
What is a Tokenization Key?
A tokenization key allows a website or app to securely collect card information and convert it to a token without the actual card data touching the merchant’s server.
The PCI Compliance Problem:
If a merchant’s website collects raw card numbers:
- Card data must be transmitted securely
- Card data must be stored securely (if stored)
- Merchant must be PCI DSS compliant (annual audits, security requirements)
- High liability if breached
The Tokenization Solution:
- Customer enters card on merchant’s website
- Card data is sent directly to gateway (bypassing merchant’s server)
- Gateway returns a token (e.g., “tok_abc123xyz”)
- Token is sent to merchant’s server
- Merchant uses token + API key to charge the card
- Merchant never touches raw card data = lower PCI burden
What Tokenization Key Can Do:
- Create tokens from card data
- Cannot charge cards (needs API key for that)
- Cannot refund, void, or access existing data
What Tokenization Key Cannot Do:
- Process transactions
- Access customer data
- Issue refunds
- View reports
- Anything except tokenization
Security:
Tokenization keys are less sensitive than API keys:
- Can be embedded in client-side code (JavaScript)
- Can be in mobile apps
- Can be on public-facing websites
- Even if exposed, cannot be used to steal money or data
Creating a Tokenization Key:
- Navigate to Control Panel > Source Management
- Click “+ Create Key”
- Set Source Key Type to “Tokenization”
Configuration:
Name:
- Create descriptive name
- Examples:
- “Website Checkout Form”
- “Mobile App – iOS”
- “React Payment Widget”
That’s it – tokenization keys have minimal configuration.
Completing Tokenization Key Creation:
- Click “Save”
- The Tokenization Key generates
- Copy the key
Example Generated Tokenization Key:
pk_live_abcdef123456789ghijklmnop
Using the Tokenization Key:
Provide to your developer to embed in:
- Website payment forms
- Mobile app payment screens
- JavaScript payment widgets
- Custom checkout flows
Typical Flow:
- Customer enters card on your website
- JavaScript using tokenization key sends card to gateway
- Gateway returns token
- Website sends token to your server
- Your server uses API key + token to charge customer
Benefits:
- Your server never sees raw card data
- PCI DSS compliance burden greatly reduced
- Customer data is more secure
- Gateway handles security and encryption
