#hk6_api

1 messages ¡ Page 1 of 1 (latest)

violet sleetBOT
#

👋 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/1280628194344571045

📝 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.

mellow ore
#

Hello

Can I retrieve these charges in "py" by requesting the charge endpoint?
Yes you can retrieve py_ prefix objects using charge endpoint iirc

We use ch_ prefix for card payments/charges and py_ for non card payments/charges. Fundamentally, both work the same

steel whale
#

this is so strange... I have none of them in the data I retrieve

mellow ore
#

Hmm, if you're using connect - the transfers you make to connected accounts may show up as Payment object with py_ prefix too

#

An example would help

steel whale
#

so a normal call like this should retrieve all of them ch and py?
charges = stripe.Charge.list(limit=LIMIT,
expand=["data.dispute", "data.transfer", "data.balance_transaction"],
created = {'lt': yesterday_end_uts})

#

I can provide an example

#

you just need an ID ?

#

py_3PsmC6ED5xkfDv2c0iRhS5F9

violet sleetBOT
steel whale
#

this one seems to be related to a payment processed with Link

#

actually in my case it seems to be the only use case

#

but the Charge.list don't seem to retrieve them

lament jackal
#

Hi there, taking over for my teammate

steel whale
#

thanks @mellow ore

#

hi @lament jackal

lament jackal
#

I'm taking a look at your recent logs, I see you're retrieving 100 Charges at a time

#

Of the last 5 calls you've made to list Charges, I don't see any requests that include expansion nor use created.

steel whale
#

Right now I am querying PaymentIntents not charges as I am testing this apporach

#

let me check

#

I don't see any log

#

in the UI I should set endpoint to /v1/charges right?

lament jackal
#

Hold on a second

steel whale
#

the last requests are due to my requests to payment intents with an expand on latest_charge

#

that's why you don't see the origina problem

#

so these correspond to my tentative to fix

lament jackal
#

You mentioned you're listing PaymentIntents. I found this request: https://dashboard.stripe.com/logs/req_bAVj05QXB2kBBP

In this request, you're retrieving PaymentIntents that were created before 2024-09-03 20:49:52 UTC, and expanding latest_charge and payment_method. The Charge you're looking for is tied to a PaymentIntent that was created on August 28 so I suspect you're not seeing this PaymentIntent in the results because of the created date

#

in the UI I should set endpoint to /v1/charges right?
What UI are you referring to?

steel whale
#

I found the logs all good

#

yes the last queries are for payment intents

#

I will retrieve one where I was querying the charges directly

#

and not getting the py charges, just the ch ones

lament jackal
steel whale
#

we need to check the requests made earlier today before 7PM BST

#

because since then I am trying the new payment intent approach

#

for example: req_f4TkxlMjaRhGkS

lament jackal
#

created.gte in this case was 1725321600 (2024-09-03 00:00:00 UTC). Which 'py_' were you expecting to see returned in this request?

steel whale
#

I loop on data over a period

#

not sure about the specific request

#

let me try

#

to recreate the request

lament jackal
#

You shared that specific request as an example, which is why I was looking at it

#

Yes, please test again so I can try to see what exact parameters you're passing. If possible, please also share the py_ you're expecting to see in the results

steel whale
#

ok

#

this one: req_Ri0A41MPLbIK7e

#

should get py_3PsmC6ED5xkfDv2c0iRhS5F9

#

if I am not mistaken

#

I narrowed the gt and lt

lament jackal
#

gt and lt are both September 2. The Charge was created August 28 so it's expected that this Charge will not be returned in the list

#

try gt: 1724852700 and lt: 1724852760

steel whale
#

true... I took the dispute date...

#

Ok I retrieve it...

#

mmmh what was wrong then

#

ok I will deep dive then

#

I will revert my payment intent modif

#

and try to fix with the charges

#

thanks.