Attach Payout Document
Upload an invoice, contract or receipt and attach it to an initialized payout transaction in one call.
📘
Call this after Initiate Payout returns
the transaction ID and before Finalize
Payout. A payout document is required for
every business transaction (B2B, B2C, C2B) and for China bank payouts and
India payouts from a business sender. If you already uploaded the file with
Upload Document, pass its key as
receiptRef when initiating instead of calling this endpoint. See Documents
& Compliance.
Body Parameters
This endpoint accepts multipart/form-data with a single file part.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | ✅ | The document. pdf, jpg, jpeg or png recommended, under 5 MB (10 MB hard limit). |
📘
The request must be sent with Content-Type: multipart/form-data instead of application/json since it involves file upload.
Request
Payouts/Attach Payout Document [POST]
curl --location \
--url 'https://sandboxapi.onbrails.com/api/v2/wallets/payout/file/upload/14c52854-46b5-4c98-81cc-89b92288b1c3' \
--header 'Authorization: Bearer sk.xxxxxxxxxxxx' \
--form 'file=@"/Users/files/Downloads/PROFORMAL INVOICE.pdf"'Responses
🟢 200 - Result example
{
"status": true,
"message": "Document uploaded successfully",
"data": {
"documentType": "invoice",
"documentUrl": "https://brails-documents.s3.amazonaws.com/payout-document/45422f21-9a0e-479e-9e10-615556448a78/7b1c6e2a-3f0d-4c8e-9a51-2d6f8e4b9c10.pdf"
}
}Errors
| Status | Message | What to do |
|---|---|---|
| 400 | file is required | Send the file in the file multipart part. |
| 400 | Transaction has no payout to attach a document to | Initialize the payout first; only payout transactions accept documents. |
| 403 | Document does not belong to this company | The transaction or document belongs to another business. |
| 404 | Transaction not found | Check the transaction ID. |
| 413 | file exceeds the maximum allowed size | Reduce the file below 10 MB and retry. |