POST
/
api
/
service
/
refund
/
retrieve
JavaScript
import Ivy from '@getivy/node-sdk';

const client = new Ivy({
  apiKey: 'My API Key',
});

const refund = await client.refunds.retrieve({ id: 'id' });

console.log(refund.id);
{
  "id": "<string>",
  "amount": 1,
  "currency": "EUR",
  "status": "initiated",
  "orderId": "<string>",
  "transactionId": "<string>"
}

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json
id
string
required

Id of refund to retrieve details

Response

200 - application/json

Returns the refund details.

id
string
required

The unique Refund id

amount
number
required

The amount of the refund in decimals.

Required range: x > 0
currency
enum<string>
required

Refund's currency.

Available options:
EUR,
GBP,
PLN,
SEK,
DKK
status
enum<string>
required

The current status of this refund.

Available options:
initiated,
pending,
succeeded,
failed
orderId
string
required

The id of the refunded order

transactionId
string

The id of the transaction