#dashydasher

1 messages · Page 1 of 1 (latest)

hard ploverBOT
deep dock
#

Hi! Let me help you with this.

urban spindle
#

sure, give me a moment

#

should be this one: req_61VJcqGb585fvt

deep dock
#

Thanks, let me check

#

Could you please try with expand[]=discounts

urban spindle
#

just did, same thing

#

Im actually using your python package for this, my code for this call looks like this:
stripe.Invoice.upcoming(subscription=_my_subscription_id_, expand=['discounts']), the request i gave you is from the logs

deep dock
#

What version of stripe-python do you have?

urban spindle
#

2.41.0

#

i dont think its related to stripe-python because sending the same request with curl or postman gives the same result (unexpanded discounts)

deep dock
#

I see you're using a quite old API version:
2019-02-19

urban spindle
#

same thing, here is the request id of a request I just sent with the newest version (2022-11-15): req_s3hyGda6Qglwtf

frail dock
#

Hi! I'm taking over this thread.

#

Can you share the exact response you are getting from the API for your latest request?

urban spindle
hard ploverBOT
frail dock
#

Thanks, having a look. FYI when testing this on my end the expand does work.

urban spindle
#

thats weird, this is the exact request that im sending:

curl --location --globoff 'https://api.stripe.com/v1/invoices/upcoming?subscription=sub_1Lr7jMCGsUk32FBdvyc6vvLm&expand[0]=discounts' \
--header 'Authorization: Bearer ***********' --header 'Stripe-Version: 2022-11-15'
frail dock
#

Can you replace expand[0]=discounts by expand[]=discounts ?

urban spindle
#

yes, got back the same response with unexpanded discounts

#

also when I send basically the same request in my test environment i get back the expected response with expanded discounts, here is this request:

curl --location --globoff 'https://api.stripe.com/v1/invoices/upcoming?subscription=sub_1MwiaRCGsUk32FBdokpsnxmI&expand[0]=discounts' \
--header 'Authorization: Bearer sk_test_***********'
frail dock
#

What's the difference between the two requests? One is in test mode and the other in live mode?

urban spindle
#

yes, and the subscription_id is obviously different

glacial aspen
#

👋 taking over for my colleague. Let me catch up.

#

would you mind re-sharing the 2 request IDs please?

urban spindle
#

hello, sure, just a moment

#

here is the one where im getting back discounts unexpanded: req_61VJcqGb585fvt

#

and here is the most recent one i sent in test environment where i got back discounts expanded: req_7ZXfCIFTimfkgN

glacial aspen
#

I'm taking a look

urban spindle
#

thank you

glacial aspen
#

this seems really odd

urban spindle
#

sure, but you can see the responses that im getting in your logs?

glacial aspen
#

no please add those as well

#

in your email

#

we don't store responses to successful Get requests

urban spindle
#

alright, thank you

glacial aspen
#

please let me know when you do