Payment-Refund details

GET/payment/{payment_reference}/refunds

Get the details of the refund, including current status via payment reference.

Path Parameters

payment_referencestringrequired

Unique payment reference number given by the Payment Request

Response

Success

refund_currencystring

The local currency equivalent of the refund. This should be a 3-character ISO 4217 currency code. Please ignore if the refund is in cryptocurrency.

refund_amountnumber<float>

The local currency amount to be refunded. Please ignore if the refund is in cryptocurrency.

remain_amountnumber<float>

The remaining local currency amount of the payment after being refunded. Please ignore if the refund is in cryptocurrency.

refund_crypto_currencystring

Cryptocurrency that will be paid out. Please ignore if the refund is in local currency.

refund_crypto_amountnumber<float>

The cryptocurrency amount to be refunded. Please ignore if the refund is in local currency.

remain_crypto_amountnumber<float>

The remaining cryptocurrency amount of the payment after being refunded. Please ignore if the refund is in local currency.

refundsobject[]
Show refunds properties
payout_referencestring

Unique payout reference number

type"withdraw" | "refund"

The type of payout:

  1. refund - A partial or complete refund of a prior successful payment.

  2. withdraw - A settlement of the merchant’s accumulated USD balance in cryptocurrency.

local_currencystring

The local currency equivalent of the payout. This should be a 3-character ISO 4217 currency code. Please ignore if the payout is in cryptocurrency.

local_amountnumber<float>

The local currency amount to be paid out. Please ignore if the payout is in cryptocurrency.

crypto_currencystring

Cryptocurrency that will be paid out. Please ignore if the payout is in local currency.

crypto_amountnumber<float>

Amount of cryptocurrency to be paid out if the settlement is in cryptocurrency.

display_crypto_currencystring

Cryptocurrency that will displayed. Please ignore if the payout is in local currency.

network_fee_crypto_amountnumber<float>

Amount of cryptocurrency representing the network fee. This is denominated in crypto_currency.

net_crypto_amountnumber<float>

Amount of cryptocurrency after deduction of the network_fee_crypto_amount.

exchange_ratenumber<float>

The exchange rate that will be used to exchange local currency to cryptocurrency or vice-versa.

crypto_addressstring

Address that recipient will receive the payout at.

status"new" | "confirm" | "done" | "cancel"

The current status of the payout:

  1. new - The payout has just been created, but the recipient has not entered in their receiving crypto address and the exchange rate has not been fixed.

  2. confirm - The recipient has confirmed their receiving crypto address and the exchange rate has been fixed.

  3. done - The crypto payout has been broadcast to the blockchain.

  4. cancel - The crypto payout has been cancelled.

status_datestring<date-time>

Date and time the status was updated

merchant_namestring

Name of the merchant

remarksstring

Remarks for the payout

account_type"local"

Account type the funds are drawn from: local - Funds are drawn from a local currency account

convert_type"local-local" | "local-crypto"

Type of conversion the funds underwent:

  1. local-local - Funds are drawn from a local currency account and paid out as local currency.

  2. local-crypto - Funds are drawn from a local currency account and paid out as cryptocurrency.

order_idstring

Your system unique order id. You will get this in the notification webhook data, if you insert your unique order_id in the request body during the payout/settlement creation.

Not authorized

messagestring

No permission to view details of this refund

messagestring

Refund not found

messagestring
Request
curl -X GET "https://api.triple-a.io/api/v2/payment/<payment_reference>/refunds" \
  -H "Authorization: Bearer <token>"
Response
{
  "refund_currency": "USD",
  "refund_amount": 6,
  "remain_amount": 0,
  "refund_crypto_currency": "testBTC",
  "refund_crypto_amount": 0,
  "remain_crypto_amount": 0,
  "refunds": [
    {
      "payout_reference": "DNU-645266-PYT",
      "type": "refund",
      "local_currency": "USD",
      "local_amount": "1",
      "crypto_currency": "testBTC",
      "crypto_amount": "0.00005168",
      "display_crypto_currency": "testBTC",
      "network_fee_crypto_amount": "0",
      "net_crypto_amount": "0.00005168",
      "exchange_rate": "19349.85",
      "crypto_address": "1NcAyv8YVCnQGCrDb4kiUm1jj6GLyowxER",
      "status": "cancel",
      "status_date": "2022-06-18T10:50:34.741Z",
      "merchant_name": "A to Z Toys and Games",
      "remarks": "Refund for a water pistol",
      "account_type": "local",
      "convert_type": "local-crypto",
      "order_id": "your_order_id"
    }
  ]
}