#tymm
1 messages · Page 1 of 1 (latest)
hello! afaik, it's not possible
welp then do u have any idea on a workaround for it
where is it messing with your code logic? cause based off what you described - as long as you get invoice.payment_succeeded, you can update your DB
because some data like who made the purchase, which payment method to use etc are being updated to the order table after subscription creation. and in the callback it is also updating the same table with data like the payment time. racing condition will occur if the callback is being called immediately after creating subscription.
Are those data included in the Subscription object also?
some data like the customer info and emails are not sent to stripe. things that i need from stripe to insert db is the payment time
from the invoice.payment_succeeded the object is of invoice
do you know if the Subscription is using a 100% coupon when you make the request to create the Subscription?
well, i guess you would since you're making the request to create the Subscription
i can know by checking the subscription total amount but thats kinda hacky
like the last resort
there's two options really - you either validate the coupon code or amount and write to your DB first before creating the Subscription, or you pass in those data which you need to save to your DB as metadata when creating the Subscription