JavaScript Payment_request Guide
The Payment Request API streamlines checkout with native browser payment UI, supporting cards, Apple Pay, and Google Pay. The guide walks through Payment Requests. `new PaymentRequest(methods, details, options)`. Methods: `[{supportedMethods:"basic-card"}]`. Details: `{total:{label:"Total",amount:{currency:"USD",value:"19.99"}}}`. Show: `const response = await request.show()`. Complete: `response.complete("success")`. Check: `request.canMakePayment()`. Use for: streamlined checkout, consistent payment UX across devices. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page. Practice what you learn in the JavaScript playground, and look up any unfamiliar term in the JavaScript glossary.