Developers · SDKs
vexoli.js
The browser SDK opens the cashier as a popup (bottom sheet on mobile) and posts status back to your page. Create the order on your server first — never with a secret key in the browser.
<script src="https://paysetu-api.theraphael.online/sdk/vexoli.js"></script>
<script>
Vexoli.open({
token: "pay_...", // from POST /v1/orders (server-side)
// payment_url: "...", // alternative to token
onSuccess: (res) => { /* UX only — show a thank-you state */ },
onFailure: (res) => { /* UX only */ },
onDismiss: () => { /* customer closed the cashier */ }
});
</script>Callbacks are UX-only
onSuccess does not prove payment. A customer can close, spoof or interrupt browser callbacks. Fulfil orders only after your server receives and verifies the signed payment.success webhook. See the Webhooks guide.
How the popup talks to your page
The cashier page posts messages to its parent window on status change — { type: 'vexoli:success' }, { type: 'vexoli:failed' } and { type: 'vexoli:dismiss' } — which the SDK translates into the callbacks above. If you embed the cashier yourself, listen for those message types and check the event origin.
No-JS / redirect flow
Simply send the customer to the order's payment_url. The hosted cashier works on its own, and your webhook still confirms the result.