#numericity
1 messages · Page 1 of 1 (latest)
Hello, what are you looking for help with?
Hi there
I got some help today with regards to minimum subscription payments
Currently:
- My JS makes a request to my PHP backend and creates a payment intent
- Display the payment form
- Pass the payment intent along with the card details
Firstly, is this how I should be implementing subscription creation?
Secondly, if an initial subscription payment is below the minimum amount, the subscription is immediately created and no payment intent is created. There's no opportunity to take the customers card
This subscription will then have no card to take payment for the next invoice
If you haven't seen this doc, I think it has the subscription creation flow that you are going for https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
So the process would be to create the subscription and then have the user input their card details either using the first invoice's payment intent or the subscription's setup intent
If the subscription doesn't require payment to start, it should have a setup intent created and automatically attached to it. You can use that setup intent to collect card details upfront https://stripe.com/docs/api/subscriptions/object#subscription_object-pending_setup_intent
Otherwise creating a separate SetupIntent would also work here
Ok great, thanks
On another note, is it possible to use the Stripe checkout to handle this stuff?
Where I would generate a link with the API then redirect the customer straight to that link?
Sorry, I meant PaymentLink
Yes payment links and checkout both support subscriptions, finding the docs
And they will be able to handle scenarios where the discount puts the first payment under the minimum amount
Ok great. Is that a common approach to programatically create a payment link, then send the customer to it immediately? There's no mention of that sort of flow anywhere that I could find
For Checkout it is common to create the link and immediately send it. PaymentLinks are a URL that generates the same Checkout Session every time it is visited, so you can create it and immediately send it out, but there should be less need to create one based on a user action or something.
Was that helpful? I feel like I may have made this less clear
😄
I think maybe I am not being very clear either
At the moment, I have created a "Payment portal" for customers to create subscriptions, or make one-off payments. I'm hoping to be able to replace that with Stripe's pre-made checkout.
My thinking is that when a customer selects to purchase a subscription, I would create a PaymentLink programatically, and pass the price_id that they selected. I would then immediately redirect the customer to the generated URL for them to enter card details etc
You can definitely replace this with one or the other
Quick question, have you seen our pricing table? https://stripe.com/docs/payments/checkout/pricing-table
Are these Standard, Express, or Custom Connect accounts?
When I previously referred to "Customers", I meant our Customers customers
Good use of terminology! That is what we do here
So will you always be using subscriptions that are a quantity of 1 of some price, or are you mixing and matching plans and quantities?
This is an example "pricing page", although you have to be logged in to be able to purchase: https://demo.striive.co/packages
Single quantities for the forseeable
Standard IIRC
You can still probably use either but I think Checkout might be more straightforward to use with Standard Connect like this. We show how to do that here https://stripe.com/docs/connect/creating-a-payments-page
I think you're right, that sounds better. I only want to create a single checkout session each time, not a long-lasting one
Oh also if you are representing these accounts as Customers
Yeah, payment links can be helpful but they are more limited in handling the same customer. Plus with connect you would need to create a payment link for each of your products on each of your connected accounts
With checkout, your server is doing a bit more work but you can just create a checkout session specifically for that customer with that product on that account and send out its URL
Ok, that's awesome. I'll give that a shot