Skip to main content
Browser Pay connects to the Browser Use browser your worker drives through a CDP WebSocket URL. Browser Use returns cdpUrl, which can be an HTTPS address, so resolve it first. If you already have a browser, start at Resolve the WebSocket URL.

Create a browser

Create a browser session with your Browser Use API key. This starts a browser in your Browser Use account. It does not create a Sapiom transaction.
timeout is in minutes. Make it long enough for the whole checkout.

Resolve the WebSocket URL

An HTTPS cdpUrl serves the WebSocket URL at /json/version. Browser Pay does not do this lookup for you:
Pass cdpUrl to attachInterceptor, and connect your driver to the same URL. Do not pass liveUrl; it is for watching the browser.

Stop the browser

After checkout settles, call handle.detach(), close your driver, and stop the browser: