# MD for: https://www.mercadopago.com.mx/developers/en/docs/batch-payments/card-import-portal.md \# Import cards in the Mercado Pago panel The card import feature allows businesses that already have a customer and card database to securely migrate that data to Mercado Pago. Once the migration is complete, payments are processed through the Mercado Pago platform without interruptions for customers. This process creates :toolTipComponent\[tokenized cards\]{content="Secure representation of card data using a unique identifier (token) that replaces sensitive information. The token allows processing payments without exposing the actual card data."} in bulk by sending an encrypted file containing card data. To access the card import tool, \*\*you need to contact your Mercado Pago business representative beforehand\*\*. After completing this step, you will receive a URL to access the file submission interface in the Mercado Pago panel. > WARNING > > If you encounter any errors or unexpected issues during the integration of this solution, contact your business representative. ## Grant access to collaborators By default, access to the card import portal is restricted to users with an administrator profile. To allow other collaborators to also use this feature, create a role with the appropriate permission and assign it to the desired users. :::AccordionComponent{title="Access the Collaborators panel" pill="1"} Using an account with administrator permission, go to the \*\*Your business\*\* section in the left sidebar menu and click \*\*Collaborators\*\*. You can also access it directly from the \[Collaborators panel\](https://www.mercadopago.com.mx/collaborators). ::: :::AccordionComponent{title="Create a role" pill="2"} Before inviting a collaborator, define their role. 1\. Click the \*\*Manage roles\*\* button and then \*\*Create role\*\*. 2\. Define a name for the role and set the permission to \*\*Mercado Pago\*\*. 3\. Within the \*\*Management and configuration\*\* permissions list, check the \*\*Card token creation\*\* option. > NOTE > > The \*\*Card token creation\*\* permission is the one that specifically enables access to the card tokenization screens. You can define exactly which permissions you want to associate with the role. 4\. Review the information and click \*\*Create role\*\*. ::: :::AccordionComponent{title="Invite a collaborator" pill="3"} On the main Collaborators page, click \*\*Invite collaborator\*\*, enter the email address of the collaborator you want to invite, and click \*\*Continue\*\*. You can use any email address, whether from someone directly in your organization or from a third party or service provider. The collaborator will receive an email with a link to complete the access setup for their new account. ::: :::AccordionComponent{title="Add a role to a collaborator" pill="4"} Once the collaborator is created, assign them a role: 1\. From the main Collaborators page, click the collaborator's name to access their details. 2\. Select \*\*Add or change role\*\* and choose the previously created role that best fits that collaborator's responsibilities. 3\. Click \*\*Confirm\*\* and then \*\*Save\*\*. ::: ## File preparation Prepare a \`.csv\` file specifying the data for each customer and their cards. Include the first line with the headers and separate each field with commas. All fields are required. The file supports up to 100,000 rows; if you have more cards, split the information into multiple files. The average token creation time is 60 minutes per 10,000 rows. The \`.csv\` file name must contain only letters, numbers, hyphens (\`-\`), underscores (\`\_\`), and periods (\`.\`). See the specifications in the following table: | Order | Header | Description | Format | Example | |---|---|---|---|---| | 1 | \`external\_reference\` | Unique customer identifier in your system. | Alphanumeric | ORD-123456 | | 2 | \`customer\_email\` | Cardholder's email address. | Alphanumeric. The username in the email must contain at least 2 characters. | ej@email.com | | 3 | \`card\_number\` | Card number. | Numeric, from 13 to 19 digits. | 1234567812345678 | | 4 | \`expiration\_month\` | Expiration month. | Numeric, 2 digits. | 01 | | 5 | \`expiration\_year\` | Expiration year. | Numeric, 2 digits. | 25 | | 6 | \`cardholder\_name\` | Name as it appears on the card. | Use only letters without accents and spaces, avoiding numbers and special characters such as \`.\` \`,\` \`;\` \`:\` \`-\` \`\_\` \`/\` \`\\\` \`'\` \`"\` \`&\` \`@\` \`+\` \`(\` \`)\` \`ñ\` and \`ç\`. | ATILIO GARCIA | Below, you will find an example of a \`.csv\` file. \`\`\`csv external\_reference,customer\_email,card\_number,expiration\_month,expiration\_year,cardholder\_name ORD-123456,ej@email.com,1234567812345678,01,25,PABLO SANCHEZ CLI-789012,test\_payer@example.com,5480832801033311,12,26,MARIA GONZALEZ USR-345678,test\_payer@example.com,4509953566233704,06,27,JOAO SILVA REF-456789,test\_payer@example.com,4012888888881881,03,28,CAROLINA PEREZ \`\`\` ## File validations The \`cardholder\_name\` field must contain only letters without accents and spaces, avoiding numbers and special characters such as \`.\` \`,\` \`;\` \`:\` \`-\` \`\_\` \`/\` \`\\\` \`'\` \`"\` \`&\` \`@\` \`+\` \`(\` \`)\` \`ñ\` and \`ç\`. ## File encryption The \`.csv\` file must be encrypted before submission. The expected format is :toolTipComponent\[PGP\]{content="Pretty Good Privacy: encryption protocol that ensures data confidentiality and integrity through public key cryptography."} with \`.asc\` or \`.enc\` extension. See below the encryption process using \*\*GnuPG\*\*, a free encryption software. You can use other tools or methods as long as the result is in PGP format. :::AccordionComponent{title="GnuPG installation" pill="1"} 1\. Access the \[official website of GnuPG\](https://gnupg.org/download/) and download the version compatible with your operating system. In the "GnuPG binary releases" section, select the desired option. For Windows, use this \[direct link\](https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.4.8\_20250514.exe). 2\. Follow the installation wizard instructions. 3\. Verify the installation by opening the command prompt (CMD on Windows) and running: \`\`\`bash gpg --version \`\`\` You will see a response similar to the following. \`\`\`bash gpg (GnuPG) 2.4.8 libgcrypt 1.11.1 Copyright (C) 2025 g10 Code GmbH License GNU GPL-3.0-or-later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. \`\`\` ::: :::AccordionComponent{title="Public key configuration" pill="2"} Encrypted file security relies on a key pair: one :toolTipComponent\[public key\]{content="Cryptographic key that is shared publicly and used to encrypt data. Data encrypted with this key can only be decrypted with the corresponding private key."} and one :toolTipComponent\[private key\]{content="Secret cryptographic key used to decrypt data. Only Mercado Pago has access to this key, ensuring the security of encrypted data."}. Keys are valid for 6 months and a new key is published two months before the current one expires, so there may be a period when two keys are valid at the same time. > WARNING > > Always use the key with the most recent expiration date. Additionally, the :toolTipComponent\[Key ID\]{content="Unique identifier of the public key used to specify which key to use during encryption."} is unique to each key and changes each time a new one is generated. | Key ID | Generated on | Valid until | |---|---|---| | \`7E4B7B8AF8B36301\` | 27/04/2026 | 24/10/2026 | To use the public key, copy the following content and save it as an \`.asc\` file on your device: \`\`\`key -----BEGIN PGP PUBLIC KEY BLOCK----- Comment: https://gopenpgp.org Version: GopenPGP 2.9.0 xsFNBGnr2kUBEAC+K7bjmzF+ytWRi2pw85hyHSosKbry8e76DUuoTKsciTwNreNO 9Kgw5zYw6DYO4uHvEy+2nSyWWzXSR7uq/NwdI1sMzD72n+Z3bOtt2q0dTp5nQ4Vy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A/QJPym+nszHe+Fw7oO6xFtMsulRvjSOBwkHQOjuJOm dEk96GxuuAxky9zkAkT7Ug33Pgsbzvdmmz8+jPfHt4Zusxa4II0fWQARAQABwsGs BBgBCABgBYJp69pFCRB+S3uK+LNjATUUAAAAAAAcABBzYWx0QG5vdGF0aW9ucy5v cGVucGdwanMub3Jn22nRVJzoRh6zx7GLaXPvDAKbDBYhBNhXGhEAyw+DZBtIlH5L e4r4s2MBAACt6g/+P3zd7maxEOJ7Fs/A1yMt03GqiijjV7fnqJWqAz/oEsJHst1M 3rDUoOOy6vyYvbiHWzz5lq9QMStHhLNGztcwaaB/XVLbrF+a+cD7xj1YzuzeaPeY ZEoQhvYolgNz3SfCI7nBnRBulxyflxVT8wBqiVw34QvzJI8Y/7PMJv6IbtrMSsoi cA9HPd/tPtbVfji2TBAOvCQXva6jIzDCRBudWik4PvBo5Un5s0Qzgoz+jibu6LK2 oIVQc1ks5mJVH/nzGtLBo0c8+LR10n0KcKfl0Rr/Wmd70YGNDkjX7SFp2YtIUlyK KA20oFmDBquCM0H4q9ieGu2CxT9m3yVevj1KB9HcO6ccBcIDhpazssEwQnnp8mUK vl/m1yzUFQP9G74o8z6mCop6zuLDFLnvCBo6xWPmQyKfvMMLf0Uqj0s2QG6i37hF wbocPMt4OS8qPDJi9AkbhbpLNZXKeye4Eb8ijy0SPv5nSe/t2w26ztb2zoaK2owt qXGYE8meFRmBlNnHU126vkdvrNxyzFMF7EStHQ4I9qHGOUrru1tqBTdHMlP2tpDs 1KF7ijDQX91aPrfMblJxKSr1XMagmu6zXVX6CRWEXhwO3b9Z3lnI5myoEJ6Q65k0 p5T4LcaICqcPJD63GFnxjGtJyvUW8fxiPyA38CDwd9qYCn5IfILgG9p2EKQ= =aPeA -----END PGP PUBLIC KEY BLOCK----- \`\`\` With the \`.asc\` file saved, follow the steps below to import the key and encrypt your \`.csv\` file. 1\. Create an empty folder and place the public key \`.asc\` file and the \`.csv\` file you want to encrypt inside it. 2\. Open that folder in \*\*Terminal (Mac/Linux)\*\* or \*\*Command Prompt (Windows)\*\*. 3\. Import the public key by running the following command: \`\`\`bash gpg --import \[file-name\].asc \`\`\` 4\. Finally, you will receive a message confirming that the key was processed. \`\`\`bash gpg: key 7E4B7B8AF8B36301: public key "54e8e256-542b-4c53-92a6-876eefb9e2b4 " imported gpg: Total number processed: 1 gpg: imported: 1 \`\`\` ::: :::AccordionComponent{title="CSV file encryption" pill="3"} With the public key configured, encrypt your file by running the following command. Replace \`your\_file\_name.csv\` with the actual name of your file and \`KEYID\` with the KeyID corresponding to the downloaded key: \`\`\`bash gpg --output encrypted\_file.enc --armor --encrypt --recipient "KEYID" your\_file\_name.csv \`\`\` The command parameters are detailed in the following table: | Parameter | Description | |---|---| | \`--output encrypted\_file.enc\` | Defines the name of the encrypted output file | | \`--armor\` | Generates output in ASCII format | | \`--encrypt\` | Indicates the encryption operation | | \`--recipient "KEYID"\` | Specifies the identifier (KeyID) of the recipient's public key that will be used to encrypt the data | | \`your\_file\_name.csv\` | Input file containing sensitive data (card and email) to encrypt | > WARNING > > GnuPG may display a warning informing that it is not possible to guarantee the key's identity. This warning is expected and does not indicate risk, as the Mercado Pago public key is not signed by third parties. If the key was obtained from this page, type \`s\` and press \*\*Enter\*\* to continue. After confirmation, a file with the name entered in the \`--output\` option is generated in the same folder. This is the file you must send to Mercado Pago. ::: \## Encrypted file submission 1\. Access the URL provided by your business representative. 2\. In the \*\*Token generation\*\* interface, drag or select the encrypted file (\`.asc\` or \`.enc\`). !\[Batch token generation screen\](https://www.mercadopago.com.mx/images/batch-payments/1-create-batch-tokens-es-v1.png) 3\. Verify the file name is correct and click \*\*Generate Tokens\*\*. !\[File upload interface\](https://www.mercadopago.com.mx/images/batch-payments/2-upload-interface-es-v1.png) The system will display the status "Generating tokens...". Completion may take several hours depending on the file size. You can monitor the procedure in the \*\*Latest results\*\* field. !\[Latest results section\](https://www.mercadopago.com.mx/images/batch-payments/3-latest-results-es-v1.png) ## Results file interpretation Once processing is complete, check the result on the \[Mercado Pago panel\](https://mercadopago.com). Only cases processed completely successfully or partially generate a results file. ### Results location 1\. Check the most recent status of your submissions in the \*\*Latest results\*\* section. 2\. Click the download link to get a \`.csv\` file with details of the generated tokens and any errors. !\[Processing status\](https://www.mercadopago.com.mx/images/batch-payments/4-processing-status-es-v1.png) !\[Results history\](https://www.mercadopago.com.mx/images/batch-payments/5-results-history-es-v1.png) If you have completed the token creation but have not yet processed charges on the platform, contact your business representative to continue with the integration process. ## Error resolution If processing was partial, the results file will include the errors found. See the following table to identify and resolve each error type. !\[Results file example\](https://www.mercadopago.com.mx/images/batch-payments/6-results-file-example-es-v1.png) | Error | Description | Resolution | |---|---|---| | Customer record generated incorrectly | Error creating the customer record or adding the card. | Review customer and card data. If the error persists, contact your business representative. | | Error linking a card | Could not determine the payment method. | Review card data or use a different card. | | Token generated incorrectly | Incorrect card data was entered. | Review the card number and expiration date. | | Expired expiration date | The expiration dates entered are past dates. | Verify that expiration dates are in the future. | | Invalid email format | The email does not meet the allowed format (example@email.com). | Correct the email format. | | Invalid email syntax | The email contains disallowed characters. | Review the email characters. | | The card is invalid | The registered data corresponds to an invalid card. | Use a different card. | ## Common file errors See the most common issues when preparing the file and how to fix them. | Problem | Invalid example | How to fix it | |---|---|---| | \`cardholder\_name\` with disallowed characters | JOSE PEREZ S.A., MARÍA GÓMEZ, JOÃO SILVA, ANA-MARIA, CLIENTE & CIA | Use only letters without accents and spaces. For example: JOSE PEREZ, MARIA GOMEZ, JOAO SILVA. | | Malformed CSV file | Entire row enclosed in quotes or different separator used | Export the file as comma-separated CSV and keep the exact header from the template. | | Empty lines | A row with no data between records | Remove empty lines before sending the file. | | Expired card | expiration\_month=01, expiration\_year=24 | Send only cards with a future expiration date. | | Incorrect \`card\_number\` | Token, \`card\_id\` or internal identifier instead of PAN | Send the plain PAN of the card, with 13 to 19 digits. | | Invalid \`customer\_email\` format | cliente@, cliente.com, cliente@@email.com | Use a standard email format, for example cliente@email.com. | Once you have identified the errors, fix and upload a new file only with corrected data for records that had problems. You can perform as many imports as needed.