#viacheslav_68834
1 messages · Page 1 of 1 (latest)
Hello there
So yeah as you noted you attach PaymentMethods to Customers, not SetupIntents. SetupIntents just set up the payment method correctly.
I'm a bit surprised that you can't use a SetupIntent with Indian entity and then attach the PaymentMethod afterward
Do you have a failed request I can look at?
How to attach PaymentMethod to Indian customer. Seems it's completely banned, even if setup intent is already authorized by user.
Let me check
- System created setup intent https://dashboard.stripe.com/test/logs/req_yJj5pv5hua2gSw
- User authorizes it on webpage via Stripe Elements
- System creates a customer https://dashboard.stripe.com/test/logs/req_BquI9OtrpqicUW
- Attempt to attach authorized payment method to this customer fails https://dashboard.stripe.com/test/logs/req_o1gH8xnwrdIjOm
Thanks for providing that
Alright yeah so currently there is no way around this due to Indian regulations.
That said, I feel like we should allow this since the PaymentMethod was just previously set up with a SetupIntent
So I'm going to file a ticket with the team internally to see if we can improve this flow
But for now you are going to have to attach when you confirm the SetupIntent
What I'd recommend is just attaching to an empty Customer object and then updating the details about the Customer later on.
Obviously this isn't perfect.
But best you can do for now unless you can move this later in your flow
Thank you for the reply. It helped me!
Great!
May I ask some additional question?
Is it possible somehow to retrieve a whole setup intent by its "client secret" id via Stripe API (backend)?
It will help me to avoid transfering real setup intent id onto client side. This id will be needed to recover customer id of empty customer object mentioned above.
The first part of the SetupIntent client secret is the SetupIntent ID
But there isn't really an issue with sending the SetupIntent ID to the client
No one can use that ID without your secret key
You want to be more careful with embedding the client secret itself
Thanks!
Sure thing