Lightbox

Add a hosted payment form to your website so customers can pay without leaving your site.

Lightbox provides a pre-built, customizable checkout form. You embed a short HTML snippet to display it on your website.

⚠️

Digital Wallets and Surcharging are Not Supported.

Lightbox is a quick integration tool that is prebuilt. Lightbox does not support digital wallets, Apple Pay or Google pay, and does not support the use of Surcharging.

If you are interesting in Digital Wallets or Surcharging, see DIgital Wallets or Surcharging.






Implementing Lightbox

Use the code snippet from Stax Checkout to add the payment form with your web payments token already included.

  1. Log into Stax Pay and open Apps > Stax Checkout.
  2. Launch the app and copy your unique HTML code snippet. Use the data-webpaymentstoken value from this snippet rather than a sample token.
  3. Embed the complete snippet on your website. Keep the generated settings for your initial setup; add optional fields only after you verify that the form opens.
  4. Open your website and click Pay with Stax. You should see the Lightbox payment form without leaving your site.

If you change the pay_now div's id, update data-button to match it, with a leading #. For example, id="pay_now" requires data-button="#pay_now". These are HTML identifiers, not Dashboard UI labels. If the form does not open, check that these values match and that you copied the complete snippet from Stax Pay > Apps > Stax Checkout.


Optional: Customize the Payment Form

Add fields such as Transaction Amount and Billing Address to collect additional payment details. Keep the default Pay with Stax button flow unless you need to open the form automatically.


You can add optional fields to customize the Checkout payment form.

ParameterDescriptionType
data-amountThe amount due in USD; do not include currency symbols or commas. If data-amount is omitted or is 0, the customer will be required to manually enter an amount.?
data-nameCardholder name that can be prefilled.String
data-billingIncludeIf true, the user will be requested but not required to enter their address, city, state, and zip code. If false or omitted, the billing fields will not be displayed.Boolean
data-billingRequiredIf true, the user must fill in all billing fields. Note that data-billingInclude must be true to display the billing fields.Boolean
data-billingAddress1Billing address associated with the card.String
data-billingCityThe city associated with the card.String
data-billingState2-letter abbreviation for the state. Note that the state will be used to determine if surcharging, if applicable, can be applied.Enum
data-billingZipZip code associated with the card.String
data-billingEmailPrefilled email address. This is where a payment receipt will be sent.String
data-expDateCard expiration date: MM/YY format required.integer
data-openOnLoadIf true, Lightbox opens as soon as the JavaScript runs instead of waiting for the customer to click the button. Stax recommends using the Pay with Stax button whenever possible.Boolean
data-displayConfirmationDefaults to false. If true, it displays a confirmation modal after a successful transaction. The message displayed in the confirmation model is Payment Successful. Your payment was approved. Please check your email for transaction details.Boolean


Did this page help you?