Headless checkout requires an active Business plan.
What you need
- A storefront or app page on your own domain.
- An active Business plan.
- A headless checkout publishable key from the dashboard.
- At least one allowed origin for the site that will call the browser API.
@shoppexio/checkout-jsinstalled in your frontend app.
Dashboard setup
Open Dashboard -> Settings -> Developer -> Headless Checkout.1
Generate a publishable key
Click Generate key. Copy the
pk_live_... key immediately. The full key is shown only once.2
Add your storefront origin
Add the exact origin that hosts your checkout page, for example
https://yourstore.com.3
Add local development origins
For local testing, add the exact local origin too, for example
http://localhost:3000.
If your site works on both
https://vyy.gg and https://www.vyy.gg, add both origins.
Install
React example
ShoppexPoweredBy is currently required for every Headless Checkout. The SDK checks that the badge is visible before payment confirmation. The server owns this directive; the browser cannot disable it.API shape
The browser SDK sends the publishable key in thex-shoppex-publishable-key header. Shoppex also checks the request Origin header against your allowed origins.
The SDK can:
- create a checkout session
- read the current session status
- apply or remove coupons
- set tips
- select add-ons
- save buyer email, marketing preference, billing address, and method-specific terms acceptance
- save product custom fields and delivery instructions
- start a gateway payment session
- complete zero-total checkouts
- request and verify Customer Balance OTPs, then apply full or partial balance payments
- submit browser-bound proof for manual payment methods
- capture/finalize PayPal and SumUp payments
- fetch delivery after the payment is complete
kind, not the provider name, so your UI works across card, redirect, crypto, balance, and manual payment flows.
Buyer details and payment requirements
Each entry insession.gateways_available contains:
fee_preview: the server-calculated fee for that methodpresentation: merchant label, button label, icon, and provider-attribution preferencerequirements: whether method terms and a billing address must be saved
presentation.hide_provider_attribution only controls the payment provider’s
attribution. It does not remove the required ShoppexPoweredBy badge.
Persist the details before starting the gateway:
Free and Customer Balance checkout
Crypto progress and underpayments
CallgetSession() or the React refresh() action to read the authoritative
payment projection. session.payment_detail includes the exact decimal strings
needed for a crypto progress or underpayment UI:
expected, received, remaining, crypto_currency,
buyer_actionable, buyer_action_reason, provider_status, credited_fiat,
received_fiat_estimate, fiat_currency, confirmations, and
confirmations_needed when those values are available. credited_fiat is the
amount the provider applied to the invoice. received_fiat_estimate is only a
display estimate for crypto observed on-chain and must never be counted as paid.
Keep the amount values as strings. Do not recalculate the remainder with
JavaScript floating-point numbers.
Embed provider adapters
Stripe usesuseStripePaymentSession. The framework-agnostic Headless export also includes:
Manual payment proof
When a manual payment session hasrequire_proof: true, use proof_type to render a note input, image input, or both. Then submit the proof with the completion grant returned by the start call:
Troubleshooting
Generate key fails
Check these first:- The shop has an active Business plan.
- You are using the shop owner account or a team member with permission to manage webhooks/developer settings.
- Your dashboard session is fresh. Refresh the page or log out and back in.
Add origin fails
Use a fullhttp:// or https:// origin. These are valid:
Browser API calls fail
Check the browser response code:Related docs
Headless Commerce Overview
Pick the right integration shape for custom storefronts, apps, and backend flows.
Checkout Embed SDK
Use the hosted modal when you do not need a fully custom checkout UI.
Storefront SDK
Read public product, cart, and storefront data from browser code.
Webhooks
Fulfill orders and update your app after Shoppex receives payment events.