Skip to main content
DELETE

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

external_id
string
required

External ID of the existing subscription

Example:

"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"

Query Parameters

status
string
default:active

Selects which subscription to terminate for the given external_id, based on its status. If the field is not defined, Lago targets only active subscriptions.

  • pending: cancel a subscription scheduled for a future activation (include status=pending).
  • incomplete: cancel a payment-gated subscription that is still awaiting its activation payment (include status=incomplete). The subscription is canceled with cancellation_reason: manual, its invoice is closed and nothing is billed, and any pending payment is canceled on a best-effort basis with the payment provider (some provider statuses cannot be canceled). Applied coupons, credit notes and wallet credits are recredited. Termination behaviours (on_termination_credit_note, on_termination_invoice) are ignored, as an incomplete subscription has never been billed.
Example:

"incomplete"

on_termination_credit_note
enum<string>

When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default. This field allows you to control the behavior of the credit note generation:

  • credit: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.
  • refund: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.
  • skip: No credit note is generated for the unused subscription time.

Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans.

Available options:
credit,
refund,
skip
Example:

"credit"

on_termination_invoice
enum<string>

When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage. This field allows you to control the behavior of the invoice generation:

  • generate: An invoice is generated for the unbilled usage.
  • skip: No invoice is generated for the unbilled usage.
Available options:
generate,
skip
Example:

"generate"

Response

Subscription terminated

subscription
object
required