When to Use
| Scenario | Guide |
|---|---|
| New customer, first payment | This guide |
| Returning customer, saved payment method | Charge Returning Customers |
Prerequisites
Before accepting payments:- PayNext account with API keys (Testing & Sandbox)
- Processor connected in Dashboard → Integrations
- Plan created in Dashboard → Plans (defines amount and currency)
- Payment methods enabled in Dashboard → Checkout
Integration
Follow the SDK Quickstart to:1
Create a client session
Call
POST /client-session from your server with customer email and plan ID.2
Mount the SDK
Initialize checkout with the session
id as clientToken.3
Handle the result
Use
onCheckoutComplete and onCheckoutFail callbacks.What Happens Next
After a successful first payment:- Customer created in PayNext with saved payment method
- Payment method stored securely for future charges
- Subscription started (if using a recurring plan)