#tymm

1 messages · Page 1 of 1 (latest)

thorny skyBOT
hollow kraken
#

hello! afaik, it's not possible

scarlet mauve
#

welp then do u have any idea on a workaround for it

hollow kraken
#

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

scarlet mauve
#

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.

hollow kraken
#

Are those data included in the Subscription object also?

scarlet mauve
#

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

hollow kraken
#

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

scarlet mauve
#

like the last resort

hollow kraken
#

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