Upload Document
Upload a B2B services file — the commercial invoice, or a delivery proof after settlement — and get back a ref.
Overview
Uploads one file for a B2B services payment and answers with aref. What you do with that ref depends on which of the two document steps you are in:
ref. That separation is what lets the same upload endpoint serve both the verification step and the post-settlement one — and it is why neither step needs a draft of its own. An upload is durable, so a ref you are holding is your draft.Classify the payment first
Thetype you may send depends on which flow the payment is in, so the payment has to be in one. A VBA credit arrives unclassified, and until you have sent its business_model and purpose_code through Submit Verification Details an upload is refused:
Invalid B2B services request. This one cannot: the classification is exactly what is missing, so naming a flow would be a guess. The code is 40359 either way.The request
multipart/form-data, two parts:
X-Merchant-ID, naming the settling sub-merchant, exactly as on the verification endpoints.Document types
B2B services uses two, and takes no others:type decides where the file is stored, so it also decides which call can cite the resulting ref: an invoice ref is citable on Submit Verification Details, a delivery_proof ref in refs on Submit Settlement Documents. Cite one on the other call and it reads as unknown — ERR_B2B_SETTLEMENT_001 on the settlement submit, Unknown document ref. on the verification one.
A type outside these two — including document codes other flows define, such as passport — is refused:
The file
Validated on upload, so a bad file fails here rather than at submit time.The response
201, with the ref:
documents[].ref on the verification submit, or in refs on the settlement submit.The file is stored against the payment in the path, so the ref is only citable from that payment. A ref from one of your other payments reads as unknown, exactly as a made-up one does — the answer never distinguishes the two.type you sent.Uploading more than one
Both types accumulate. Every upload adds its own row and returns its ownref; nothing supersedes anything, and an earlier ref stays valid.
Invoices. A payment may carry several — an amended invoice beside the original, or a job billed across two. You only cite the invoice code once on Submit Verification Details; the citation names the code, so every invoice on the payment is filed when the set completes. A second invoice needs no citation of its own.
Delivery proofs. Collect them as they arrive, including before the payment settles. Nothing is filed until you submit, and refs on that call is the whole set — a proof you would rather not file is one you leave out, and it is dropped. That is the settlement step’s way of undoing an upload; the verification step has no equivalent.
Once the settlement set is submitted it is locked. A further delivery_proof upload is refused with ERR_B2B_SETTLEMENT_002.
No waivers on this flow
Some checklists let a document be discharged with awaiver_reason instead of a file. The B2B services checklist has no waivable item — the commercial invoice is required, and there is nothing to waive. A waiver_reason sent on this flow is a 400.
Related
Get Verification Requirements
Submit Verification Details
ref is bound to a checklist code.Submit Settlement Documents
delivery_proof refs are filed, after settlement.B2B Services Verification
Authorizations
Client Application ID - Your unique application identifier used to authenticate API requests. You can find your Client ID in the Developer Settings section of the merchant dashboard.
Client Secret Key - Your secret key used alongside the Client ID for secure authentication. Keep this confidential and never expose it in client-side code. Available in the Developer Settings section of the merchant dashboard.
Merchant Identifier - The unique ID for the merchant account. This is required for PSP (Payment Service Provider) merchants who manage multiple merchant accounts. You can find merchant IDs in the Merchant Management section of the dashboard.
API Version - Specifies which version of the API to use (e.g., '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which API version your integration uses. Default version information is available in the Developer Settings.
Path Parameters
UID of the payment the document is for.
Body
The document file. Allowed extensions: pdf, png, jpg, jpeg, docx, xlsx, csv. Maximum 10 MB. Password-protected PDFs are rejected.
Document type — one of the codes the checklists ask for, so the value you upload under is the value you submit under. Read the ones this payment actually needs from Get Verification Requirements rather than mapping this list into your code: it is the complete set any checklist can ask for, and it grows as the regulatory matrix is revised. delivery_proof is the one type here that no checklist asks for: it is a post-settlement compliance document, uploaded through this endpoint and then filed by ref through Submit post-settlement documents.
offer_letter, passport, student_id_or_visa, student_id, fee_invoice, passenger_list, traveller_passports, traveller_visas, ticket, invoice, relationship_declaration, delivery_proof "offer_letter"