Fetch Bulk Refund Details

Retrieves paginated records of processed refunds (result = 'REFUND') matching a given reference ID

Fetch Bulk Refund Details (/fetch-bulk-refund-by-reference)

  • URL: https://sandboxapi.upayments.com/api/v1/fetch-bulk-refund-by-reference
  • HTTP Method: POST

Request Parameters

ParameterTypeRequired / OptionalConstraintsDescription
referenceStringRequiredMax: 500The reference identifier for which refunds were initiated.
perPageIntegerOptionalNumeric, Min: 10, Max: 100Number of records per page (Default: 10).
pageIntegerOptionalNumeric, Min: 1Page number to retrieve (Default: 1).

Example Request

{
    "reference": "ORD_REF_892341",
    "perPage": 20,
    "page": 1
  }'

Success Response Payload

HTTP 200 OK

{
  "status": true,
  "message": "Response received successfully",
  "data": {
    "pagination": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 20,
      "from": 1,
      "to": 2,
      "total": 2,
      "path": "https://sandboxapi.upayments.com/api/v1/fetch-bulk-refund-by-reference",
      "links": [
        {
          "url": null,
          "label": "« Previous",
          "active": false
        },
        {
          "url": "https://apiv2api.upayments.com/api/v1/fetch-bulk-refund-by-reference?page=1",
          "label": "1",
          "active": true
        },
        {
          "url": null,
          "label": "Next »",
          "active": false
        }
      ]
    },
    "refund": [
      {
        "id": 894120,
        "orderId": "rfd_928174910283",
        "invoiceId": 74120,
        "reference": "ORD_REF_892341",
        "amount": 15.5,
        "totalPrice": 15.5,
        "currency": "KWD",
        "result": "REFUND",
        "status": "paid",
        "notifyUrl": "https://merchant.example.com/webhooks/refunds",
        "transactionDate": "2026-11-30 13:20:15"
      },
      {
        "id": 894121,
        "orderId": "rfd_928174910284",
        "invoiceId": 74121,
        "reference": "ORD_REF_892341",
        "amount": 15.5,
        "totalPrice": 15.5,
        "currency": "KWD",
        "result": "REFUND",
        "status": "paid",
        "notifyUrl": "https://merchant.example.com/webhooks/refunds",
        "transactionDate": "2026-11-30 13:20:16"
      }
    ]
  }
}

Refund Record Field Descriptions

FieldTypeDescription
idIntegerUnique transaction ID in the API gateway.
orderIdStringUnique refund order identifier.
invoiceIdIntegerInternal refund invoice ID generated in the merchant portal.
referenceStringThe merchant reference ID tied to this refund.
amountFloatRefunded amount for this specific transaction.
totalPriceFloatTotal refund price (equal to amount).
currencyStringThree-letter currency code (e.g., KWD, USD).
resultStringGateway result code (always "REFUND" for completed refunds).
statusStringStatus of the refund invoice ("paid").
notifyUrlStringWebhook URL assigned to receive transaction callbacks.
transactionDateStringDate and time when the refund transaction was created (YYYY-MM-DD HH:MM:SS).

🚦 HTTP Response Codes Reference

HTTP CodeDescription & Scenario
200 OKRequest succeeded (e.g., fetching bulk refund records or business error checks).
201 CreatedBulk refund processing jobs successfully dispatched or approval requested.
401 UnauthorizedMissing or invalid API key, invalid HMAC signature, or expired timestamp.
403 ForbiddenAccess forbidden or merchant account disabled.
404 Not FoundNo matching captured transactions or refund records found for the reference.
422 Unprocessable EntityValidation failure on request body parameters.