This demo allows you to play with the various options, inputs and payment methods you can provide to the PaymentRequest API.
Please note that this demo will not charge you. It'll simply go through the payment process and print the details at the bottom of this page.
The values will not add up in the total since the Payment Request API does no calculations.
It's possible to define any number of display items in the Payment Request UI.
It's up to the merchant to ensure that the list of items equals the total value shown in the order summary, the Payment Request API performs no calculations.
Try adding both valid and invalid amounts in the display items and the summary total to see the differences.
The order summary is the value that is shown most prominently to the user, it should be treated as the total of the users transaction.
Change the name, total and currency to see how it effects the UI.
The API can also request information for the user. The type of transaction will determine will often dictate what is needed.
Call Payment Request
The Payment Request API has a range of supported payment methods.
When you are ready to request payment from the user, you call
paymentRequest.show(), which is what will happen when
you click one of "Pay" buttons below.
If you complete a "purchase" with the payment request API, the result will be printed below.
Press the "Buy Now" button.