Purchases

The purchases endpoint is used to create and manage purchases in Uelz. A purchase represents a financial operation and can be either:

Unique → a one-time purchase charged immediately.

Subscription → a recurring purchase based on a predefined plan.


Subscription Purchase Statuses

A purchase of type subscription can take several statuses.

pending: Subscription has a plan with has_service_activation_date = true, and the service activation date is in the future. No billing yet.

trialing: Subscription has a plan with trial days defined and is currently in the trial period. No charges have been applied yet. The subscription will move to active when the trial period is over.

active: Subscription is up to date. The last charge was successful.

succeeded: Subscription has completed all billing cycles in the plan. End date has passed.

paused: Subscription was paused by the organization. No charges are being made to the customer.

past_due: The last charge failed and is currently in a retry process.

When all retry attempts fail, the organization can choose how the subscription behaves:

unpaid: The failed cycle is marked unpaid, but the subscription remains active. Customer will still be charged in the next billing cycles.

canceled: The subscription is ended, and no further cycles will be charged. This status can also occur if the subscription is canceled voluntarily by the customer or the organization.