#boskiv

1 messages · Page 1 of 1 (latest)

lilac rockBOT
quartz mason
frigid stream
#

Yep, I recommend using webhooks. You can listen for customer.subscription.created events and review details about the brand-new subscription

quartz mason
#

But that means I need extra backend to listen, parse events and map my user_id with stripe customer_id and subcription_id

#

I thoght it should be more easy way, just query Stripe API with customer email to get active subscription

frigid stream
#

Yep, that's correct. When a customer goes through the payment process, completing the payment will trigger the creation of a customer object. You would then have to listen for customer.subscription.created events then make a separate call to expand customer and inspect the email

#

I thoght it should be more easy way, just query Stripe API with customer email to get active subscription
Not by email, no, as emails are not unique on Stripe

#

You could list all subscriptions but would still need to filter by customer ID.

quartz mason
#

But how i can guarantee that subscription unique? I mean I have firebase users with email, I have no Stripe customer ID to map. Because I use payment links

frigid stream
#

It's not possible to do with Payment Links since these links aren't specific to a given customer. If you still want to use a Stripe-hosted way of accepting payments, I recommend using Checkout instead. Prior to creating a Checkout Session, you could create a Customer object for each email and keep track of the mapping between email and customer ID on your end

#

Then, create a Checkout Session for a given customer using their Stripe customer ID

quartz mason
#

😦

frigid stream
#

Payment Links use Checkout under the hood to accept payments. Checkout isn't no code though

quartz mason
#

Thanks

frigid stream
#

Sure thing!

quartz mason
#

Can you tell me can I disable payment in pricing table or payment link when offer trial ?

frigid stream
#

Just to be clear, you mean you'd like to allow a customer to subscribe and start with a free trial but not collect their payment details?

quartz mason
#

yes

#

I saw few blog posts where it possible to do with API, but curious about no-code solution

frigid stream
#

got it. no, there isn't a no-code solution at the moment. You can add a trial but payment details will always be collected with no-code solutions

quartz mason
#

Why i can't delete payment link. If I will play now with curl request i will have a tons of garbage in my account ?