Next Commerce
CheckoutReference

Attributes

Complete attribute reference for the checkout enhancers.

Activation Attributes

These attributes turn a DOM element into a checkout component.

AttributeElementActivates
data-next-checkout<form>The main checkout form (fields, validation, payment, order, prospect cart)
data-next-enhancer="checkout-review"containerRead-only review of stored checkout data
data-next-express-checkout="container"containerPayPal / Apple Pay / Google Pay buttons

data-next-checkout-type (e.g. standard) may be set on the form as an optional type hint.


Form Field Attributes

Fields are matched by attribute, not by name. Use data-next-checkout-field="<name>" (preferred) or the legacy os-checkout-field="<name>".

Contact & address

Field namePurpose
emailEmail address
fnameFirst name
lnameLast name
phonePhone number
address1Street address
address2Apartment / suite (optional)
cityCity
provinceState / province (select)
postalPostal / ZIP code
countryCountry (select)

Billing (separate billing address)

Same names prefixed with billing-: billing-fname, billing-lname, billing-address1, billing-address2, billing-city, billing-province, billing-postal, billing-country, billing-phone.

Card fields

FieldAttribute / ID
Card numberdata-next-checkout-field="cc-number" (or id="spreedly-number") — empty <div>, not <input>
CVVdata-next-checkout-field="cvv" (or id="spreedly-cvv") — empty <div>, not <input>
Expiry monthdata-next-checkout-field="cc-month" or ="exp-month"
Expiry yeardata-next-checkout-field="cc-year" or ="exp-year"
Cardholder namedata-next-checkout-field="card-name"

Component Containers

Wrap sections of the form so the SDK can manage them. Preferred form is data-next-component; legacy os-checkout-component / os-checkout-element are also accepted.

AttributePurpose
data-next-component="shipping-form"Shipping fields wrapper
data-next-component="billing-form"Billing fields wrapper
data-next-component="different-billing-address"Toggles billing visibility
data-next-component="location"City / state / postal, revealed after address1
data-next-component="billing-location"Billing city / state / postal
data-next-component="shipping-field-row"A single field row

Error Containers

AttributePurpose
data-next-error="<field>" / os-checkout-error="<field>"Field-level validation message target
data-next-component="credit-error" / credit-error-textCredit card / tokenization error
data-next-component="paypal-error" / paypal-error-textPayPal error
data-next-component="express-error" / express-error-textExpress wallet error

Payment Selection

Attribute / selectorPurpose
input[name="payment_method"]Radio group selecting the payment method
data-next-payment-method="<value>" / os-payment-methodMarks an element as a payment method
input[name="shipping_method"]Radio group selecting the shipping method
input[name="use_shipping_address"]Checkbox: billing same as shipping

Payment method values: creditcard_token, paypalpaypal, apple-payapple_pay, google-paygoogle_pay.


Express Checkout

AttributePurpose
data-next-express-checkout="container"Activates the express button container
data-next-express-checkout="buttons"Child element where buttons are injected

Buttons are injected with data-next-express-checkout set to paypal, apple_pay, or google_pay.


Review Block

AttributePurpose
data-next-enhancer="checkout-review"Activates the review container
data-next-checkout-review="<field>"Displays a stored checkout value (dot notation supported)
data-next-formattext (default), name, address, phone, currency
data-next-fallbackText shown when the value is empty

Prospect Cart

Set on the checkout <form>.

AttributePurposeDefault
data-auto-createfalse disables automatic creationenabled
data-trigger-onemailEntry, phoneEntry, emailAndPhone, formStart, manualemailEntry
data-email-fieldEmail input name to watchemail
data-phone-fieldPhone input name to watchphone
data-min-phone-digitsMin digits when intl-tel-input is unavailable
data-prospect-configJSON config applied before individual attributes

Meta Tags (redirect URLs)

Set in the page <head>.

Meta namePurpose
next-success-url (aliases: next-next-url, os-next-page)Success redirect after order
next-failure-url (alias: os-failure-url)Payment failure redirect

On this page