#shamma-chancellor-balance
1 messages · Page 1 of 1 (latest)
@wide zephyr hello! We did discuss this in details last week already right? There isn't a way to get to this
Hi Koopajah, yes we spoke
It was about something related, but not the same.
If I call stripe charges retrieve py_1JcxcdPMRkxSx21JzGl9rxjx from the command line, the refunds are part of the response payload.
"refunds": {
"object": "list",
"data": [
{
"id": "pyr_1JpAMiAN9UGzw70gy3XhJTJ7",
"object": "refund",
"amount": 209000,
"balance_transaction": "txn_1JpAMjAN9UGzw70gbHB6dvlE",
"charge": "py_1Jo5xVAN9UGzw70gfNz8BvCO",
"created": 1635334340,
"currency": "usd",
"description": "Payment failure refund",
"metadata": {
},
"payment_intent": null,
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
"status": "pending",
"transfer_reversal": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges/py_1Jo5xVAN9UGzw70gfNz8BvCO/refunds"
},
If I call via node js lib: (With refunds expanded)
refunds: {
object: 'list',
data: [],
has_more: false,
total_count: 0,
url: '/v1/charges/py_1Jo5xVAN9UGzw70gfNz8BvCO/refunds'
},
I am wondering why it shows no refunds, when if you actually list the refunds in node, they're also there. (e.g. stripe.refunds.list({charge: 'py_1Jo5xVAN9UGzw70gfNz8BvCO'}) does show it also)
@agile urchin not sure if you're still looking at this thread, sorry about the ping if not. Seemed like you dismissed it.
I didn't dismiss, but there are 15 other threads in parallel 🙂
No worries, take your time.
still digging
It's an API version difference!
I mentioned the other day that this API version https://stripe.com/docs/upgrades#2019-05-16 removed "system refunds" after debit failures
One of your call is using a 2018 API version (your account's default) with the CLI while another uses the latest API version 2020-08-27 via node
Ultimately, you shouldn't rely on finding that pyr_123 in the API since we deprecated it over 2 years ago
I see... Okay. So it looks like they are not deprecated on the refunds endpoint though?
Not entirely sure what you mean by that either
From the link you posted, it says "You can still obtain these via"
ah gotcha. Yes that should work in that case