Skip to main content

Order Invoiced

Webhook 

Type: order.reconciliation.invoiced.v1

Occurs when an order has been successfully fulfilled and the corresponding invoice has been created by Two.

Payload

The data object in the payload contains IDs that link the order and the invoice, along with the amount and currency of the invoice to be paid back by the buyer.

Example:

{
"specversion": "1.0",
"id": "01FBJ0PYJ7931K0CJ6GMP8N3WG",
"type": "order.reconciliation.invoiced.v1",
"time": "2023-06-21T12:34:56.123456Z",
"source": "https://api.two.inc",
"subject": "order/a9f5d2d3-5d6d-4e2a-a4b4-6c7f8a9d0f1e",
"twomerchantid":"b6b9d5d1-f6b7-4e15-9703-9c32c6e5c1c2",
"data": {
"root_order_id": "a9f5d2d3-5d6d-4e2a-a4b4-6c7f8a9d0f1e",
"order_id": "a9f5d2d3-5d6d-4e2a-a4b4-6c7f8a9d0f1e",
"invoice_id": "7a5a7b9b-7d9e-4e9e-b9b1-2d7c658e1a4d",
"merchant_id": "b6b9d5d1-f6b7-4e15-9703-9c32c6e5c1c2",
"billing_period_id": "175bda61-c6f2-4b9d-a429-5f31c83ecc10",
"amount": "150.65",
"currency": "GBP"
}
}

Triggering in sandbox

  1. Create an order through the checkout API service in your sandbox environment. Capture the order ID from the resulting response.
  2. Fulfill the order. There may be a short delay while the fulfilment process completes asynchronously.
  3. Once the order state moves from FULFILLING to FULFILLED, the buyer representative email specified in the order request will receive an invoice. Simultaneously, the order.reconciliation.invoiced.v1 webhook will be sent by the webhook gateway to any endpoints you have configured to receive it.

Request

Responses

Successful Response