#TheUchi007

1 messages · Page 1 of 1 (latest)

brazen vigilBOT
spiral canyon
frail kettle
#

Amazing, exactly what I was searching for. Thank you!

frail kettle
#

Hello, May I ask another question in this thread?

#

It is still in regards to this setup

spiral canyon
#

Yep, what's up?

frail kettle
#

Awesome, thanks

#

Ok, so I was able to create the subscription with the trial, which is great. However, I cannot seem to attach a payment method to it. So, on my current flow:

  1. User chooses a membership(subscription)

  2. User gets redirected to checkout page

  3. The Backend creates a new subscription, and I get the latest payment invoice with the payment intent

  4. This gets me the client secret so I can have a user pay

The flow above works great to make a payment. However, with the trial, I get no client secret, so I can't embed the form to add a card. How can I go about it?

#

I want a user to be able to attach a card, even though they are not being charged at this moment

spiral canyon
frail kettle
#

Ok, then I use that to create a payment intent? Or how do I implement it?

arctic plover
#

👋 Hopping in since Rubeus has to head out soon

#

You'd use that pending_setup_intent to collect payment information that can be used for future payments (https://stripe.com/docs/payments/save-and-reuse). Setup intents work similarly to payment intents, but the main difference is that there is no charge/payment being made.

frail kettle
#

Ah ok. So let me know if this is how I can implement:

  1. App creates the subscription with trial

  2. I gather the newly created subscription data via API

  3. I then check for pending_setup_intent , and if it is present, I retrieve that payment intent

  4. According to API docs, this should get me a client secret, so then I can use this to add the credit card info

Would this work?

arctic plover
#

Yup, that's almost correct - but with a small change to step 3:
3. I then check for pending_setup_intent , and if it is present, I retrieve that~~ payment intent~~ setup intent

frail kettle
#

Aah gotcha. Yeah, makes sense, as it is a setup intent lol I am still getting to know the terminology for the API.

#

Thank you so much for your help!