#andy_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/1271534225715363946
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
When you say the "reversal", are you referring to the transaction that debited your Stripe balance?
Sorry, a refund of the transaction.
Or the Refund ID?
Refund ID, yeah
https://docs.stripe.com/api/refunds/object
Okay yeah, taking a look to double check
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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",
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
You can list Refunds by Charge or Payment Intent ID
https://docs.stripe.com/api/refunds/list#list_refunds-charge
oh incredible, i think that does what we need
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.
alright, i'll ask again if this doesnt work out in production but that seems to solve it. thanks again!
Sure thing! Happy to help ๐
ok, just tried it out and it's missing tax transactions, specifically the tax reversal, which we need. is there any way to retrieve a tax reversal if we dont have its ID? this endpoint doesnt have any filters in the docs https://docs.stripe.com/api/tax/transactions/retrieve?lang=python
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
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?
yeah, it was reversed
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
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.
Can you share the tax transaction id you whose reversal you're looking for?
Sure, one example is tax_1PlMFBFiVpk243EA5NADNKQb
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
Can you try retrieving that transaction's line items? https://docs.stripe.com/api/tax/transactions/line_items?lang=python
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Does it show there?
that just lists the two line items for the transaction, not including their reversals
There should be a reveral param on the line items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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**.
Yeah not sure. Not seeing a way to list this. Let me check with a colleague
cool, thanks. i need to bop out for lunch, would it be possible to follow up via email?
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
that's perfect, thank you. i'll keep an eye on my phone
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
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
For that you passed: original_transaction: "tax_1Pjx6NFiVpk243EAy3rXuzIe",
So looks like it's for a different tax transaction than the one you shared before
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
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?
right, we're afraid that if we lose the id from the moment we reverse it's gone forever
That way you can just retrieve it
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? ๐