Uploading Sandbox Accounts in Bulk
Bulk Account Upload provides a way for you to upload up to 40 Sandbox test accounts at a time by configuring and uploading a file with your Sandbox test account information.
By configuring multiple test accounts, you can simulate all possible payment scenarios as you test your application. Configure different Personal test accounts to simulate mock customers as verified, non-verified, credit-card users, PayPal users, payment card users, and so on. Configure Business test accounts to represent merchants, third-party merchants, and "API Caller" accounts. Create Business test accounts to cover the various payment methods your merchants accept. By configuring a mix of test accounts, you can cover the full range of payment scenarios with your test suites.
Bulk test account file
The bulk test account file consists of a header row followed by rows of Sandbox test accounts. The following example bulk test account file contains two Sandbox test accounts (a US account and a GB account). The attributes for each account are tab-separated.
Note: For clarity, the header row headings in this example appear on separate lines. However, you must place these headings on one line separated by tabs in the file that you upload to PayPal.
#2-letter-country-code
account-type (BUSINESS/PERSONAL)
email
password
firstname
lastname
PayPal-balance
verified (Y/N)
credit-card-type (DISCOVER/VISA/AMEX/MASTERCARD/MAESTRO)
payment-card (DISCOVER/PAYPAL)
US BUSINESS [email protected] 12345678 business account 0 Y VISA
GB PERSONAL [email protected] 12345678 personal account 50 N MASTERCARD DISCOVER
To create a bulk test account file, you can either:
- Create your own file that contains the details of all your Sandbox test accounts.
- Download the sample file and modify it.
Create your own bulk test account file
You can create your own bulk test account file. It must be a UTF-16LE text file and contain the following required fields in the order shown:
| Header Value | Required | Description |
|---|---|---|
country-code |
X | The two-letter country code. |
account-type |
X | The account type (BUSINESS or PERSONAL). |
email |
A unique email address for the test account.Note: The Sandbox never sends email to addresses outside of the Sandbox environment. |
|
password |
X | A password (for testing purposes, consider using the same password for all Sandbox test accounts). |
firstname |
X | A first name for the fictitious account. |
lastname |
X | A last name of the account holder. |
PayPal-balance |
X | A PayPal balance in the range of 0-100000. |
verified |
X | Verified bank status (Y or N). |
credit-card-type |
Credit card type (if appropriate) (DISCOVER, VISA, AMEX, MASTERCARD, or MAESTRO). |
|
payment-card |
Payment card type (DISCOVER or PAYPAL). |
|
In addition to providing all required fields for each test account, configure the file as follows:
- The file must be encoded in UTF-16 Little Endian.
Note: Microsoft Excel uses UTF-16LE encoding when saving files as "unicode text".
- The file must have a
.txtor.tsvextension. - Separate each attribute in the file with Tab.
- The first row in the file must begin with a hash-mark ("#") in the first column and the row must then list the header for each provided test account attribute in the order they are provided in the file.
- The file must have at least one row of Sandbox test account data, and at most 40 rows of account data.
- The file must not be more than 1 Mb in size.
Download the sample bulk test account file
- You can download the sandbox-bulk-headers.tsv sample file.
- Replace the sample rows in the file with the details of all your Sandbox test accounts.
- Upload the file to the PayPal developer site.
Important: Do not copy and paste the contents of the sample file into a new file, as this may corrupt the formatting of the copied content.
Validation rules
PayPal uses these rules to validate your bulk account file:
- Each test account (row) must contain all required attributes.
- Each field in each row must be of the correct type for the associated attribute and each field must contain a valid value for the associated attribute. For example, all countries, card types, amounts, and so on, must be valid for the column in which they are presented.
- All dependent input fields must be correct for the context in which they are used (for example, only certain card types are valid for each country, and each country-specific validation is honored).
- Values supplied for enums are case-insensitive.
- Each test account email ID must be unique across the file, and it must be an available email address within the Sandbox environment.