Hi everyone,
I’m working on a feature allowing the users to suscribe to a plan on my app.
I have 3 different plans, with 3 different payment methods.
- Mensual subscription via Stripe subscription
- Trimestrial subscription via Stripe (only one payment, the user won’t be charge at the end of the period)
- Trimestrial subscription via Alma, which allows user to pay in 3 or 4 times.
I am having trouble with the first one.
At the beggining, I was using the action Suscribe the user to a plan and the webhook on the event customer.subscription.created
It happened that the webhook is triggered before the field Stripe customer ID was initialized in my database, and the user couldn’t access to his content.
Then, I tried to use a Database trigger event.
The condition is User before change’s Stripe Customer Subscription’s Status is not User now’s Stripe Customer Subscription’s Status
I launch my Backend Workflow to create the subscription and give access to the content if the User now’s Stripe Customer Subscription’s Status is trialing or active
It works, but only if it’s the first time the user subscribe to a plan.
After that, the fields
User now’s Stripe Customer Subscription’s Status & User before change’s Stripe Customer Subscription’s Status are always empty
The trigger is triggered, but I can’t access the status, neither in the logs nor in my handmade log (Create a new thing).
It’s really annoying because I’ve a solution for the first subscription (the trigger) and another one for the other one (the webhook) but it’s annoying and not really clean to handle things differently, as I have so many different scenarios…
Have you ever encounter this kind of issues?
Thank you so much guys 🥲