Checkout
Take payments on your own page or on a page hosted by NinePay
You can let NinePay collect the payment details in two ways:
Embedded Checkout
The ninepay.js iframe inside your page, matching its look.
External CheckoutRedirect the customer to a NinePay page and get the result by webhook.
In both cases, grant access through the webhook, never through the browser return.
Which one to choose
- External checkout: the quickest integration, with no payment screen to build. The customer leaves your site and pays on a NinePay page.
- Embedded checkout: the customer stays on your site. Payment happens in a NinePay iframe inside your page, matching its look.
Differences
| External checkout | Embedded checkout (ninepay.js) | |
|---|---|---|
| Where the customer pays | On a NinePay page you redirect the customer to | On your page, in a NinePay iframe |
| What stays on your page | No payment screen | Title, amount and the pay button; the iframe shows the methods, the card fields and the PIX QR code |
| Before integrating | Nothing | Register in the dashboard the site addresses that open the iframe (up to five) |
| Subscription | Create plan, customer and subscription, then redirect to https://checkout.ninepay.com.br/subscription/<uuid>/activate | Create the subscription with method and no card; its first invoice stays open and paying it in the iframe activates the subscription |
| Methods | Those on the NinePay page | Card, PIX Automático, PIX and boleto (no Open Finance: banks don't open inside an iframe) |
| Card data | Stays on the NinePay page | Goes from the iframe straight to NinePay; your page never sees it |
In both cases, the API token stays on your server only.