Skip to main content

Customer In Arrears

Webhook 

Type: customer.in_arrears_block.v1

Occurs for the first 7 days when a customer enters into arrears, meaning they have an unpaid invoice that is more than 28 days past due and are now unable to place orders until they repay their most overdue invoices that meet this past 28 days condition

Payload

The data object in the payload contains data that indicates the customer details who has entered into arrears, and further details on the invoices that are most overdue if they belong to this merchant

Example

{
"specversion": "1.0",
"id": "01FBJ0PYJ7931K0CJ6GMP8N3WG",
"type": "customer.in_arrears_block.v1",
"time": "2023-06-21T12:34:56.123456Z",
"source": "https://api.two.inc",
"subject": "in_arrears_block",
"twomerchantid": "b6b9d5d1-f6b7-4e15-9703-9c32c6e5c1c2",
"message": (
"Two B2b LTD (13078389) is now in arrears."
"Please see the details for the invoice that is due the earliest"
),
"data": {
"buyer_company_name": "Two B2b LTD",
"buyer_organization_number": "13078389",
"days_in_arrears": 5,
"earliest_invoice_due_belongs_to_merchant": True,
"earliest_invoice_number": "123123",
"earliest_invoice_due_date": "2024-05-05",
"earliest_invoice_gross_amount": 100.0,
"earliest_invoice_currency": "GBP"
}
}

Triggering in sandbox

There is no active trigger to send this webhook as it runs as a cronjob on a daily schedule if the arrears conditions are met for any customer from this merchant. The SVIX portal however allows for test events to be sent to a given endpoint

Request

Responses

Successful Response