#beneordio_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1301195650578387015
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
If you expand the discounts parameter we should give you an array of coupons. The server just got busy and I forget if you need to expand anything beyond that to get the coupon name, so can you try retrieving your subscription while expanding discounts and let me know if you see the name there? Happy to look deeper if not https://docs.stripe.com/api/subscriptions/object#subscription_object-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay, within Zapier i cant expand discounts unfortunately to retrieve the coupon
Gotcha
Not familiar with Zapier, so won't be able to assist in using that tool
But above is how to achieve this with our api
would that be the right url to get the subscription?
https://api.stripe.com/v1/subscriptions/sub_id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
well i get an unknown parameter error.
Can you show me your code and the exact error that you are getting?
I used this URL: https://api.stripe.com/v1/subscriptions/sub_id
unflatten: yes
send as json: no
json key: json
Headers:
Authorization: Bearer sk_key
i just need the coupon to be able to calculate the actual subscription MRR. there is no shortcut to that? like a pre calculated MRR field in the subscription, is there?
Can you send me your exact code and the exact text of the error code that you are getting? That call setup doesn't immediately look wrong to me. Parameter errors usually have more to do with the request body so that and the error should be helpful in diagnosing this
And unfortunately there aren't precalculated MRR fields in the API. Our dashboard does have some reports that can be run though I forget if those do MRR by subscription
im createing the get request in zapier:
Well there is this MRR field on the customer level which would suffice but i have been i cant reference or get it
I am not seeing errors for retrieving that subscription in your logs. Can you try that request again and send me the request ID from when it fails? https://dashboard.stripe.com/test/logs
maybe its because i am testing the zap and its not live yet
We do have some reports that can help you here, but the API does not have a premade field. https://docs.stripe.com/billing/subscriptions/analytics
So there are those reports, but otherwise you would need to calculate via the API yourself
Can you send me the ID of the subscription from that screenshot? It has a lot of I's or l's or 1's so I have not had luck typing it out
I will quit it tbh