> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpaycheckout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ended

> This event is triggered when a subscription is successfully ended after all billing cycles.

```json theme={null}
{
  "eventId": "whe_fooD944t4VUKkaDT",
  "eventType": "subscription.ended",
  "eventTime": 1729608043615,
  "subscriptionId": "sub_fooBOwYsaK50AEfK",
  "metadata": { 
    "orderId": "12345",
    "customerNote": "Deliver after 5 PM" 
  } 
}
```

**eventId** `string`

&#x20;

A unique identifier for this specific event. This ensures that each event can be
tracked and processed individually.&#x20;

**eventType** `string`

&#x20;

Describes the type of event. In this case, it signifies that a subscription has
been successfully ended.&#x20;

**eventTime** `integer`

&#x20;

The timestamp when the event was generated, typically in milliseconds since the
Unix epoch (January 1, 1970). This value can be used to track when the event occurred.&#x20;

**subscriptionId** `string`

&#x20;

A unique identifier for the specific subscription that has been completed.&#x20;

**metadata** `object`

A collection of key-value pairs that were provided when the object was
created. These metadata values are echoed back in the response, allowing you
to store and retrieve custom information such as context-specific attributes,
references, or tags. This can be useful for correlating records in your system
or attaching meaningful context to transactions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.