-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] A way to save a payment method on the main Stripe account when using Stripe Connect with direct charges to other account #4536
Comments
Hello @yuki-stripe |
Hi @Ariandr I believe this flow is already supported. Can you try the following?
The main objective for CustomerSheet is to let your customer manage payment methods (e.g., add/delete payment methods), and you should use PaymentSheet for payments. It sound like you want your customer choose a payment method first before creating a PaymentIntent. If that's the case, you can follow the deferred intention creation guide to build your app. |
Hi @seanzhang-stripe Steps 1, 2, 3 are implemented and it works. Customer Sheet is used to attach payment methods and then they are visible in the Payment Sheet. Overall, payments work with the new PaymentElement integration. But we cannot release it, because adding a new payment method to PaymentSheet.FlowController during payment process itself doesn't save it to the main Stripe platform. The issue is next: So it makes it impossible to use PaymentSheet and let users add and save payment methods there, as it was in Basic Integration. When we show PaymentSheet On this image below you can see that the Payment intent is created for a direct charge to the Connected account ( |
Hi @Ariandr Can you share with me the platform PaymentMethod ID that your Basic Integration saved through a Direct Charge created on connected account? |
@seanzhang-stripe But sure, I can share it with you. It was created in the UI shared below and then used on the server for sharing and paying via Connect. It's the test environment. It's the ID on our main platform. I cannot provide the shared PM ID, I think we discard them and don't store on the connected accounts. |
Hey @Ariandr, very sorry you're running into more issues. Let me see if I understand:
Would it work if, between step 4 and 5, you manually attached the PM to your platform's Customer? You'd use this API method. Looks something like
I know this isn't the same behavior as Basic Integration, which would save the card immediately after the customer completes the form, rather than at the end of checkout - we are working on adding this to PaymentSheet/FlowController this year, but no firm timeline yet. |
Hi @yuki-stripe But probably it's a good workaround for now, thanks. It's good to know that you are working on the ability to save the card immediately in PaymentSheet/FlowController. |
Fair point. Basic Integration uses this attach API under the hood, so I'm not super concerned in your case if it was working for you before. I'll close this issue but please re-open if you do run into further issues! |
Hi @yuki-stripe When you release a feature to attach payment methods directly from Payment Sheet, please mention it in release notes, so that we can switch to it. |
Hi @yuki-stripe A question to you.
But we get the error But if I add the same card in Basic Integration during payment or through Setup intent using Customer Sheet, it works. Can you suggest any workarounds for this case? |
@Ariandr Can you provide an example payment method ID I can look up? |
@yuki-stripe |
@Ariandr Thank you! Based on logs I believe I'm seeing you first clone the PM and then attach it. Can you try attaching it before cloning? |
@yuki-stripe |
Hi @yuki-stripe Do you happen to have an idea why it doesn't work? Or should it be done differently?
|
@Ariandr Unfortunately, there is no proper way to achieve this today. As a hacky and brittle workaround, you can do this:
I'll bump this thread again when we support all of this properly (save the card immediately, when you hit "Continue" in FlowController), and hopefully you can migrate to that and get rid of the hacks. |
Hi @yuki-stripe |
Is your feature request related to a problem? Please describe.
The current problem we are facing is that we use Stripe Connect and we share payment methods during the payment itself, so the payment intent is configured using the connected account customer id right away. Therefore,
setup_future_usage
:off_session
||on_session
on Payment Intent options doesn't save the payment method to the customer on our main Stripe platform. (Wasn't an issue with Basic Integration)It makes it impossible to use PaymetSheet.FlowController to save payment methods during payments and confirming the payment intent, because the intent isn't attached to our main Stripe platform account.
More context here: #4195 (comment)
Describe the solution you'd like
I see a couple of solutions:
Describe alternatives you've considered
We don't know how to finish this migration from Basic Integration to Payment Element. It seems Payment Element is missing a lot of functionality to use with Stripe Connect direct payments and it's really hard to deal with these use cases.
Can you suggest any workaround, so that we can use a CustomerSheet to select a payment method and then launch payment confirmation?
Additional context
For more context you can check these issues:
confirmHandler
: pm_YYY #4195Now we made payments work, but we cannot save payment methods to the customers during the payment process itself. We can save them only when we use a CustomerSheet with setup intents, but it's irrelevant during the payment process. Now it's a remaining blocker to migrate from Basic Integration to the new Payment Element.
The text was updated successfully, but these errors were encountered: