Publish a draft invoice (partner perimeter).
Transitions invoice from 'draft' to 'published'. Allocates the underlying virtual account by composing payment-intent creation. Idempotency: if invoice is already published, returns 409 with the current state in the error details — partner can re-fetch via GET to recover the published response. If invoice is in any other non-draft state ('paid', 'cancelled', etc.), returns 409.
Partner-visible credential identifier issued by bank-rail at credential provisioning time. Names which credential signed the request; the corresponding signing secret never appears in any request.
In: header
Path Parameters
Partner-supplied invoice reference.
Response Body
application/json
curl -X POST "https://example.com/api/v1/bankrail/invoice/invoice-2026-001/publish"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "reference": "string", "partnerId": "bf408d53-df49-40a6-8455-a34bd4360901", "status": "published", "title": "string", "description": "string", "amountKobo": 0, "amountPaidKobo": 0, "currency": "string", "customer": {}, "dueAt": "2019-08-24T14:15:22Z", "publishedAt": "2019-08-24T14:15:22Z", "paidAt": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "persistentVirtualAccountId": "dc3e3963-3c41-4bb3-a139-f4a98adf9807", "virtualAccount": "string", "virtualAccountName": "string", "virtualAccountBank": "string", "trackingId": "string", "checkoutToken": "string", "createdAt": "2019-08-24T14:15:22Z", "creatorMetadata": {}}Read an invoice by reference (partner perimeter). GET
Returns the current state of an invoice owned by the authenticated partner. Payment-surface fields (virtualAccount, virtualAccountName, virtualAccountBank, trackingId, checkoutToken) populated only when status >= 'published'.
Cancel an invoice (partner perimeter). POST
Transitions invoice to 'cancelled' (terminal). Cancellable from 'draft', 'published', or 'partially_paid'. If the invoice was published, the underlying virtual account is archived (further credits to that VA fall through to 'unmatched' triage). Existing partial credits on a cancelled invoice are preserved forensically; refund-of-cancelled-invoice is deferred future work per design §12.1.