Update a financing invoice
Replaces the set of documents attached to the invoice beyond its invoice document (the buyer's supporting documents), the deductions the buyer withholds from the payout and/or the VAT separated from the face value. Any of them, at least one. Each document is attached first via the documents endpoint; this names them on the invoice. Requires org:merchants:write — it changes the invoice, not the documents.
Authorization
oauth2 Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.
In: header
Path Parameters
Canonical sales-app merchant id, shared with Core. Legacy ids remain readable.
1 <= length <= 255Invoice id.
uuidRequest Body
application/json
Update an invoice: its attached documents, deductions and/or VAT. At least one field is required; each replaces the current value.
1 <= propertiesResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/financing/merchants/01JZQ5W7M5Y83M6F1D6E0A2K8N/invoices/550e8400-e29b-41d4-a716-446655440000" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6", "attached_document_ids": [ "2daa2194-1f27-4d7b-a37c-8fc5cf0db85c" ], "deductions": [ { "id": "string", "kind": "VAT", "label": "string", "basis": "BASIS_POINTS", "basis_points": 0 } ], "vat": { "basis": "RATE", "rate_basis_points": 1, "paid": true }, "rejection_reason": "DUPLICATE_INVOICE", "rejection_note": "string", "rejected_by": "string", "rejected_at": "2019-08-24T14:15:22Z", "amount_minor_units": 250000, "currency": "KES", "details": { "property1": null, "property2": null }, "due_date": "2019-08-24", "issued_date": "2019-08-24", "status": "PENDING", "created_at": "2019-08-24T14:15:22Z"}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}{ "code": "INVALID_PARAMS", "description": "user_id must be a UUID", "identifier": "string", "invalid_params": [ { "path": "user_id", "reason": "must be a UUID", "sub_code": "string" } ]}Get a financing invoice GET
Returns one financing invoice belonging to the merchant. Requires `merchant:financing.invoices:read` on the merchant.
Reject a financing invoice POST
The buyer's rejection of a pending invoice: moves it to REJECTED and records the coded reason, the optional note the supplier sees, who rejected and when. Only a PENDING invoice can be rejected. Requires `org:merchants:write`.