#parisholley - share payment method

1 messages ยท Page 1 of 1 (latest)

undone sierra
#

No unfortunately not. You would have to create 2 separate payment method objects

idle raft
#

and i'm assuming there would be no way to have the user provide their cc info just once and share across two intents?

undone sierra
#

If it's 1 customer with 1 card, you can use that across multiple payment intents. As long as the card is attached to that customer object, it's totally re-usable

idle raft
#

sorry, i meant setup intent

undone sierra
#

Nah that's not how setup intents work unfortunately. You would have to initialize Elements with the Setup Intent client secret and then provide card details to set up that card for future usage.

#

What's your use-case for this?

idle raft
#

we were looking to move off our in-house billing setup (using stripe) to billing/subscriptions, but there is a limitation with how it works and we were recommended to create two sep customers to manage each subscription (need two active at a time).

#

but that isn't intuitive for user if they have to enter payment method twice

undone sierra
#

So each customer needs 2 active subscriptions?

#

That right?

idle raft
#

yes, we have a unique billing model that stripe billing doesn't support well out the box, and would require us to workaround it a few ways

undone sierra
#

Well 1 customer can have 2 active subscriptions. That's not an issue. Why does it need to be 2 customer objects?

idle raft
#

ultimately the issue is we need to be able to not apply customer credits to an invoice

#

we have a pre-paid/metered subscription and a saas subcription

#

we can't tell stripe to not apply pre-paid credits to the saas subscription, hence two customer accounts

undone sierra
#

Gotcha. Yeah this is a niche use-case. Are you using the Payment Element currently to collect card details?

idle raft
#

stripe.js, but intended on moving to payment element

undone sierra
#

Payment Element is also a part of stripe.js

idle raft
#

card.createToken

undone sierra
#

Gotcha, but what is the form you use to collect card info?

#

Is it the card element?

idle raft
#

no, custom

#

this was implemented before stripe elements was a thing ๐Ÿ™‚

undone sierra
#

Ah I see. I have 1 suggestion that should work with the Card Element, but it won't work well with the Payment Element. You can initialize the Card Element without a Payment Intent/Setup Intent client secret (but not with the Payment Element). What you can do is collect card details with the card element (that previous link I linked) then create 2 payment methods (using stripe.js): https://stripe.com/docs/js/payment_methods/create_payment_method (this assumes you already created your 2 customer objects). Then, attach the first payment method created to customer 1 (on the back-end) and the second payment method created to customer 2 (also on the back-end)

idle raft
#

hmm, i see the approach, but part of our value moving to this new system would be to move a good chunk of our tx's to non-cc to save on fees so a CC-only solution wouldn't make this worth it

#

appreciate the insight tho