#BriskDev1-setupfutureusage

1 messages · Page 1 of 1 (latest)

upper quest
#

There shouldn't be any need for you to update setup_future_usage - I belive it should be already set

velvet void
#

when the subscription is payed with that payment_intent, the details for it in the dashboard say "This payment successfully set up pm_1JmRgQJZYU3zUqpIoDTqrcyJ for future off-session payments" but that customer still doesn't have a default card setup

upper quest
#

You need to set it as the customer's default in a separate API request - by setting it to invoice_settings[default_payment_method] on the customer. That's not something we do for you automatically

velvet void
#

you're right it is set correctly, but when I try to make another subscription with that customer it still gives me the error "Error: Cannot charge a customer that has no active card"

upper quest
#

That's because it hasn't been set as their default yet - once you do that it'll be used automatically

velvet void
#

so does that mean i need a webhook to listen to that event and then call that API request for invoice_settings[default_payment_method] ?

upper quest
#

Yup! that would be one way of doing it!

velvet void
#

would another way to do it be to call an endpoint on our server to do that once we get success on their initial payment?

#

right now when it succeeds it just takes them to another screen

upper quest
#

Yes, you could do it from the webhook or you could do it once you know payment has succeeded and just make another request during your checkout flow

velvet void
#

ok I'll try the easier way first lol. you've been a huge help and have kept my sanity in check