Skip to content

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:

SettingDescription
EndpointThe HTTPS URL where invoice payment event callbacks will be delivered.
UsernameUsername used for HTTP Basic authentication at your callback endpoint.
PasswordPassword 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 pathMandatoryDescription
correlationIdYesstring
Correlation identifier for the payment event.
timestampYesstring
Timestamp when the payment event was sent.
syncTypeYesstring
Set to "event".
syncSubTypeYesstring
Set to "invoicepaid".
statusYesstring
Empty string in the supplied payload format.
dataYesobject
Invoice and payment information for this event.
data.orderIdYesstring
Invoice number associated with the payment.
data.invoiceGuidYesstring
Unique identifier of the invoice.
data.currentBalanceYesstring
Remaining invoice balance. Sent as a JSON string in the supplied format.
data.paymentRegistrationDateYesstring
Date when the payment was registered.
data.paymentDateYesstring
Payment date.
data.paidAmountYesstring
Paid amount. Sent as a JSON string in the supplied format.
data.currencyCodeYesstring
Currency code for the payment, for example "SEK".
data.bankAccountIdYesstring
Identifier of the bank account associated with the payment.
data.bankAccountDescriptionYesstring
Description of the bank account associated with the payment.
data.bankAccountOwnerTypeYesstring
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 typebankAccountOwnerType
1"Solicitor"
2"Client"
Any other value or null"Unknown"