post
https://api-sandbox.paymentlabs.io/batches//imports
Starts an import of payments into a batch from a CSV or Excel file, and returns a link to upload the file to.
Use imports to create many payments at once. The steps are:
- Call this operation with the file's name and type.
- Upload the file with an HTTP
PUTof its raw bytes tofileUploadUrl, with the sameContent-Typeyou sent as
fileMimeType. The link is valid for 1 hour. An import whose file never arrives is discarded after 4 hours. - Poll Get Import until
statusisready(every row is valid),processed_with_errors(some rows are invalid) or
processing_failed(the file could not be read, or has no rows). - Review the rows with Get Import Rows. Each row says whether it is
valid, why not inerror, and what will happen to the
payee inuserAction. - Call Finish Import to create the payments, or Delete Import to discard it.
The created payments are DRAFT. Send them with Submit Batch, Submit Payments or Submit Payment.
File format. The first row holds the column names; each other row is one payment. Column names are matched exactly as
written here (the alternatives in brackets are accepted too):
| Column | Required | Content |
|---|---|---|
Email Address (payeeEmail) | Yes | Payee email. |
Amount (Prize Payout, amount) | Yes | Amount, as a decimal number in the ledger account's currency. |
Payee Reference ID (payeeReferenceId) | No | Your identifier for the payee. See /docs/payee-reference-ids. |
Reference (Reference ID, Payment Reference ID, referenceId) | No | Your identifier for the payment. |
Account (account) | No | Ledger account ID or alias. Needed when you have several ledger accounts. |
Tax Jurisdiction (taxJurisdiction) | No | Defaults to the batch's. |
Payment Category (paymentCategory) | No | Defaults to the batch's. |
Payee Memo (Payee Message) | No | Message shown to the payee. Defaults to the batch name. |
Payor Memo (payorMemo) | No | Note for your own records. |
tag_<key> | No | One column per tag key. Separate several values with ;. Requires tags on your account. |
QuickBooks Category (Category) | No | QuickBooks classification, when QuickBooks is connected. |
QuickBooks Class (Class) | No | QuickBooks classification, when QuickBooks is connected. |
QuickBooks Location (QuickBooks Department, Location, Department) | No | QuickBooks classification, when QuickBooks is connected. |
Xero Account | No | Xero classification, when Xero is connected. |
tracking_<category> | No | One column per Xero tracking category, when Xero is connected. |
Payees are matched or created as in Create Payment.
Requires the Write permission.
Errors
400 VALIDATION_ERROR:fileMimeTypeis not one of the two accepted types, or a field is missing.404 NOT_FOUND: the batch does not exist.423 NOT_EDITABLE: the batch does not accept payments.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
