Questions tagged [payment-request-api]
59 questions
22
votes
4 answers
Why would Stripe paymentRequest.canMakePayment() fail on Localhost?
I'm getting this to work on my production server, but on localhost canMakePayment() returns null.
I've traced this through the minified Stripe code but hit a wall with function ko which just sends an action called CAN_MAKE_PAYMENT to some message…

Freewalker
- 6,329
- 4
- 51
- 70
9
votes
1 answer
When using Stripe's PaymentRequestButton how can I change the label and total before submitting the token request?
I have the button working using test data, but there is a form that collects the amount and sets the label with a dropdown. I need to update the payment request button with the form data just before submitting.
I have the button initialized and it…

dawoodman71
- 395
- 4
- 16
8
votes
2 answers
Firefox - ReferenceError: PaymentRequest is not defined
I am trying to implement google pay on a website. The external library for google pay is loaded from pay.google.com. In this google script, they call the browser api PaymentRequest(). This api is built in popular browsers like Safari, Chrome, etc.
I…

Kyle Waid
- 302
- 3
- 14
8
votes
3 answers
How to get default shipping address with Payment Request button before customers clicks "Pay"? I'm using Stripe.js & Elements
I'm using Stripe's PaymentRequest button to collect payment & shipping information to later process the payment with Stripe on the server side. I'm targeting ApplePay, but currently testing under PaymentRequest API (Chrome).
I need to know the…

Jacob
- 81
- 2
8
votes
1 answer
What is the difference between Google Pay API vs Payment Request API?
I saw that Google released a new Google Pay API for the web. However, there is also a Payment Request API fo the web. Is Google Pay just a rebrand of Payment Request API? In what cases would you use one API over the other?

SweG
- 120
- 1
- 8
5
votes
1 answer
Apple Pay integration with Angular
I want to integrate ApplePay and GooglePay in our Angular application.
For GooglePay, google has provided a useful package for npm. https://www.npmjs.com/package/@google-pay/button-angular
I tried to find a similar good package for ApplePay but…

CharithJ
- 46,289
- 20
- 116
- 131
4
votes
4 answers
Google Pay - ERROR: Request Failed - Unexpected developer error, please try again later
When I try to pay(on TEST environment) with Google Pay on a real device I get a the error in the title.
I have tried changing 'gateway' into a string like the google docs show it but so far nothing.
const DETAILS = {
id: 'COMPANY',
displayItems:…

Owpur
- 203
- 1
- 3
- 12
3
votes
1 answer
What is the google pay equivalent of Apple Pay canMakePayments() method?
I want to see if there is a way to quickly check on the mobile web on chrome whether or not a user has Google Pay enabled. On IOS, I can call window.ApplePaySession.can make payments() method on safari dev tools to instantly know if the user has…

A.B.
- 81
- 6
3
votes
1 answer
GooglePay Error: "Must be in a top-level browsing context or an iframe needs to specify 'allowpaymentrequest' explicitly"
This has happened to me when I tried to add Google Pay via Stripe into my app. It has appeared only after deployment, not during local development.
The app does not use any iframes and the code is run in top-level browser context.

Martin Malinda
- 1,573
- 11
- 20
3
votes
1 answer
Current list of supportedMethods for the W3C PaymentRequest API
This is the only reference I could find on the web listing URL based PSPs adhering to the the PaymentRequest API. Does anyone have a more recent or comprehensive one?
This is the list in that link: -
Existing payment method identifiers
Google Pay…

McMurphy
- 1,235
- 1
- 15
- 39
3
votes
2 answers
Google Pay & Web Payment Request API:
I've been trying to implement Google Pay by following the Google Pay API PaymentRequest Tutorial. I have everything implemented, however when I try to test on my Android phone, I get the following popup:
Request Failed
An unexpected error has…

David Mihal
- 944
- 6
- 23
2
votes
2 answers
Payment request button via Stripe does not work when add shipping address
I am using stripe to add the Payment request button(Apple, Google, Pay Now) by following the documentation https://stripe.com/docs/stripe-js/elements/payment-request-button
which is working fine but I need to add the shipping address and when I…

Muhammad Usman
- 51
- 6
2
votes
1 answer
Payment Request API - Pay Cash option
Is it possible to add a "Cash on Delivery" option to the Payment Request API ?
Can I solve this problem with methodData?

Kloot
- 228
- 1
- 2
- 8
2
votes
1 answer
How does paymentRequest API distinguish between debit, credit and other categories cards?
paymentRequest API documentation tells that a merchant can provide details to browser of what all kinds of card it supports. My question is how does browser knows the card types stored by the user and filter it.

Jagajit Prusty
- 2,070
- 2
- 21
- 39
1
vote
1 answer
Stripe: Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user activation
While doing google pay using stripe in react
If any Backend API taking some more time then paymentrequest.show() method is throwing below error.
Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user…

Mitul Sheth
- 51
- 6