#plim
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Let me take a look
Thanks!
Just to make sure I am on the same page, your sub does have a billing threshold?
Yes, here's how it looks like right now: https://dashboard.stripe.com/customers/cus_NUU6Ve5KUFD3CX/upcoming_invoice/sub_1MjV8LGC2agebJWXlMroFmmr
For that particular customer, I actually want to set it to around 500. i actually tried set with 473 earlier, and it just incrememnted the quantity (tbh, it should have failed if set wasn't allowed for threshold billing). And I just found out that set doesn't work because it didn't set the quantity to 473, and instead did the increment anyway.
Can you share the request ID for when you set 473?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I can't find it anymore, but I can recreate. give me a minute
For this subscription: https://dashboard.stripe.com/subscription_items/si_Njf2GQDqZ1M7dm/usage_records
Steps:
- set to 92: https://dashboard.stripe.com/logs/req_IEw0aEfHaZ5w7k
- set to 10: https://dashboard.stripe.com/logs/req_ZTEEvDOBfxqq9h
Expectation: Usage should show 10
Actual: Usage currently shows 102 (or 92 + 10, so the 10 was just an increment)
This was in the api docs: https://stripe.com/docs/api/usage_records/create#usage_record_create-action
I think you'd need to pass the timestamp too
You're currently setting the quantity on current time
set should be used with a timestamp you're trying to correct
That's why it is incrementing
I set the timestamp here: https://dashboard.stripe.com/logs/req_iZjZzvob5KKFEn
And it still incremented:
Is it the same timestamp as the previous reported usage timestamp?
oh.... that's interesting
Thanks for the help! I think this should be enough to do what we need
Another question, if you don't mind. How do I actually filter the logs page?
For example, it clearly shows POST /v1/subscription_items/si_NOStJVTCdkV3vZ/usage_records right now:
But when I try to filter API Endpoint by the following, it doesn't work:
/v1/subscription_items/si_NOStJVTCdkV3vZ/usage_recordsPOST /v1/subscription_items/si_NOStJVTCdkV3vZ/usage_records
What should I actually put here?
I think you'd need to specify the wildcard query param
as si_xxx is actually the resource ID
Try filtering by /v1/subscription_items/*/usage_records
That works now, thank you!!