Migrate Stored Cards to Firstoken
If your organization currently stores card data in your own systems, migrating it to the Firstoken vault eliminates raw card storage and replaces it with persistent tokens. From that point forward, you use tokens — not card numbers — to initiate payments, reducing your PCI DSS scope significantly.
There are two ways to migrate:
SFTP File Migration
Large existing card databases, batch migration
No
Tokenization API
Real-time card onboarding, incremental migration
Yes
This guide covers SFTP File Migration. For the API-based approach, see Permanent Tokenization.
SFTP File Migration
You export your stored card records to a flat file, send it to Firstoken through a secure SFTP connection, and receive a processed file back — with every card number replaced by a persistent Firstoken token. No development is required on your side.
This is the fastest path to migrating a large card base. Once you receive the output file, you update your records and the migration is done.
Getting Started
SFTP File Migration is configured by Firstoken. To get started, contact our Support Team with the following information:
File format
Delimited (CSV, pipe-separated, etc.) or fixed-position
Delimiter
If delimited: the character separating fields (e.g. ,)
Field mapping
Which column or position contains card number, expiration date, cardholder name, CVV (if applicable)
Date format
Format used for expiration date (e.g. MMYY, YYYY-MM)
Approximate record count
Estimated number of cards to migrate
SSH public key
Public key your system will use to authenticate to the SFTP server
Firstoken will provide you with:
SFTP hostname and your assigned input and output paths
PGP public key to encrypt your file before upload
Confirmation of field mapping before processing begins
Uploading Your File
1. Prepare your file
Export your card records to a flat file. One record per card, using the format agreed upon with Firstoken. For example, a comma-delimited file might look like:
2. Encrypt the file
Encrypt your file using the PGP public key Firstoken provides. Files that are not encrypted will not be processed.
3. Upload via SFTP
Connect to the Firstoken SFTP server and upload the encrypted file to your assigned input path.
Staging
files-staging.firstoken.co
Production
files.firstoken.co
Receiving the Output
Once processing is complete, Firstoken writes the output file to your assigned output path. The file preserves your original structure — card numbers are replaced with persistent Firstoken tokens:
Each token maps to the card in the same row of your input file. Use the output file to update your records, replacing stored card numbers with their corresponding tokens.
FAQ
Do I need to build anything?
No. The only steps on your side are preparing the file, encrypting it, and uploading via SFTP.
Can I migrate in batches?
Yes. Each uploaded file is processed independently. Split large datasets across multiple files if needed.
What if the same card appears more than once?
Firstoken issues the same persistent token for the same card number every time. Duplicates across files or batches will resolve to the same token.
What happens if a record has an error?
Records that cannot be processed are written to a separate error output. Firstoken will confirm the error format during onboarding.
Can I test before migrating production data?
Yes. Firstoken can configure access to the staging environment for validation before you run the production migration.
How do I get started?
Contact our Support Team with the information listed under Getting Started.
Last updated