Shoppex.mount, pass mode: 'test'.
Where it runs
- On every site in your allowed sites.
- On
http://localhostandhttp://127.0.0.1, on any port, without a list entry. - In the live preview on the dashboard’s Elements tab.
data-shoppex-product-id or items. Product groups and invoices are live only.
What happens on Pay
The block sends the events of a live purchase, in the same order:steptopayment, if the buyer was still on the details stepinvoice-createdwith{ invoiceId: 'test_…', test: true }steptoprocessingsuccesswith{ invoiceId: 'test_…', test: true }steptosuccess
test_. No invoice with that ID exists, so the Developer API and webhooks do not know it. Use the test flag to keep test purchases out of your own records.
Simulate an error
The Events card on the Elements tab shows every message between the preview and the page. Pick an error code and click Simulate Error. The preview reloads, and the next Pay … · Test click sends that error instead ofsuccess:
- A payment error, like
payment_declined, comes afterinvoice-created, and the block returns to the payment step, as a declined payment does live. - A checkout error, like
out_of_stock, comes before an invoice would exist.
payment_declined, payment_failed, authentication_failed, gateway_handoff_failed, amount_below_minimum, cart_rejected, out_of_stock, coupon_invalid, email_rejected, checkout_blocked and checkout_failed. See Error codes.
Go live
Change the mode tolive, or remove it, and publish on a site from your list. A live block takes real payments. Live mode on localhost needs http://localhost:<port> in the list.