Invoice payment events
Receive invoice payment information through a callback event. Each event identifies the invoice and includes payment amounts, dates and bank account details.
Configuration and authentication
Invoice payment event callbacks support HTTP Basic authentication. Configure the following values for callback delivery:
| Setting | Description |
|---|---|
| Endpoint | The HTTPS URL where invoice payment event callbacks will be delivered. |
| Username | Username used for HTTP Basic authentication at your callback endpoint. |
| Password | Password used for HTTP Basic authentication at your callback endpoint. |
The username and password are sent using the HTTP Basic Authorization header. These settings are separate from the event payload and the OAuth credentials used to call the Capway API. Keep callback credentials private.
Event payload
The callback body is a JSON array of event objects. Each event has syncType set to "event" and syncSubType set to "invoicepaid". The data field is an object containing the invoice and payment details.
Callback body fields
Field paths below are relative to each event in the array. All fields are mandatory. Amounts are strings, matching the supplied payload format. The sample uses demo identifiers and account details.
| Field path | Mandatory | Description |
|---|---|---|
| correlationId | Yes | string Correlation identifier for the payment event. |
| timestamp | Yes | string Timestamp when the payment event was sent. |
| syncType | Yes | string Set to "event". |
| syncSubType | Yes | string Set to "invoicepaid". |
| status | Yes | string Empty string in the supplied payload format. |
| data | Yes | object Invoice and payment information for this event. |
| data.orderId | Yes | string Invoice number associated with the payment. |
| data.invoiceGuid | Yes | string Unique identifier of the invoice. |
| data.currentBalance | Yes | string Remaining invoice balance. Sent as a JSON string in the supplied format. |
| data.paymentRegistrationDate | Yes | string Date when the payment was registered. |
| data.paymentDate | Yes | string Payment date. |
| data.paidAmount | Yes | string Paid amount. Sent as a JSON string in the supplied format. |
| data.currencyCode | Yes | string Currency code for the payment, for example "SEK". |
| data.bankAccountId | Yes | string Identifier of the bank account associated with the payment. |
| data.bankAccountDescription | Yes | string Description of the bank account associated with the payment. |
| data.bankAccountOwnerType | Yes | string Bank account owner type: "Solicitor" when the source owner type is 1, "Client" when it is 2, and "Unknown" for any other value, including null. |
Bank account owner type
| Source owner type | bankAccountOwnerType |
|---|---|
| 1 | "Solicitor" |
| 2 | "Client" |
| Any other value or null | "Unknown" |
