> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paynext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept a Payment

> Accept your first payment from a new customer using the PayNext SDK.

Accept a payment from a customer who hasn't paid through PayNext before. The SDK handles payment method collection, validation, and 3D Secure authentication automatically.

## When to Use

| Scenario                                     | Guide                                                                      |
| -------------------------------------------- | -------------------------------------------------------------------------- |
| **New customer**, first payment              | This guide                                                                 |
| **Returning customer**, saved payment method | [Charge Returning Customers](/guides/use-cases/charge-returning-customers) |

## Prerequisites

Before accepting payments:

1. **PayNext account** with API keys ([Testing & Sandbox](/guides/introduction/testing-and-sandbox))
2. **Processor connected** in **Dashboard → Integrations**
3. **Plan created** in **Dashboard → Plans** (defines amount and currency)
4. **Payment methods enabled** in **Dashboard → Checkout**

## Integration

Follow the [SDK Quickstart](/sdk-reference/introduction/getting-started) to:

<Steps>
  <Step title="Create a client session">
    Call `POST /client-session` from your server with customer email and plan ID.
  </Step>

  <Step title="Mount the SDK">
    Initialize checkout with the session `id` as `clientToken`.
  </Step>

  <Step title="Handle the result">
    Use `onCheckoutComplete` and `onCheckoutFail` callbacks.
  </Step>
</Steps>

<Tip>
  The SDK Quickstart includes complete code examples for Next.js and vanilla TypeScript, plus optional optimizations like preloading.
</Tip>

<Note>
  Using a **one-off plan** with a variable amount? Add a `plan.price` to the client session to override the plan's amount for this checkout. See [Custom Pricing](/guides/platform/plans#custom-pricing).
</Note>

## 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)

For subsequent charges, use [Charge Returning Customers](/guides/use-cases/charge-returning-customers) to leverage the saved payment method.
