- A transaction whose
nextAction.typeispayment_ready. See Authorize a transaction. - A Chromium browser your code controls, with a Chrome DevTools Protocol (CDP) WebSocket endpoint.
- The buyer’s key.
Install
Get the placeholder card
List the buyer’s placeholders and pick the one whosetransactionId matches your transaction:
number, expMonth, expYear, cvc and injectionRef. Your code, not your AI model, should fill the card fields. Keep placeholders out of logs and out of the model’s context.
Attach Browser Pay, then fill the form
Attach before typing any card field, and wait forattachInterceptor to resolve:
continueUrl, fill the card fields with the placeholder’s number, expiry and cvc, and submit. When checkout finishes, call await handle.detach().
cdpUrl is a CDP WebSocket URL, or a Puppeteer or Playwright object that provides one through wsEndpoint().
Check the result
Whatever the event, the next step is the same: confirm the order. No event proves that money did or did not move.
Browser Pay currently works with Shopify card checkout. It does not support Shop Pay yet. Options, events and reason codes are in the Browser Pay SDK reference.