POST /v1/checkout/sessions.
Create checkout sessions from your backend with your secret key. The browser SDK renders a native Pasteaza modal on your page using only your public key and the returned checkout
reference.Install
Add the SDK script to your checkout page.Open checkout
Create the checkout session on your backend, then pass the returnedreference to the SDK.
Pay button
Usebutton.js when you want Pasteaza to render a ready-made button.
How it works
1
Create session
Your backend creates a checkout session using your Pasteaza secret key.
2
Pass reference
Your frontend passes the returned
reference to PasteAZA.checkout.3
Confirm checkout
The SDK retrieves the public checkout session and confirms the merchant, amount, currency, and status.
4
Open modal
The SDK renders a responsive Pasteaza modal on your page. Desktop uses a centered modal. Mobile uses a bottom sheet.
5
Receive event
The SDK calls your
onSuccess, onFailed, onClose, or onError callback.Full example
Events
Options
Notes
PasteAZA.checkout("ch_...")andPasteAZA.checkout({ checkout: "ch_..." })both open the same hosted checkout session.- Never expose your secret key in browser code.
- Use webhooks as your source of truth for order fulfillment. SDK callbacks are for user experience.