#LEOLIU
1 messages · Page 1 of 1 (latest)
Hi there
As for Apple Pay payment, the payment flow would be 1. we must retrieve a new PaymentMethodID from Stripe's SDK, 2. attach it to a particular customerID, 3. invoke Create PaymentIntent API to complete the Apple Pay payment
We're wondering if we can switch the order of the payment flow, that after completing #1, we proceed to #3 and then #2?
Would the PaymentMethodID still be available to be attached to a customer?
I think it's possible if in #3 you don't specify a Customer for the PaymentIntent
But you would want to test it in Test mode
noted on that
so my understanding is, once a PaymentMethodID is created, it won't be discarded and deprecated by Stripe, it can always be attached to a customer, regardless of whether it is originally used for ApplePay or card payments
Pls correct me if I misunderstand
Hey I think I was incorrect. Just tried it and it errored
The payment method you provided is currently attached to a PaymentIntent. Please save it to a customer using the
setup_future_usageparameter when updating or confirming that PaymentIntent
TLDR; if you use a PaymentMethod in a PaymentIntent, you would need to "save it" differently by that setup_future_usage and specifying customer on the PaymentIntent
May I know what error prompts?
I shared the error message above!
Oh I see
seems if a PaymentMethod is not being assigned to a customer before and during the payment, then it will be automatically attached to a PaymentIntent?
It's not "automatically attached to a PaymentIntent", I specify the Paymentmethod when creating PaymentIntent by the parameter https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Noted on that