Integration demoAlpine Escapes is a fictional travel merchant with SplitPay in its checkout. Test mode: no real money moves.

Alpine Escapes

Trip › Guests › Payment

Complete your booking

Val Thorens Ski Trip

Chalet Les Arolles · 4 nights · 4 guests · ski-in/ski-out

Chalet Les Arolles, 4 nights
€1,080.00
Cleaning and bed linen
€60.00
Tourist tax (4 guests)
€60.00
Total
€1,200.00
How Alpine Escapes integrated SplitPay

Two pieces: a button on the checkout page and one route on the shop's server. The shop's secret test key never reaches your browser.

Checkout page

checkout.html
<script src="https://splitpay.pro/sdk/v1.js"></script>

<button data-splitpay
        data-endpoint="/integration-demo/api/checkout">
  Pay with SplitPay
</button>

Shop server

POST /integration-demo/api/checkout
const r = await fetch("https://splitpay.pro/api/v1/group-payments", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.SPLITPAY_SECRET_KEY },
  body: JSON.stringify({
    reference: booking.id,         // "AE-7K2P9Q"
    amount: 120000,                // EUR 1,200.00
    currency: "EUR",
    description: "Val Thorens Ski Trip · 4 nights",
    participants: 4,
    success_url: ".../integration-demo/booking/AE-7K2P9Q",
    cancel_url: ".../integration-demo",
    webhook_url: ".../api/integration-demo/webhook",
  }),
});
return { checkout_url: (await r.json()).checkout_url };