#Aggressive_Pickle
1 messages · Page 1 of 1 (latest)
To summarise, you update the PI but the Google Pay UI does not reflect those changes. Correct?
The UI isn't really the issue. Whenever I do a callout using Stripe JS, Stripe will generate a token for google pay (and presumably any payment method under Stripe Wallet). The problem is that Stripe JS is reusing the same token in a subsequent api call and an error is thrown.
Which error? What is a 'callout'?
I've attached the payment intent Id. The error is
"message": "The token tok_1Msz6SDLFJuEW2E7UlUJ14fD has already been used. Each token can only be used once to create a source."
"type": "invalid_request_error"
Callouts are stripe.updatePaymentIntent() and stripe.confirmPayment()
Ah, I guess it's this beta: https://stripe.com/docs/payments/run-custom-actions-before-confirmation
Yeah, that seems to be our implementation
It supports Card and US Bank Account but google pay seems to be an issue as far as I know
Is there any docs that I can read that discusses what payment methods are supported for this version?
Checking on this. AFAIK, Google Pay should work
Thanks @fallen pasture
Can you share more details on your integration? Specifically your front-end logic?
We have a function that updates the payment intent. Supposedly, all we're doing here is grabbing the payment method token in the response.
await setupData.stripe.updatePaymentIntent({
elements,
params: {}
}).then(function (result) {
const error = result.error
if (!error) {
messageService.sendMessage('paymentMethodToken', { "paymentIntent": result.paymentIntent, "isSavePaymentMethod": document.getElementById('savePaymentMethodCheckbox')?.checked });
return;
}
handleError(error);
})
We perform an additional api call on client-side after running some custom logic on the server side to confirm the payment and this is how we perform the call:
const { error } = await setupData.stripe.confirmPayment({
elements,
confirmParams: {
return_url: setupData.redirectUrl,
error_on_requires_action: setupData.errorOnRequiresAction
},
});
Let me know if you need more information than this
Hi! I'm taking over this thread.
Unfortunately we are not very familiar with this since it's a beta feature. I would recommend to ask Stripe support directly here: https://support.stripe.com/contact
Make sure to include all relevant information (code, error message, documentation link, etc.) in your message.
Got it