# Orders

Use these operations to manage customer orders.
An order is a customer's request to purchase items.
It can contain subscription and one-time sale items.
When an order contains one or more subscription items, it is a subscription order.

An order generates an invoice.
A subscription order generates an invoice for each service period.
For more information, see [Orders](https://www.rebilly.com/docs/dev-docs/concepts/#orders).

## Retrieve orders

 - [GET /subscriptions](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncollection.md): Retrieves a list of orders.

## Create an order

 - [POST /subscriptions](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscription.md): Creates an order.

To create or update an order with a specified ID, use the Upsert an order operation.

## Retrieve an order

 - [GET /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscription.md): Retrieves an order with a specified ID.

## Upsert an order

 - [PUT /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscription.md): Creates or updates (upserts) an order with a specified ID.

## Delete a pending order

 - [DELETE /subscriptions/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscription.md): Deletes a pending order with a specified ID.

## Void a subscription order

 - [POST /subscriptions/{id}/void](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionvoid.md): Voids a pending order with a specified ID.

## Change subscription order items

 - [POST /subscriptions/{id}/change-items](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionitemschange.md): Changes subscription order items or quantities, and designates if or when pro-rata credits should be given.

## Update a subscription order item

 - [PATCH /subscriptions/{id}/items/{itemId}](https://www.rebilly.com/docs/dev-docs/api/orders/patchsubscriptionitem.md): Updates a subscription order item.
This is an experimental endpoint and may be changed or removed in the future.

## Issue an interim invoice

 - [POST /subscriptions/{id}/interim-invoice](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptioninteriminvoice.md): Issues an interim invoice for a subscription order.
Use this operation for plan changes and pro rata adjustments.

This process:

  - Creates an invoice.
  - Adds the subscription line items to the invoice.
  - Issues the invoice.
  - Optionally, applies payment to the invoice if a transactionId is supplied.

## Retrieve subscription order pauses

 - [GET /subscription-pauses](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionpausecollection.md): Retrieves a list of subscription order pauses.

## Pause a subscription order

 - [POST /subscription-pauses](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionpause.md): Pauses a subscription order with a specified ID.

## Retrieve a subscription order pause

 - [GET /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionpause.md): Retrieves a subscription order pause with a specified ID.

## Update a subscription order pause

 - [PUT /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscriptionpause.md): Updates a subscription order pause.

## Delete a subscription order pause

 - [DELETE /subscription-pauses/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscriptionpause.md): Deletes a subscription order pause with a specified ID.
If the specified pause is pending, it is revoked.
If the specified pause is ongoing, it is finished.

## Retrieve subscription order cancellations

 - [GET /subscription-cancellations](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncancellationcollection.md): Retrieves a list of subscription order cancellations.

## Cancel a subscription order

 - [POST /subscription-cancellations](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptioncancellation.md): Cancels a subscription order.

## Retrieve a subscription order cancellation

 - [GET /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptioncancellation.md): Retrieves a subscription order cancellation with a specified ID.

## Upsert a subscription order cancellation

 - [PUT /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/putsubscriptioncancellation.md): Creates or updates (upserts) a subscription order cancellation with a specified ID.

## Update a subscription order cancellation

 - [PATCH /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/patchsubscriptioncancellation.md): Updates a subscription order cancellation with a specified ID.
Use this operation to update a cancellation reason and description.

## Delete a subscription order cancellation

 - [DELETE /subscription-cancellations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/deletesubscriptioncancellation.md): Deletes a subscription order cancellation with a specified ID.

> Important: Only subscription order cancellations with a status of draft can be deleted.

## Retrieve subscription order reactivations

 - [GET /subscription-reactivations](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionreactivationcollection.md): Retrieves a list of subscription order reactivations.

## Reactivate a subscription order

 - [POST /subscription-reactivations](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionreactivation.md): Reactivates a subscription order with a specified ID.

## Retrieve a subscription order reactivation

 - [GET /subscription-reactivations/{id}](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionreactivation.md): Retrieves a subscription order reactivation with a specified ID.

## Retrieve an upcoming subscription order invoice

 - [GET /subscriptions/{id}/upcoming-invoice](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionupcominginvoice.md): Retrieves an upcoming invoice for a specified subscription order.

An upcoming invoice is an invoice that has not been issued.
It functions as a preview of the next invoice for the order.
For more information, see Invoices.

## Issue an upcoming invoice for early pay

 - [POST /subscriptions/{id}/upcoming-invoice/issue](https://www.rebilly.com/docs/dev-docs/api/orders/postsubscriptionupcominginvoiceissuance.md): Issues an upcoming invoice, for a subscription order with a specified ID, for early pay.

## Preview an order

 - [POST /previews/orders](https://www.rebilly.com/docs/dev-docs/api/orders/postprevieworder.md): Previews an order.
Use this operation to preview a draft order before making an order.

## Retrieve upcoming subscription order invoice (deprecated)

 - [GET /subscriptions/{id}/upcoming-invoices](https://www.rebilly.com/docs/dev-docs/api/orders/getsubscriptionupcominginvoicecollection.md): Retrieves an upcoming invoice for a specified subscription order.

This endpoint is deprecated.
Use Retrieve an upcoming invoice instead.

## Issue a specific upcoming invoice for early pay (deprecated)

 - [POST /subscriptions/{id}/upcoming-invoices/{invoiceId}/issue](https://www.rebilly.com/docs/dev-docs/api/orders/postupcominginvoiceissuance.md): Issues an upcoming invoice with a specified ID for early pay.

This endpoint is deprecated.
Use Issue an upcoming invoice for early pay instead.

## Hard usage limit reached

 - [POST hard-usage-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/hard-usage-limit-reached.md)

## Order abandoned reminder

 - [POST order-abandon-reminder](https://www.rebilly.com/docs/dev-docs/api/orders/order-abandon-reminder.md)

## Order abandoned

 - [POST order-abandoned](https://www.rebilly.com/docs/dev-docs/api/orders/order-abandoned.md)

## Order completed

 - [POST order-completed](https://www.rebilly.com/docs/dev-docs/api/orders/order-completed.md)

## Renewal invoice issued

 - [POST renewal-invoice-issued](https://www.rebilly.com/docs/dev-docs/api/orders/renewal-invoice-issued.md)

## Soft usage limit reached

 - [POST soft-usage-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/soft-usage-limit-reached.md)

## Subscription order activated

 - [POST subscription-activated](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-activated.md)

## Subscription order canceled

 - [POST subscription-canceled](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-canceled.md)

## Subscription order churned

 - [POST subscription-churned](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-churned.md)

## Subscription order created

 - [POST subscription-created](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-created.md)

## Subscription order downgraded

 - [POST subscription-downgraded](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-downgraded.md)

## Subscription items changed

 - [POST subscription-items-changed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-items-changed.md)

## Order modified

 - [POST subscription-modified](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-modified.md)

## Subscription quantity filled limit reached

 - [POST subscription-quantity-filled-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-quantity-filled-limit-reached.md)

## Subscription order reactivated

 - [POST subscription-reactivated](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-reactivated.md)

## Subscription renewal reminder

 - [POST subscription-renewal-reminder](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-renewal-reminder.md)

## Subscription order renewed

 - [POST subscription-renewed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-renewed.md)

## Subscription order trial converted

 - [POST subscription-trial-converted](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-converted.md)

## Subscription order trial end reminder

 - [POST subscription-trial-end-reminder](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-end-reminder.md)

## Subscription order trial ended

 - [POST subscription-trial-ended](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-trial-ended.md)

## Subscription order upgraded

 - [POST subscription-upgraded](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-upgraded.md)

## Subscription order paused

 - [POST subscription-paused](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-paused.md)

## Subscription order pause created

 - [POST subscription-pause-created](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-created.md)

## Subscription order pause modified

 - [POST subscription-pause-modified](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-modified.md)

## Subscription order pause revoked

 - [POST subscription-pause-revoked](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-pause-revoked.md)

## Subscription order resumed

 - [POST subscription-resumed](https://www.rebilly.com/docs/dev-docs/api/orders/subscription-resumed.md)

## Trial usage limit reached

 - [POST trial-usage-limit-reached](https://www.rebilly.com/docs/dev-docs/api/orders/trial-usage-limit-reached.md)

## Order delinquency time reached

 - [POST order-delinquency-reached](https://www.rebilly.com/docs/dev-docs/api/orders/order-delinquency-reached.md)

