The checkout opens over your page: a centred window on a computer, the whole screen on a phone. It’s the same checkout as the redirect, with your logo and colour, card and bank transfer, and the receipt. Only how it opens changes.
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.

Content Security Policy

If your site sets one, allow the checkout frame, and the script if you load it from the CDN:
The full options, errors and versions are in the JavaScript and React references.