#hts-cm

1 messages ยท Page 1 of 1 (latest)

toxic lilyBOT
golden dome
#

Hi there, so you want to cancel a subscription if its default_payment_method is card payment method and its funding is prepaid ?

faint harness
#

In fact, I want to prevent user to subscribe with this kind of prepaid card, because they cannot be charged automatically

golden dome
faint harness
#

Actually, I'm creating a session to redirect user to stripe with information to validate the process (and configure everything through webhooks).
Does this mean that I have to collect payment informations on my page to call Stripe API?

golden dome
#

I mean you can use checkout session to collect a payment method from you user, once the checkout session is completed and the payment method is created successfully , you can use the payment method to create a subscription programmatically from your backend.

faint harness
#

If the user use a prepaid card, it will be charged no matter what, isn't it ?

golden dome
#

I thought you don't want to accept prepaid card?

faint harness
#

Indeed, that's why I'm confused with your explainations ๐Ÿ˜…
Let me recap:
Now, I'm using the session service to create a new session with the informations. After the user enters his informations, I'm creating everything with webhooks data.

If I understand what you're saying, I need to change the workflow:
Create a new checkout session to collect user payment mode and when I have the webhook of this checkout session, I'm creating the subscription via API.

However, as far as I understand, when an user complete the checkout session, the card will be charged? So I need to refund user if he uses a prepaid card

golden dome
faint harness
#

So, I create a new checkout session, redirect user to Stripe with the checkout url, when the webhook checkout.session.completed is retrieved, and I've verified the payment is not a prepaid card, I create the subscription via API?

golden dome