# Subscription

This resource represents a recurring billing agreement for a customer. Subscriptions allow businesses to automatically charge customers on a regular schedule according to a defined billing plan.

## List subscriptions

 - [GET /subscriptions](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/getsubscriptions.md): Returns a list of subscriptions matching some criteria. The subscriptions are returned sorted by creation date, with the most recent subscriptions appearing first.

## Create a new subscription

 - [POST /subscriptions](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/createsubscription.md): Creates a new subscription for a customer with specified billing plan and schedule. The subscription will be created in 'created' status and will be activated when the customer completes the first payment.

## Retrieve a subscription by ID

 - [GET /subscriptions/{id}](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/getsubscriptionbyid.md): Retrieves the details of a specific subscription by its unique identifier.

## Pause a subscription

 - [PATCH /subscriptions/{id}/pause](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/pausesubscription.md): Pauses an active subscription. While paused, the subscription will not process any payments. A paused subscription can be resumed later using the resume endpoint.

## Resume a paused subscription

 - [PATCH /subscriptions/{id}/resume](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/resumesubscription.md): Resumes a paused subscription. Once resumed, the subscription will continue processing payments according to its original schedule. Only subscriptions in 'paused' status can be resumed.

## Cancel a subscription

 - [PATCH /subscriptions/{id}/cancel](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/cancelsubscription.md): Cancels a subscription. Once cancelled, the subscription will stop processing future payments. This action cannot be undone, but you can create a new subscription if needed.

## Update next payment date

 - [PATCH /subscriptions/{id}/next-payment-date](https://docs.glomopay.com/api-documentation/apis/openapi/subscription/updatenextpaymentdate.md): Updates the next payment date of a subscription.

