Skip to main content
Subscriptions automate recurring billing by linking customers to plans. Define billing cycles, trial periods, and pricing once—PayNext handles charges, renewals, and failed payment recovery automatically.
Before creating subscriptions, set up a recurring plan in your Dashboard. See Plans to learn how to configure billing cycles, trial periods, and pricing.

The Subscription Lifecycle

When a customer completes checkout with a recurring plan, PayNext creates a subscription and manages it through these stages:

Subscription Statuses

A past_due subscription also pauses retries when its saved payment method can no longer be charged at all, and resumes—immediately—if a card update revives it. See Dead payment methods.

Create a Subscription

Include a recurring plan.id in your client session. When checkout completes, PayNext creates the subscription automatically.
PayNext sends a subscription_v2.created webhook and schedules future renewals based on the plan’s billing cycle.

Manage Subscriptions

Change Plans

Upgrade or downgrade active subscriptions:
Editing a plan in the Dashboard only affects new subscriptions. Existing subscribers keep their original terms.

Cancel

You can cancel subscriptions immediately or schedule cancellation for the end of the billing cycle. Customer keeps access until the current billing cycle ends, then transitions to cancelled.
  • Dashboard — Select subscription → CancelAt end of billing cycle
  • APIPOST /subscriptions/schedule-cancel/{id}
The subscription moves to scheduled_for_cancellation and automatically transitions to cancelled when the cycle ends.

Cancel immediately

Ends the subscription now. Customer loses access immediately.
  • Dashboard — Select subscription → CancelImmediately
  • APIPOST /subscriptions/cancel/{id}
Immediate cancellation does not issue refunds automatically. If you want to refund, perform this action separately via API or Dashboard.

Cancellation details

Every cancelled subscription records why it ended and when, so you can tell voluntary churn apart from dunning exhaustion, workflow rules, and fraud/dispute activity. Two fields carry this — both always present on the subscription, and null until it’s cancelled: For scheduled cancellations, cancellation_details is populated at schedule time (visible on the subscription_v2.scheduled_for_cancellation event) and finalized when the subscription ends. Reactivating a subscription clears both fields back to null.
The reason is server-owned — you choose the cancellation type (cancel_immediately or schedule_cancellation), never the reason. Your API and Dashboard cancels are always attributed merchant_initiated. A cancel request that includes a reason-like field (reason, cancellation_details, trigger_payment_id) is rejected with 400.

Reactivate

Set status: active with PATCH /subscriptions to reactivate a scheduled_for_cancellation or cancelled subscription. What happens depends on whether the paid period (current_period_end) is still active.
When the paid period has ended, the reactivation charge determines the outcome:
  • Charge succeedsactive with a new billing period.
  • Charge failspast_due; the subscription enters the standard dunning flow and access is not restored.
Either way, PayNext emits a single subscription_v2 event reflecting the resulting status (subscription_v2.activated on reactivation, or subscription_v2.past_due if the reactivation charge fails).
A past_due subscription cannot be reactivated with this endpoint—collect payment via SDK checkout instead. See Recover Subscriptions.

Handle Failed Payments

When a renewal payment fails, PayNext automatically retries up to 8 times. During this period, the subscription remains past_due.
Notify users when their payment fails and prompt them to update their payment method. Use the SDK to let customers recover their subscription directly. See Recover Subscriptions.

Automatic retry

PayNext attempts recovery automatically. Track progress via the subscription_v2.past_due webhook, which carries an incremented attempt_count on each retry:
An attempt can also run ahead of its scheduled slot. For a payment declined for insufficient funds, the card network signals when the funds are likely there and the attempt runs at that moment instead—it replaces the scheduled attempt rather than adding one. See Funds-Available Retries.

Billing date on recovery

When recovery succeeds, the next billing date shifts to the recovery date plus one billing interval—not from the original renewal date. Example: A 28-day subscription was due to renew on Dec 1, but the payment failed. Recovery succeeds on Dec 5. The next billing date is Jan 2 (Dec 5 + 28 days), not Dec 29 (Dec 1 + 28 days).

Recovery exhausted

If all 8 retry attempts fail, the subscription automatically transitions to cancelled.

Webhook Events

Listen for these events to keep your system in sync: See Webhook Events for the full list and payload schemas.