Skip to main content

Event ingestion

Sent by the health check process when some events received in the previous hour do not match the validation rules.

Arguments

array
required
List of events transaction_id for which the code attribute does not match an existing billable metric.
array
required
List of events transaction_id for which the aggregation property defined in the billable metric field_name attribute is missing or invalid.
array
required
List of events transaction_id for which the groups properties defined at the billable metric level are missing or invalid.
This webhook is deprecated and no longer sent in Lago v0.50.0-beta and above. It was sent when there was an error related to the creation of an event.

Arguments

string
required
HTTP status of the error. Possible statuses are 404 or 422.
string
required
HTTP error code. Possible errors are Not found or Unprocessable entity.
string
required
Error code. See next list for the description of each error code.
string
required
JSON provided at event creation.

Errors

Invoices

Sent when a new invoice is in draft.

Arguments

JSON
required
Returning an invoice object.
Sent when an invoice is finalized. This event serves as a signal to your application that the invoice processing is complete and you can proceed with the necessary billing actions or procedures.

Arguments

JSON
required
Returning an invoice object.
Sent when a one-off invoice is created. Only add-ons can be applied to one-off invoices.

Arguments

JSON
required
Returning an invoice object.
Sent when prepaid credits have been added to the customer’s wallet. You can use this information to generate a PDF invoice or collect the payment.

Arguments

JSON
required
Returning an invoice object.
Sent when the PDF file has been generated for a customer invoice. This will allow your application to retrieve the PDF invoice.

Arguments

JSON
required
Returning an invoice object.
Sent when the payment status of an invoice is updated based on information provided by the payment provider.

Arguments

JSON
required
Returning an invoice object.

Subscriptions and fees

Sent when a fee for a charge to be paid in advance is created. You can use this information to collect the payment of the pay_in_advance fee. Useful for fintech that need to create a statement of transactions without invoicing.

Arguments

JSON
required
Returning a fee object.
Sent when a subscription starts.

Arguments

JSON
required
Returning a subscription object.
Alert for imminent termination of subscriptions with set end dates, sent 45 days and 15 days prior (at fixed intervals).

Arguments

JSON
required
Returning a subscription object.
Sent when a subscription is terminated.

Arguments

JSON
required
Returning a subscription object.
When a subscription undergoes an upgrade or downgrade, you will be notified via two webhook messages as follows:
  1. subscription.terminated for the initial plan, which includes the property next_plan_code populated with the code of the new plan.
  2. subscription.started for the new plan, which includes the property previous_plan_code populated with the code of the initial plan.
Sent when the free trial is ended for a subscription.

Arguments

JSON
required
Returning a subscription object.

Wallets

Sent when a wallet transaction is created.

Arguments

JSON
required
Returning a wallet transaction object.
Sent when a wallet transaction is updated. For example, when wallet transaction is marked as settled.

Arguments

JSON
required
Returning a wallet transaction object.
Sent when the ongoing balance is negative or equal to 0.

Arguments

JSON
required
Returning a wallet object.

External payment providers

This webhook is sent when a customer is successfully created in the payment provider’s application. This allows you to retrieve the identifier assigned to the customer by the payment service provider.

Arguments

JSON
required
Returning a customer object.
Sent when a checkout link is issued for a customer.

Arguments

String
required
Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer’s record within the Lago system.
String
required
The customer external unique identifier (provided by your own application).
String
required
The default payment provider attached to this customer.
String
required
URL that should be utilized to set up the payment method within the payment provider’s system.
This webhook is sent when there is an error related to the creation of a customer in the payment provider’s system.

Arguments

String
required
Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer’s record within the Lago system.
String
required
The customer external unique identifier (provided by your own application).
String
required
The default payment provider attached to this customer.
String
required
The error message sent by the payment provider.
String
required
The error code sent by the payment provider.
Sent when there is an error related to the payment process. Usually occurs when no valid payment method is defined for the customer in the payment service provider’s application.

Arguments

String
required
Unique identifer of the invoice in Lago application.
String
required
Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer’s record within the Lago system.
String
required
The customer external unique identifier (provided by your own application).
String
required
Unique identifer of the customer in payment provider application.
String
required
The default payment provider attached to this customer.
String
required
The error message sent by the payment provider.
String
required
The error code sent by the payment provider.
This notification is sent whenever a dispute or a chargeback is lost within your payment provider.

Credit notes and refunds

Sent when a new credit note has been issued for a customer. This will allow your application to proceed with the refund.

Arguments

JSON
required
Returning a credit note object.
Sent when the PDF file has been generated for a credit note. This will allow your application to retrieve the PDF credit note.

Arguments

JSON
required
Returning a credit note object.
This webhook is sent when there is an error related to a credit note refund of a payment previously created on a payment provider.

Arguments

String
required
Unique identifer of the credit note in Lago application.
String
required
Unique identifer of the customer in Lago application.
String
required
Unique identifer of the customer in your application.
String
required
Unique identifer of the customer in payment provider’s system.
String
required
The payment provider used to process the payment.
String
required
The error message sent by the payment provider.
String
required
The error message sent by the payment provider.