Next Commerce
Checkout

Checkout

The Checkout turns a plain HTML <form> into a working order page. Add data-next-checkout to a <form>, tag each input with a field attribute, and the SDK collects the data, validates it, tokenizes the card (swaps the card number for a secure token so it never touches your server), creates the order, and redirects to your confirmation page.

New to Campaigns? Set up the SDK, an API key, and a cart first at Campaigns → Getting Started. This section assumes those are already in place — see Get Started → Prerequisites.

How It Works

  1. A single <form data-next-checkout> becomes the checkout — one enhancer (a class the SDK attaches to an element with a data-next-* attribute) drives the whole flow
  2. Inputs are matched by data-next-checkout-field attributes, not by their name — so your HTML structure is up to you
  3. On submit, the SDK validates every field, tokenizes the card with Spreedly, and posts the order to the API
  4. On success it clears the cart, then redirects to the order confirmation (or upsell) page

Express buttons (PayPal, Apple Pay, Google Pay), address autocomplete, and prospect-cart email capture all attach to the same form.

On this page