When You Need This
- Sell add-ons, credits, or one-time purchases to existing customers
- Upgrade or downgrade subscription plans
- Recover failed subscription payments
- Process charges without showing checkout UI
Decision Flowchart
Choose Your Approach
SDK Checkout
Display checkout with the customer’s saved payment method. If payment fails, they can switch to a new card instantly.Client Session Parameters
For plan changes, include both the new
plan.id and the existing subscription.id. For recovery, omit plan.id—PayNext uses the subscription’s current plan.Example: One-Time Charge
cURL
id:
Payment Method Display
- saved_or_new
- new_only
Shows the customer’s saved card with an option to add a new one.
Demo: saved_or_new checkout flow
Animated demo coming soon
API-Only Charges
Charge a customer’s saved payment method without displaying checkout UI. PayNext processes synchronously and returns the result immediately.When to Use
Create a Charge
cURL
Custom Pricing
For one-off plans, override the plan’s amount for this charge by adding aprice object—useful for variable-amount purchases without a dedicated plan:
cURL
amount is in minor units. The custom price overrides both the default and any localized pricing. Passing price with a recurring plan returns a 400 error.Handle Failures
When a charge fails, check theadvice_code to determine next steps. See Decline Codes for the full list.
For plan changes without immediate payment, use the Schedule Plan Change API instead—no charge occurs until the next billing date.
Subscription Renewals
PayNext automatically handles subscription renewals—you don’t need to create charges manually. Use the approaches above only for:- One-time purchases (add-ons, credits)
- Silent plan upgrades/downgrades
- Manual recovery after failed renewals
For failed subscription renewals, PayNext moves the subscription to
past_due. Use Recover Subscriptions to collect payment with customer interaction.