#FKaiB
1 messages · Page 1 of 1 (latest)
Hi, what does your server side code when creating the Payment Intent look like?
@app.route('/create-payment-intent', methods=['POST'])
def create_payment():
try:
data = json.loads(request.data)
# Create a PaymentIntent with the order amount and currency
intent = stripe.PaymentIntent.create(
amount=calculate_order_amount(data['items']),
currency='usd',
automatic_payment_methods={
'enabled': True,
},
)
return jsonify({
'clientSecret': intent['client_secret']
})
except Exception as e:
print("Server Error:", str(e))
print("Traceback:", traceback.format_exc())
return jsonify(error=str(e)), 403```
I see you have enabled automatic_payment_methods here, can you share a request id after you've completed a payment from this page? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Google Pay and Apple Pay are tricky as you need to have a payment method saved in your wallet in your browser. Or else, it won't show.
req_t9mNWhEmqOSthR
Here is the request id
What should I be doing with the request ID?
Looking
This is Payment Links, https://dashboard.stripe.com/logs/req_t9mNWhEmqOSthR.. You've confirmed that you've enabled more payment methods: https://dashboard.stripe.com/settings/payment_methods in your Dashboard?
Just so we are on the same page, the above code you shared is not triggering this.. This payment Link was created from your Dashboard.
Yes I have enabled other payment methods as shown in the screenshot
Automatic payment method only shows compatible payment method. Do you have a shareable url here so that I can test this on my end?
what do you mean by a shareable url?
It's weird because I've enabled Apple pay and Google pay on my account but not Cash App Pay, yet the only one being displayed on the screen is Cash App Pay.
I do see CashApp enabled on your screenshot.
I'm pretty sure I have it off or maybe I'm misunderstanding something
right
So it's turned on and it's working as expected.
on the right side it says "Turn on". Doesn't this mean that it is currently off?
Do you have some Payment Method enabled in Test mode vs. Live mode?
You are right. Cash App was enabled in test mode
and you said earlier that the users will on ly see an option to use Apple Pay or Google Pay when they have a wallet in their browser?
That is correct
Hoe do I add Apple Pay to my safari browser? I thought it automatically does that when you have apple pay on your mac