Skip to main content
Charge customers who have already completed a payment with PayNext. Their payment method is securely stored, so you can process additional charges without collecting card details again.

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

Key difference: SDK Checkout automatically prompts the customer to update their card if payment fails. API-Only charges require you to notify the customer separately.

Choose Your Approach

Use SDK checkout when possible. If payment fails, the customer can immediately update their card—significantly improving success rates.

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.
One-off plans accept a custom price: add plan.price ({ "amount", "currency" }) to the client session to override the plan’s amount for this checkout. See Custom Pricing.

Example: One-Time Charge

cURL
Then mount the SDK with the returned session id:

Payment Method Display

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.
Not recommended for most use cases. If payment fails, you must notify the customer and get them back to your UI to update their card. SDK checkout handles this automatically.

When to Use

Create a Charge

cURL

Custom Pricing

For one-off plans, override the plan’s amount for this charge by adding a price 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.
Response:

Handle Failures

When a charge fails, check the advice_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.