#ds_api

1 messages ยท Page 1 of 1 (latest)

loud inletBOT
#

๐Ÿ‘‹ 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/1366443219621118002

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • ds_api, 3 days ago, 41 messages
hot echo
#

Hi ๐Ÿ‘‹

What do you mean by "lower env" and "higher env"? What is your overall goal?

sonic venture
#

Hello, The same code is working in our lower env INT after setting the api version to "2018-02-28" but in our higher env we are getting null values for livemode

#

the keys,code, library is the same

hot echo
#

Sorry but "lower env" is meaningless to me. Do you mean a version of your integration running an older API?

sonic venture
#

We are pulling stripe data using glue job into our snowflake db

sonic venture
hot echo
#

Okay so what do you mean? It kind of sounds like you are using two different Stripe API versions (e.g. in Production and QA)

#

And what operation with the Stripe APIs are you performing?

sonic venture
#

api version is the same

#

We are using same set of keys and url is also the same but still we are getting null attributes for livemode in our production env

#

when I check with postman we have livemode value:

#

this for the Stripe invoice API

hot echo
sonic venture
#

Okay, sure give me few minutes please

#

RequestId for the postman call. (This is where I am able to get attribute value)
req_FWwcTmNjbAfQf1

#

Other one where I am unable to get the value for the livemode attribute will share shortly

hot echo
#

The attribute you are checking is livemode? That doesn't make a lot of sense to me, since your API keys are what will determine whether you are retrieving Live or Test data

sonic venture
#

livemode is the attribute we are looking for. We need that value in our snowflake db

#

Yes the keys mention it as live

#

but we still need value for the attribute in the json response and we see it in the postman call

hot echo
#

Okay so this is about populating the Snowflake DB with the correct values.

sonic venture
#

yes

hot echo
#

Okay I'll be curious to see the request where you do not see livemode returned.

sonic venture
#

Yeah, I am executing our glue job. Give me few minutes please. Thank you for your time

#

This is the api version we have set in the code:

hot echo
#

The request will still provide more useful information.

#

Sorry for the interruption @sonic venture I'm still looking forward to seeing the request ID from your Glue job

sonic venture
#

yes few minutes please

#

req_s5DCgRq1zput4c

#

sorry to keep you waiting

hot echo
#

No worries

sonic venture
#

I am not seeing the "livemode" in the json response. I just tested for one invoice

hot echo
#

Hmmm... for some reason I don't see that as a valid request ID

sonic venture
#

not sure if its 1 or l

hot echo
#

Looks like it was an l ๐Ÿ˜… here

sonic venture
#

oh okay!

hot echo
#

Hmmm okay so that is using the latest version of the Stripe Python SDK. Let me test out something similar using these settings.

#

Hmmm okay so that's not the problem. I am using the same API version (2018-02-28) and Python SDK version (12.0.1) and I do get the livemode property.

#
...
 "livemode": false,
...
#

Unfortunately, to me that suggests that the problem isn't with the data the Stripe API is returning to the Glue job.

I'm not familiar with that tool or framework but is it possible to log the raw data retreived from the request somewhere?

sonic venture
#

yes we do that. We store the raw data in s3

#

but unfortunately I can't share with you

hot echo
#

Of course

sonic venture
#

so should I use lower version than the latest version below?
Python SDK version (12.0.1)

#

Can I use 3.0.0?

hot echo
#

No

#

I didn't see any meaningful difference

#

To be clear, I DID test with Python SDK version 12.0.1 and I STILL retrieved the livemode property successfully

sonic venture
#

okay

#

I just tested for one invoice. Let me pull the req_id for the whole data set. This process requires 1:00 - 1:30 hrs if that helps

hot echo
#

You should be able to find the request IDs as they are created in your Stripe Dashboard logs. Unfortunately, for GET requests, Stripe does not store the response so I can't see exactly what was sent. However, I have replicated the conditions of your API request and I do see the livemode property.

That is why my suspicion at this point is that something is getting dropped in the data handling portion of the Glue job and that is why I think that is where i would focus my next debugging efforts if I were in your situation.

sonic venture
#

Okay, give me few hrs. I will re-test this and confirm on this

#

Until then can I keep this chat open?

hot echo
#

We do not leave chats open for that long, no.

sonic venture
#

I have tested this before, but I will double check the raw json response and can confirm

hot echo
#

You can raise your question again using the form in #help and we will do our best to help you with the new information you have.

sonic venture
#

okay, atleast for the next 1 hr atleast?

hot echo
#

I cannot guarantee. However, I don't think there is too much context required here so you should be able to open a new thread and get help fairly easily

sonic venture
#

okay, sure thank you