Retrieve Refund

Check the status of a refund request

Check the current status of a refund request.

Endpoint

GET /refund/retrieve/:id

Request headers

HeaderRequiredDescription
x-api-keyYesYour API key

Path parameters

ParameterTypeDescription
idstringThe refund request ID returned when you created the refund

Response

{
  "success": true,
  "data": {
    "refundRequestId": "refund_abc123",
    "transactionId": "txn_abc123def456",
    "amount": 250,
    "accountType": "PERSONAL_ACCOUNT",
    "accountNumber": "01712345678",
    "status": "Completed",
    "note": "Customer requested partial refund",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:35:00.000Z"
  }
}

Status values

StatusDescription
ProcessingRefund is being processed
CompletedRefund was successful
CancelledRefund was cancelled or failed

Example

const axios = require("axios");

const refundId = "refund_abc123";

const response = await axios.get(
  `https://sandbox.payzava.com/cp/api/v1/refund/retrieve/${refundId}`,
  {
    headers: {
      "x-api-key": "sk_sandbox_your_api_key",
    },
  }
);

const { status, amount } = response.data.data;

console.log(`Refund ${refundId}: ${status} (${amount} BDT)`);