Hosted checkout snippet

For sites that cannot run JavaScript, use a plain HTML link or GET form pointing at /pay. CX Pay creates a checkout session from your publishable key + fixed-price payment button and redirects the payer to hosted checkout.

  1. Create a publishable key and payment button on /install (amount, description, success/cancel URLs are set on the button).
  2. Paste the snippet below — when logged in, Install pre-fills your publishable id.
  3. Optional query param order / ref is stored as payment metadata.
<!-- Link -->
<a href="https://cxpay.cash/pay?pk=cxpay_pk_live_YOUR_KEY&button=btn_YOUR_BUTTON_ID">
  Pay with CX Pay
</a>

<!-- Form -->
<form action="https://cxpay.cash/pay" method="get">
  <input type="hidden" name="pk" value="cxpay_pk_live_YOUR_KEY" />
  <input type="hidden" name="button" value="btn_YOUR_BUTTON_ID" />
  <input type="hidden" name="order" value="1001" />
  <button type="submit">Pay with CX Pay</button>
</form>

Prefer a scripted button? See the JS button guide. Dynamic cart amounts belong on your server with a secret key or SDK.