#jkendrick - Checkout

1 messages ยท Page 1 of 1 (latest)

fierce imp
#

Hello, can you send me the docs that you were looking at for this? Happy to look in to them and discuss which may be best for you

tranquil furnace
#

It appears that maybe the client-only integration does not support subscriptions? Is that right?

fierce imp
#

Thank you. Checking in to those

#

The pro for those is that they don't require you to write any code or process any requests on your server. The cons are that is is much less customizable and that you will always be directing users to buy the same item on the same page.

#

For Checkout where you are creating the Session on your own server, you gain a lot of flexibility and configurability. You have more settings to play with and you can set them as needed based on what you already know about your customer

tranquil furnace
fierce imp
#

Correct, Checkout can set up the subscription and the subscription will either charge the user automatically or automatically send them invoices depending on your configuration

tranquil furnace
#

Ok. One other question - we are wanting to be able to set the stripe customerID to be the same as a customer's userID on our app. Is it possible to have the payment link use a specific customer id? Or do payment links always just create a random customer ID? If that is the case, I think we might need to use the client/server checkout method in order to keep track of which of our users have subscribed (tracking by a shared userID/customerID in stripe & in our app).

#

Lmk if what I'm asking is not clear. ๐Ÿ™‚

fierce imp
#

Our Customer IDs will always be Stripe generated but I think we do have something for that. Checking our docs, will be back in a minute

tranquil furnace
#

oh great! And do payment links offer webhooks that I can use to detect when a specific client_reference_id makes a purchase?

fierce imp
#

Yes, with payment links still create checkout sessions so you can listen to all of the same webhook events like checkout.session.completed

tranquil furnace
#

and would the client_reference_id be in the webhook event? So I know which user to give app access to.

fierce imp
#

It should be in the checkout.session.completed event but let me test that out to double check

#

Confirmed that if you set that URL parameter, that value will show up as the client_reference_id in the resulting checkout events

#

One thing to note is that that field will only be on the Checkout Session object. If you want to reference that ID from the subscription, you will likely want to use the API to set your customer ID as metadata on the Stripe Customer or Subscription object

tranquil furnace
#

Ok. thank you so much for your help!

fierce imp
#

Of course! Glad I could help you sort through some of this