You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded from v5.6.1 to v5.8.0 to get access to stripe.usageRecords. Thank you for this improvement.
Problem
The callback to stripe.usageRecords.create is not executing. The call hangs. I went to my Dashboard.Stripe and saw the usage record was in fact created. Maybe something is going wrong in your stripe server endpoint?
router.post('/subscription/usage', async (req,res) => {
// ...
stripe.usageRecords.create({
quantity: 1,
timestamp: timestamp,
subscription_item: subscription_item
}, function(err, usageRecord) {
console.log('usageRecord', usageRecord) // DOES NOT LOG
if (err) {
console.log('\n===== stripe usage error ====\n', err) // DOES NOT LOG
} else {
res.send(200) // DOES NOT HAPPEN, because my front-end says the call to /subscription/usage is still 'PENDING'
}
Dashboard.Stripe verification the Usage Record was Created
Billing > Subscriptions > Selection Customer > Products/Pricing Plan > click 'View Usage This Period' > see timestamp for the call I just made in my testing, its now +1 more than previously
Overall, the Stripe Client is Working for me
I'm calling this stripe method the same why that i'm calling other things like stripe.subscriptions.create and stripe.customers.create, and handling the callback the same, per the api documentation. Those methods are working for me.
The text was updated successfully, but these errors were encountered:
Yes it should work everywhere but you should not have to change your integration logic. I just have not been able to pinpoint the root cause yet but we'll hopefully find the problem over the next few days!
Background
I upgraded from v5.6.1 to v5.8.0 to get access to
stripe.usageRecords
. Thank you for this improvement.Problem
The callback to
stripe.usageRecords.create
is not executing. The call hangs. I went to my Dashboard.Stripe and saw the usage record was in fact created. Maybe something is going wrong in your stripe server endpoint?Dashboard.Stripe verification the Usage Record was Created
Billing > Subscriptions > Selection Customer > Products/Pricing Plan > click 'View Usage This Period' > see timestamp for the call I just made in my testing, its now +1 more than previously
Overall, the Stripe Client is Working for me
I'm calling this stripe method the same why that i'm calling other things like
stripe.subscriptions.create
andstripe.customers.create
, and handling the callback the same, per the api documentation. Those methods are working for me.The text was updated successfully, but these errors were encountered: