Upload a payment document
Changed onUpload a supporting document for a payout that requires one. Supporting Documents lists which payouts need documents, the documents each purposeOfPayment needs, and what the payout partner checks in them. Upload each file here, then pass the returned id values in documentIds on POST /quotes. Grid attaches the files to the payment before it returns the quote.
The request must use multipart/form-data with the file in the file field and metadata in the remaining fields. Each request uploads one file. To upload several files, send one request per file. You can send them in parallel. A quote accepts up to 3 documents.
Supported formats are PDF, JPEG, and PNG. Grid detects the format from the file contents, not the file name. The file must be from 1 to 8,000,000 bytes. An empty file, a larger file, and any other format return 400 INVALID_INPUT.
A payment document:
- can be used until its expiresAt, 24 hours after upload
- can be used on one quote only, and only on a quote for the customer in customerId, or on the platform's own quote when customerId is omitted
- has its file deleted by Grid once it is attached to the payment
Grid does not check what a document says. The payout partner reviews each document after Grid attaches it, and may reject or delay the payout. A successful attachment means the payout partner received the file, not that it approved it.
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/payment-documents
- AuthHTTP basic
Request body multipart/form-data
Example request
{
"documentType": "INVOICE",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
}Response
Payment document uploaded successfully
Example response
{
"id": "PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"documentType": "INVOICE",
"fileName": "invoice-2025-0142.pdf",
"sizeBytes": 482133,
"contentType": "application/pdf",
"status": "UPLOADED",
"expiresAt": "2025-10-04T12:00:00Z",
"quoteId": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"createdAt": "2025-10-03T12:00:00Z"
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- warning
added the new
EXACT_AMOUNT_UNAVAILABLEenum value to theresponse property for the response status
- warning