Order Collected
Webhook
Type: order.reconciliation.collected.v1
Occurs when Two reverts to using a collection agency for recovering any outstanding amounts owed by a buyer for an invoice.
Payload
The data object in the payload contains IDs that indicate the order and invoice that have been sent to the
collection agency. Also note the following child object within the payload:
collection: Contains specific information about the collection that caused this event, including the amount Two has asked the collection agency to recover.
Example
{
"specversion": "1.0",
"id": "01FBJ0PYJ7931K0CJ6GMP8N3WG",
"type": "order.reconciliation.collected.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": "652a57e2-c2de-437b-96a7-2eeac0a37814",
"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": "-101.65",
"currency": "GBP",
"collection": {
"collection_id": "8d5f0cf6-0aee-4cb3-9723-ee221cdfc681",
"collected_at": "2023-06-30T12:34:56.123456",
"collection_amount": "101.65"
},
}
}
Triggering in sandbox
- Create and fulfil an order (see the
order.reconciliation.invoiced.v1webhook for details). - Send the invoice for this order to collections by using the "Collect order" endpoint from the Two webhooks Postman collection.
- Once the collection simulation process is completed, the
order.reconciliation.collected.v1webhook will be sent to any endpoint subscribed to this event.
Request
Responses
- 200
- 422
Successful Response
Validation Error