Skip to main content
POST
Accept Invoices

Headers

Idempotency-Key
string
required

Unique key for this webhook delivery used to deduplicate scheduling. Recommended to use a UUID. Maximum length 36 characters.

X-Organization-Id
string
required

Identifier of the organization/tenant that owns the invoices. Used for routing, logging, and idempotent task naming.

Body

application/json
invoices
WebhookInvoice · object[]

List of invoice payloads to process. A single request may contain up to 100 invoices; larger payloads will be rejected.

Response

Successful Response

status
enum<string>
required

Scheduling outcome for this webhook: 'scheduled' when a new Task is enqueued, 'duplicate' when a task already exists for the same Idempotency-Key, 'completed' (reserved for future use and not currently emitted), or 'error' when Cloud Tasks rejected the request.

Available options:
scheduled,
duplicate,
completed,
error
task_id
string
required

Deterministic Tasks identifier derived from organization and Idempotency-Key.

scheduled_for
string<date-time>
required

UTC timestamp when the Task is scheduled to run.

idempotency_key
string
required

Opaque key supplied by the caller to deduplicate webhook deliveries (max 36 chars).

Required string length: 1 - 36
invoices_count
integer
required

Number of invoices accepted from the request payload.

received_at
string<date-time> | null

UTC timestamp when the webhook was received by the service.