purposeOfPayment decides which
documents you need.
When documents are needed
A payout needs supporting documents when it is a CNY bank transfer to a business beneficiary. That is an external account inCNY with a bank accountNumber and
beneficiaryType: "BUSINESS". See the China tab in
External Accounts to create one.
Other payouts don’t take documents. A quote with documentIds for any other destination
returns 400 INVALID_INPUT.
Requirements by purpose
The payout must use one of the purposes below. Any otherpurposeOfPayment returns
400 INVALID_INPUT, including GOODS_OR_SERVICES and SERVICE_CHARGES. A payment for
services uses the purpose that names the service.
Each row is one document to supply. Upload one file for each requirement of your purpose.
Where a requirement lists more than one type, the types are alternatives for that one file.
Declare any one of them as the file’s documentType.
The four service purposes share one set of requirements. For example, an
ACCOUNTING_SERVICES payout needs three files: a contract, an invoice, and either a
purchase order or a delivery slip.
The requirement ID names the document to supply. The document type names what a file is.
400 DOCUMENTS_REQUIRED reports missing documents by requirement ID.Limits
- A quote accepts at most 3 documents.
- Each file fills one requirement. A requirement that accepts several types still takes one file.
- Each file is a PDF, JPEG, or PNG, from 1 to 8,000,000 bytes. Grid detects the format from the file contents, not the file name.
- A document can be used for 24 hours after upload, until its
expiresAt. - A document can be used on one quote only.
- A document belongs to the customer in its
customerId. Only that customer’s quotes can use it. OmitcustomerIdwhen the platform itself is the sender. The document can then be used only on the platform’s own quotes.
Send a payout with documents
1
Upload each file
Upload one file per request with Keep the
POST /payment-documents. You can send the requests in
parallel.cURL
Success (201 Created)
id of each document. To check whether a document can still be used, call
GET /payment-documents/{paymentDocumentId}.2
Create the quote with the document IDs
Pass the IDs in Grid attaches every document to the payment before it returns the quote. The quote lists
their IDs in its
documentIds, along with the purposeOfPayment they support. A request
with documentIds must carry an Idempotency-Key header.cURL
documentIds field. For a document’s details, such as its type and its
ATTACHED status, call GET /payment-documents/{paymentDocumentId}. With
immediatelyExecute: true, Grid attaches the documents before it executes the quote.
Otherwise, execute the quote as described in
Sending Payments.When a document is missing
IfdocumentIds doesn’t fill every requirement of the purpose, POST /quotes returns
400 DOCUMENTS_REQUIRED. details.missingRequirements lists the requirement ID of each
missing document.
Idempotency-Key. Treat each requirement ID as an opaque value. Grid may add new ones as
requirements change.
Other errors on a quote with documents:
A request that fails with a
409, 410, or 424 created no quote. A retry with the same
Idempotency-Key runs the request again.
What the payout partner checks
Grid does not check what a document says. The payout partner reviews each document after Grid attaches it. To avoid a rejected or delayed payout:- Every document must carry the beneficiary’s stamp. A contract must be stamped by both parties.
- The invoice amount must match the transaction amount.
- The invoice currency must match the payout currency.
- Sender and beneficiary details in the documents must match the details you send through the API.