1
Create the session on your server
Exactly as in Accept payments, then send its
url to the browser. Don’t send your key or the whole session.Express
2
Open it in the browser
3
Confirm the payment on your server
onSuccess tells you the buyer finished, so you can update the page. It can’t prove a payment: anyone can call it from the browser console. Ship only after the escrow.funded webhook, or after fetching the session.Redirect or overlay?
If the session has a
return_url, the receipt still shows a Back to button that takes the whole page there. Leave return_url out if you’d rather move the buyer on yourself from onSuccess or onClose.