#vienklett-reuse-pm

1 messages · Page 1 of 1 (latest)

random yarrowBOT
undone sundial
#

What do you mean by refill?

hollow oak
#

like re-fill the current credit card number that user used to pay for 1st subscription

#

and user just needs to enter the cvv to make a payment

undone sundial
hollow oak
#

thanks. my other question is: If user uses the same credit card to pay for 3 subscriptions. If they edit/update the payment info in one of those subscriptions, does it auto update payment info for other subs?

undone sundial
#

What specifically are they updating?

#

Which fields on which object?

random yarrowBOT
#

vienklett-reuse-pm

hollow oak
#

update the credit card number

undone sundial
#

How

#

By creating a new payment method?

#

Any changes to a subscription object doesn't change another subscription object

#

Also, you can't update a payment method's credit card number. You'd have to create a new payment method object entirely

hollow oak
#

Stripe::BillingPortal::Session.create({
customer: stripe_customer_id,
return_url: return_url,
flow_data: "payment_method_update",
})

#

i create the payment method through this code. so user can update their credit card

#

and will the new updated card be used to pay for all customer's subscriptions on the stripe?

undone sundial
#

Ah that depends

#

So that flow sets the default payment method on the customer

#

If all subscriptions rely on that for default payment method, then that newly created payment method will be used for all subs

#

However, you can also set default payment method at the subscription level, which would override the one set at the customer level

#

So if some of the subs have default pm set at the subscription level, a new payment method created in the customer portal would not be used as the default

hollow oak
#

how do i set the default payment method at the subscription level through api?

#

or i need to do it in the dashboard

undone sundial
#

Is that what you want to do?

#

There's nothing wrong with relying on the one set on the customer

#

Do you not want all subscriptions to use the same payment method?

hollow oak
#

yeah. that's what we are looking to do in our web

#

from the API doc customer string ID of an existing Customer, if one exists. In payment mode, the customer’s most recently saved card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. In subscription mode, the customer’s default payment method will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.

#

look like if I pass the customer's email when create checkout session, if customer exists, it will prefill card details for me.

undone sundial
#

If you're using checkout then it should be setting default on the subscription level already

#

Recommend you just test this all out in test mode