Import merchants
Add many merchants at once from a CSV file, or pull them from a connection where they already exist.
Import merchants when you add many at once, such as when you move an existing book of business to Preczn. You can upload a CSV file, or pull merchants from a connection where they already have accounts. Merchant import is available in the Dashboard only. The API has no import endpoint, so to add merchants through the API, create each one. See Create a merchant.
Each import adds merchants to the mode you're working in. Import sandbox data in test mode and production data in live mode. See Live vs. test mode.
Import merchants from a CSV file
The CSV file can hold bank accounts, credentials, and personal information, so you encrypt it with Preczn's public PGP key before you upload it.
- In the left navigation, select Import, then Merchant Import.
- Select Upload CSV.
- Select Download CSV Template. The template has a column for each credential of every connection on your platform in the current mode.
- Fill in one row for each merchant. See CSV columns.
- Encrypt the file with Preczn's public PGP key. See Encrypt the file.
- Drag the encrypted
.gpgfile into the upload area, or select the area to choose the file. Files can be up to 100 MB. - Wait for the import to finish. It appears under CSV Import Activity, and Preczn emails you when it completes.
- In the import's Response File column, select Download to read the result for each row. See Read the results.
Download a new template when your connections change
Preczn rejects the whole file, with no rows imported, when its header doesn't match the current template. Adding a connection to your platform adds columns to the template, so download a new one instead of reusing an old file.
CSV columns
Every row needs platformUID and name. All other columns are optional.
| Column | What to enter |
|---|---|
platformUID | Your own identifier for the merchant. The response file repeats it, so you can match each result to your records. |
name | The merchant's DBA name. |
externalId | Your identifier for the merchant in Preczn, up to 50 characters. No other merchant in the same mode can hold the value. See Set a merchant's external ID. |
naicsClassificationCode | A valid six-digit NAICS code. Leave it blank to use your platform's default NAICS code. See Merchant classification codes. |
plan | The ID of a plan in the same mode. Include credentials for every connection the plan uses, or the row fails. |
enable | TRUE or FALSE. A blank cell enables the merchant. |
labels | One or more labels, separated by semicolons. See Labeling merchants. |
Credential columns are named for their connection, such as {Connection}_{credential}. Fill them in for each connection the merchant already has an account with. See Link existing credentials.
Owner and bank account columns come in numbered groups. The template has one of each, owner.0.* and banking.0.*. To add a second owner or bank account, copy the whole group of columns to the end of the row, after the last template column, and change the number, such as owner.1.firstName. Preczn rejects the file if added columns come before the end of the template.
An owner's owner.N.dob must be a real date in YYYY-MM-DD format, such as 1980-04-12, for a person at least 18 and under 100 years old. A masked value such as 1980**** fails. Spreadsheet apps often change dates to another format, such as 4/12/1980, so check the column before you encrypt the file.
Encrypt the file
-
Install PGP tools if you don't have them: GPG Tools on Mac, or GnuPG on Windows and Linux.
-
On the Merchant Import page, select Public PGP Key to download Preczn's key,
tokenImportPublicKey.asc. -
Import the key and encrypt the file:
gpg --import tokenImportPublicKey.asc gpg -r [email protected] -a -e --output merchants.csv.gpg merchants.csv
| Flag | Purpose |
|---|---|
-r [email protected] | Encrypts for Preczn's key |
-a | Writes ASCII-armored output |
-e | Encrypts the file |
--output | Names the encrypted file |
Read the results
Preczn checks each row on its own. A row that fails doesn't stop the other rows, and the row's merchant isn't created. Invalid connection credentials fail only their row.
The response file has one row for each merchant in your file:
| Column | Description |
|---|---|
platformUID | Your identifier from the file |
precznMerchantId | The new merchant ID, which starts with mid_. Empty when the row failed |
status | Whether the row succeeded |
error | Why the row failed. Several reasons are separated by semicolons |
Import merchants from a connection
When your merchants already have accounts at a connection on your platform, Preczn can create merchants from them. Not every connection supports merchant import. See the Data import column in Supported connections. The connection must be on your platform first. See Add a connection to your platform.
Run a one-time import
A one-time import pulls the merchants that exist at the connection now.
- In the left navigation, select Import, then Merchant Import.
- Select Connection API.
- In Select Merchant Connection, select the connection. Only connections on your platform that support import appear.
- Select Import.
Preczn emails you when the import finishes. The import appears on the Merchant Import page under the connection's name. In its Response File column, select Download to see which merchants failed and why.
Some connections also have an option that ends in - Augment. An augment import doesn't create merchants. It refreshes the data on merchants that already have that connection's merchant ID in Preczn.
Turn on continuous import
A continuous import creates a merchant in Preczn each time a new merchant finishes boarding at the connection, so you don't run another import.
- Open the connection's settings on your platform.
- Turn on Continuous Merchant Import.
Preczn then creates a merchant when the connection's webhook reports a merchant that has finished boarding. Before it creates one, Preczn checks for a merchant that already has the same connection merchant ID, so a merchant already linked to that connection isn't created again.
Creating merchants yourself as wellIf your platform also creates merchants in Preczn, a merchant created without the connection's merchant ID can be created a second time when the connection's webhook arrives. Contact Preczn Support before you run both.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The whole import fails | The file's header doesn't match the current template | Download a new template and copy your rows into it |
A row fails on platformUID or name | A required cell is empty | Fill in both cells |
A row fails on externalId | Another merchant in the mode, or another row, has the value | Use a unique value. See Set a merchant's external ID |
| A row fails on credentials | The provider rejected the credentials | Check the credentials with the provider |
A row fails on plan | The plan doesn't exist in the mode, or the row lacks credentials for one of its connections | Use a plan ID from the same mode, and add credentials for every connection the plan uses |
A row fails on owner.N.dob | The date isn't YYYY-MM-DD, is masked, or is outside the 18-to-under-100 range | Correct the date in the owner group that the error column names |
A row fails on naicsClassificationCode | The value isn't a valid six-digit NAICS code | Correct the code, or leave the cell blank |
For help with a large import, contact your account manager or [email protected].
Updated about 1 hour ago
