Order Credited
Webhook
Type: order.reconciliation.credited.v1
Occurs when a credit note is applied against an invoice.
Payload
The data object in the payload contains IDs that indicate the order and invoice the credit note has been
applied to. Also note the following within the payload:
credit_note: Contains information about the credit note itself, including its ID, the amount on the credit note and when the credit note was applied.
Example
{
"specversion": "1.0",
"id": "01FBJ0PYJ7931K0CJ6GMP8N3WG",
"type": "order.reconciliation.credited.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",
"credit_note": {
"refund_id": "433401fe-76ae-4e10-b091-59788c90a5df",
"credited_at": "2023-06-21T12:30:12.012345Z",
"credit_note_amount": "101.65"
}
}
}
Triggering in sandbox
- Create and fulfil an order (see the
order.reconciliation.invoiced.v1webhook for details). - Refund the order by using the "Refund order" endpoint from the Two webhooks Postman collection.
- Once the refund process is completed, the
order.reconciliation.credited.v1webhook will be sent to any endpoints subscribed to this event.
Request
Responses
- 200
- 422
Successful Response
Validation Error