Order Recoursed
Webhook
Type: order.reconciliation.recoursed.v1
Occurs when Two applies the option to recourse an invoice back to the merchant. This may not be applicable to your contract with Two so you may never see recourse events.
Payload
The data object in the payload contains IDs that indicate the order and invoice that have been recoursed. Also
note the following child object within the payload:
recourse: Contains specific information about the recourse event as recorded in the Two system, including the specific amount that has been recoursed back to the merchant.
Example
{
"specversion": "1.0",
"id": "01FBJ0PYJ7931K0CJ6GMP8N3WG",
"type": "order.reconciliation.recoursed.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",
"recourse": {
"recourse_id": "4228e51d-45ba-4a7f-a279-0f332bfead9c",
"recoursed_at": "2023-06-31T12:34:56.123456",
"recourse_amount": "101.65"
}
}
}
Triggering in sandbox
- Create and fulfil an order (see the
order.reconciliation.invoiced.v1webhook for details). - Recourse the order by using "Recourse order" endpoint from the Two webhooks Postman collection.
- Once the recourse simulation is completed, the
order.reconciliation.recoursed.v1webhook will be sent to any endpoints subscribed to this event.
Request
Responses
- 200
- 422
Successful Response
Validation Error