#andy_api

1 messages ยท Page 1 of 1 (latest)

brisk portalBOT
#

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

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

robust axle
#

Hi ๐Ÿ‘‹

When you say the "reversal", are you referring to the transaction that debited your Stripe balance?

gritty plover
#

Sorry, a refund of the transaction.

robust axle
#

Or the Refund ID?

gritty plover
#

Refund ID, yeah

robust axle
#

Wait...it's in the response for the request you shared

#
id: "re_3PlMFCFiVpk243EA12asPFSS",
#

You can tell because the response identifies what object it is in the next line
object: "refund",

gritty plover
#

Right, we can get it at that point. But is there ever a way to find the id of a refund for a charge other than capturing it at the moment it's refunded?

#

the data doesnt seem to be stored anywhere on the paymentintent or charge

robust axle
gritty plover
#

oh incredible, i think that does what we need

robust axle
#

Great ๐ŸŽ‰
Our list APIs have a number of useful filters that I don't think the rest of our docs do a good enough job explaining.

gritty plover
#

alright, i'll ask again if this doesnt work out in production but that seems to solve it. thanks again!

robust axle
#

Sure thing! Happy to help ๐Ÿ™‚

gritty plover
#

basically can we find the reversal for a tax transaction if we don't have its ID? there doesnt seem to be a way to list reversals, view reversals for a tax transaction payload, or search for reversals based on a tax transaction ID

robust axle
#

Hmmm ๐Ÿค”

The standalone tax APIs are much more new and sadly lacking in the nicer features. I'm going to poke around.

To be clear, you DO see evidence the tax transaction has been reversed?

gritty plover
#

yeah, it was reversed

robust axle
#

Okay, that helps. Sometimes we try to be "helpful" and hide null fields so I don't know if the field exists and is just null or if it doesn't exist on record types

brisk portalBOT
spark ginkgo
#

Hi, I work with Andy. Say we got a response from the reversal, but if we don't save that immediately, there is no way to find it again.

#

And because tax transactions can't be exported for at least 24 hours, we have no way of seeing details on those reversal transactions we just committed.

#

Although I suppose this is also true for normal transactions: without knowing the tax_* transaction ID, we can't retrieve info on it via the API. It's just in the case of reversals, I would definitely expect them to be returned on the original transaction payload. I was hoping to find some undocumented expand: [reversals] feature.

chilly bobcat
#

Can you share the tax transaction id you whose reversal you're looking for?

spark ginkgo
#

Sure, one example is tax_1PlMFBFiVpk243EA5NADNKQb

chilly bobcat
#

Gotcha. Sorry don't have as much experience working with the tax transactions, but it does look like there's a reversal field on the line item

#

Does it show there?

gritty plover
#

that just lists the two line items for the transaction, not including their reversals

chilly bobcat
#

There should be a reveral param on the line items

gritty plover
#

both have reversal: null, it seems that reversal includes the ID of the original transaction that it is reversing itself:

line_items.data.reversal.original_line_itemstring

The id of the line item to reverse **in the original transaction**.
chilly bobcat
#

Yeah not sure. Not seeing a way to list this. Let me check with a colleague

gritty plover
#

cool, thanks. i need to bop out for lunch, would it be possible to follow up via email?

chilly bobcat
#

You can always write in to support for this question over email

#

But I'll put the answer that I get from my colleague in this thread

#

You'll still have access

#

Even if it's been archived

gritty plover
#

that's perfect, thank you. i'll keep an eye on my phone

chilly bobcat
#

And then you can open a new thread if you have follow up questions

#

^ is the link to this thread

#

https://discord.com/channels/841573134531821608/1271534225715363946

#

Also where do you see the tax transaction reversal?

#

On your dashboard? If so, can you paste a screenshot in here so I can see

#

Because I don't see a tax transaction reversal indicated anywhere

gritty plover
#

i cant view it in the dashboard, but the response from the reversal endpoint had this ID for the reversal:
tax_1PkBhVFiVpk243EA9xfJVV7Z.

that reversal has a reversal: original_transaction

chilly bobcat
#

For that you passed: original_transaction: "tax_1Pjx6NFiVpk243EAy3rXuzIe",

#

So looks like it's for a different tax transaction than the one you shared before

gritty plover
#

i just pulled up one i had the reversal for on-hand. hitting the list_line_items endpoint for that still doesnt show the reversals

#

just the line items for the original committed transaction with reversal: null

chilly bobcat
#

Yeah doesn't look like there's a way to list reversals for an original transaction via the api

#

And there's not webhook events for tax transactions you can listen for either...

#

Why can't you store the reversal tax transaction id in your code after hitting that endpoint?

gritty plover
#

right, we're afraid that if we lose the id from the moment we reverse it's gone forever

chilly bobcat
#

That way you can just retrieve it

gritty plover
#

we do, but thats a lot less redundancy than we have for any of our other stripe integrations. if that's really the only way, then we just make sure we dont lose it? ๐Ÿ˜“

chilly bobcat
#

if that's really the only way, then we just make sure we dont lose it?
Unfortunately this is the only way right now as there's not an endpoint to filter them nor a webhook event you can listen to

#

We can submit a feedback request to fix this though