#numericity

1 messages · Page 1 of 1 (latest)

twilit daggerBOT
civic rover
#

Hello, what are you looking for help with?

next marlin
#

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

civic rover
#

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

#

Otherwise creating a separate SetupIntent would also work here

next marlin
#

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

civic rover
#

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

next marlin
#

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

civic rover
#

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

next marlin
#

😄

#

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

civic rover
#

You can definitely replace this with one or the other

next marlin
#

This is actually through Stripe Connect

#

Sorry, I forgot to mention

civic rover
#

Are these Standard, Express, or Custom Connect accounts?

next marlin
#

When I previously referred to "Customers", I meant our Customers customers

civic rover
#

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?

next marlin
#

Single quantities for the forseeable

next marlin
civic rover
next marlin
#

I think you're right, that sounds better. I only want to create a single checkout session each time, not a long-lasting one

civic rover
#

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

next marlin
#

Ok, that's awesome. I'll give that a shot