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

# Customers & Subscriptions Examples

> Runnable subscription examples per language: create or reuse a customer, then create, retrieve and cancel a subscription.

Working code for the Customers & Subscriptions flow: create or reuse a customer, then create, retrieve
and cancel a subscription. Renewal, failure, past-due and cancellation are handled through the
[Webhooks](/examples/webhooks) examples.

**Guide:** [Subscriptions Overview](/subscriptions/overview) ·
[Lifecycle](/subscriptions/lifecycle) · [Customers](/payments/customers)
**API reference:** [Subscriptions](/api-reference/subscriptions/reference)
([create](/api-reference/subscriptions/create) · [get](/api-reference/subscriptions/get) ·
[cancel](/api-reference/subscriptions/cancel)) · [Customers](/api-reference/customers/reference)

## Example code by language

| Language          | Directory                                                                                             | README                                                                                     |
| ----------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| TypeScript / Node | [`typescript/subscriptions/`](https://github.com/PagouAi/examples/tree/main/typescript/subscriptions) | [README](https://github.com/PagouAi/examples/blob/main/typescript/subscriptions/README.md) |
| Python            | [`python/subscriptions/`](https://github.com/PagouAi/examples/tree/main/python/subscriptions)         | [README](https://github.com/PagouAi/examples/blob/main/python/subscriptions/README.md)     |
| PHP               | [`php/subscriptions/`](https://github.com/PagouAi/examples/tree/main/php/subscriptions)               | [README](https://github.com/PagouAi/examples/blob/main/php/subscriptions/README.md)        |
| Java              | [`java/subscriptions/`](https://github.com/PagouAi/examples/tree/main/java/subscriptions)             | [README](https://github.com/PagouAi/examples/blob/main/java/subscriptions/README.md)       |
| C# / .NET         | [`dotnet/subscriptions/`](https://github.com/PagouAi/examples/tree/main/dotnet/subscriptions)         | [README](https://github.com/PagouAi/examples/blob/main/dotnet/subscriptions/README.md)     |
| Go                | [`go/subscriptions/`](https://github.com/PagouAi/examples/tree/main/go/subscriptions)                 | [README](https://github.com/PagouAi/examples/blob/main/go/subscriptions/README.md)         |
| Ruby              | [`ruby/subscriptions/`](https://github.com/PagouAi/examples/tree/main/ruby/subscriptions)             | [README](https://github.com/PagouAi/examples/blob/main/ruby/subscriptions/README.md)       |

## Operations exercised

`postCustomers` · `getCustomersById` · `postSubscriptions` · `getSubscriptionsById` ·
`postSubscriptionsByIdCancel`
