Send an event about a document (invoice.paid, invoice.issued, invoice.cancelled)

Use data.connection.events_url from any webhook (it is also shown on the connection screen).
invoice.paid needs features.invoicing.capabilities.paid_events: true, invoice.issued and
invoice.cancelled need features.invoicing.capabilities.external_documents: true in your manifest.

invoice.paid

Report that a proforma (payment request), a deposit invoice or an invoice issued unpaid was paid,
typically by bank transfer.
SAPI then marks the order as paid, sets the payment date, updates the affiliate commission
and runs the customer's configured after payment form – which may trigger the final invoice
(invoice.create). If your system issues the final invoice itself on payment, send it in
final_invoice and SAPI stores it instead. A paid invoice has no final invoice: final_invoice must be null.

Orders that are already paid or refunded are ignored (200, status: ignored), so
re-sending an event is safe.

invoice.issued

Report a document your system issued on its own – not as the answer to an invoice.create – e.g. the
customer turned a proforma into an invoice in your system by hand. SAPI stores it exactly like the answer
to a request (number and PDF on the order, partner id for a later storno). For an invoice or a receipt
the customer's after billing actions run. If the order already has an active document of the same
slot (invoice and receipt share one; proforma; deposit; per installment), the event is ignored:
already_stored when it is the same number, already_issued otherwise.

invoice.cancelled

Report a storno your system made on its own. original_document is the cancelled document (invoice,
receipt or deposit, with its number); SAPI stores the storno's number and PDF in the order's storno
fields and frees the slot, so the order can be invoiced again. No action runs – like a native storno.
A document that is already cancelled is ignored (already_cancelled); a number that is not a document
of the order is rejected (422).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The connection id (data.connection.id in the webhooks), {list id}-{connection number}.

Body Params

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
length ≤ 100

Your own id of the request – shown in the customer's log.

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Choose an example:
application/json