> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mattildapayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Token import file creation

To allow for a smooth import, we have created a template that can be used for a generic token import from your current payment service to our system,

These templates: [card template](https://raw.githubusercontent.com/gr4vy/token-import-templates/main/token_import_template.csv) [non-card tokens](https://raw.githubusercontent.com/gr4vy/token-import-templates/main/token_import_template_non_card.csv) ([https://raw.githubusercontent.com/gr4vy/token-import-templates/main/token\_import\_template\_gift\_card.csv](https://raw.githubusercontent.com/gr4vy/token-import-templates/main/token_import_template_gift_card.csv)) can be downloaded and saved as a `.csv` file. Not all fields are required for minimum import,
but we recommend sending as many fields as are available. [This sample file](https://raw.githubusercontent.com/gr4vy/token-import-templates/main/token_import_sample.csv) provides an example of how this file can be populated.

<Info>
  Our import process will not modify your token file, if column data is not truncated the record will be treated as a failure.
</Info>

### Column Definitions

| Column | Restrictions | Minimum Length | Maximum Length | Definition |
| - | - | - | - | - |
| `audit_reference_id` | Required, unique | | 200 | An ID for this row that we can use for logging and audit purposes. |
| `merchant_account_id` | | | 22 | The merchant account ID that resources should be created for. This defaults to `default`. |
| `buyer.external_identifier` | Required, unique | | 200 | An external identifier that can be used to match the buyer against your own records. This value needs to be unique for all buyers. See [Buyer creation](./buyer-payment-creation) for more details. Must be unique. |
| `buyer.display_name` | | | 200 | A unique name for this buyer which is used in the dashboard to give a buyer a human-readable name. |
| `buyer.billing_details.email_address` | | | 320 | The email address for the buyer. |
| `buyer.billing_details.first_name` | | | 255 | The first name(s) or given name for the buyer. |
| `buyer.billing_details.last_name` | | | 255 | The last name, or family name, of the buyer. |
| `buyer.billing_details.phone_number` | | | 320 | The phone number for the buyer should be formatted according to the [E164 number standard](https://www.twilio.com/docs/glossary/what-e164). |
| `buyer.billing_details.address.city` | | | 100 | The city for the address. |
| `buyer.billing_details.address.country` | | | 2 | The country for the address in ISO-3166 format. |
| `buyer.billing_details.address.line1` | | | 255 | The first line of the address. |
| `buyer.billing_details.address.line2` | | | 255 | The second line of the address. |
| `buyer.billing_details.address.postal_code` | | | 50 | The postal code or zip code for the address. |
| `buyer.billing_details.address.state` | | | 255 | The state, county, or province for the address. |
| `buyer.billing_details.address.state_code` | | | | The code of state, county, or province for the address in ISO 3166-2 format. |
| `buyer.billing_details.address.house_number_or_name` | | | 255 | The house number or name for the address. Not all payment services use this field but some do. |
| `buyer.billing_details.address.organization` | | | 255 | The optional name of the company or organization to add to the address. |
| `buyer.billing_details.tax_id.kind` | | | | The kind of tax ID. See [API Docs](https://docs.gr4vy.com/reference/buyers/new-buyer) for this field's accepted values. |
| `buyer.billing_details.tax_id.value        ` | | | 50 | The tax ID for the buyer. |
| `payment_method.number` | Required (card) | 13 | 19 | The credit card number, without spaces or any other formatting. |
| `payment_method.expiration_date` | Required (card) | | | The credit card expiration date, formatted as a string in the `MM/YY` format. |
| `payment_method.scheme_transaction_id` | Recommended | | 100 | The latest scheme or network transaction ID for the card. This is required to enable subsequent MIT transactions for this card without requiring the buyer present. |
| `payment_method.external_identifier` | Required | | 200 | An external identifier that can be used to match the card against your own records. |
| `payment_method.token` | Required (non-card) | | | The non-card payment method's token. |
| `payment_method.payment_service_id` | Required (non-card). | | | The Gr4vy payment\_service\_id for the token. |
| `payment_method.method` | Required (non-card) | | | The non-card payment method's method. |
| `payment_method.label` | Ignored for card. | | | The label to display for non-card payment methods. |
| `payment_method.last_used_at` | | | | The timestamp in ISO-8601 format when this payment method was last used in a transaction. |
| `payment_method.cit_last_used_at` | | | | The timestamp in ISO-8601 format when this payment method was last used in a transaction for client initiated transactions. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.