Issue a document for an order

Sent when an order needs an invoice, proforma (payment request), deposit invoice or receipt –
after a successful payment, on a form submission with automatic invoicing, for an installment,
or when the customer starts batch invoicing.

Answer 200 with the issued document, or 202 and report the result on data.callback_url.

SAPI does not send the request when

  • document.type, the currency or – for invoices and deposit invoices – the format is not in your manifest's
    features.invoicing.capabilities (the customer is notified instead), or
  • the order already has a valid (not cancelled) document of the same kind – an invoice or receipt, a proforma,
    a deposit invoice, per installment. A second trigger (e.g. the customer's "after payment" automation after you
    already sent the final invoice in invoice.paid) is answered by SAPI itself.
Payload

Common envelope of every message (Standard Webhooks payload format).

const
enum
required

Message type.

Allowed:
date-time
required

When the message was created (not the attempt time).

boolean
Defaults to false

Test message – validate it, but do not issue a legally valid document.

data
object
required
Headers
string
required
length ≤ 100

Unique message id, identical on every retry of the same message. Use it for idempotency.

integer
required

Unix timestamp (seconds) of this attempt. Reject if more than 5 minutes off.

string
required

Space-separated v1,<base64> signatures.

Responses

5XX

Temporary failure. SAPI retries the message with the same webhook-id.

LoadingLoading…