---
agentTools:
  projectIndex: https://docs.ninepay.com.br/llms.txt
  projectSearch: https://docs.ninepay.com.br/agentSearch?query=term1%20term2
---

# External Checkout

The external checkout lets you process payments, links and subscriptions without building a checkout on your website or app.

## How it works

The flow is very simple: you send the customer to a NinePay page where they make the payment and/or subscribe, and NinePay notifies your system via webhook!

## Example: creating a subscription with predefined customer data

When creating a subscription, NinePay needs to collect basic customer information such as name and email. Sometimes you will prefer your own system to send this information instead of letting the customer fill it in at checkout, since they may make mistakes along the way.

For that, we recommend that, before sending the customer to the external checkout, your system makes a call to create this customer's record in NinePay. Then, with their ID in your system, you can use the Create a Subscription resource already linked directly to this customer, and they will only need to fill in the payment details at checkout.

> 👍 Tip
>
> Another advantage of this flow is that, with the customer ID saved in your system beforehand, you can receive and process notifications/webhooks more easily.

## Using the endpoints to create a subscription with predefined customer data

1. Use the [create plan endpoint](/reference/criar-novo-plano) or create one in the dashboard. You need a plan to create a subscription, because every subscription is linked to a plan.
2. Use the [create customer endpoint](/reference/criar-novo-cliente). Every subscription has a linked customer.
3. Use the [create subscription endpoint](/reference/criar-nova-assinatura). In this endpoint's success response, you will receive a `uuid` field in the subscription data. Use this value to redirect the user to the checkout page:
   - in production: `https://checkout.ninepay.com.br/subscription/<uuid>/activate`;
   - in the sandbox: `https://app.sandbox.cefispay.com.br/subscription/<uuid>/activate`.

  > 📘 Note
  >
  > Replace `<uuid>` with the value received when creating the subscription.
