Skip to main content
Version: 2019-05-29 (Current)

Retrieve a Refund

Retrieve detailed information about a specific refund including its status, amount, and associated transaction.


Request Parametersโ€‹

Required - 2 fieldsRequired Parameters
โ–ผ
`charge_id`STRING(required)
Charge ID that was refunded (path parameter).
Example:"chrg_test_5xuy4w91xqz7d1w9u0t"
`refund_id`STRING(required)
Refund ID to retrieve (path parameter). Format: rfnd_test_ or rfnd_live_ followed by alphanumeric string.
Example:"rfnd_test_5xuy4w91xqz7d1w9u0t"

Responsesโ€‹

200

Successful retrieval

Returns the refund object with all details including status, amount, and timestamps.

Response includes:
  • object - The value "refund"
  • id - Refund identifier (rfnd_*)
  • livemode - Live or test mode
  • location - API path to the refund object
  • acquirer_reference_number - Reference number sent to card networks
  • amount - Refund amount in smallest currency unit
  • approval_code - Reference number for approved transactions
  • capture - Capture reference
  • charge - Associated charge ID (expandable)
  • currency - Three-letter ISO 4217 currency code
  • funding_amount - Amount in settlement currency
  • funding_currency - Settlement currency code
  • merchant_name - Sub-merchant name (Payfac only)
  • merchant_uid - Sub-merchant ID (Payfac only)
  • metadata - Custom metadata attached to refund
  • status - Current refund status (pending, successful, failed)
  • terminal - Original point of sale location
  • transaction - Associated transaction ID (expandable)
  • voided - Whether refund was processed as a void
  • created_at - Refund creation timestamp (ISO 8601)

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Refund or charge not found.

Common causes:
  • Incorrect refund ID
  • Incorrect charge ID
  • Refund belongs to different charge
  • Refund or charge belongs to different account
  • ID typo or formatting error

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/charges/chrg_test_5xuy4w91xqz7d1w9u0t/refunds/rfnd_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundRefund or charge not foundCheck IDs are correct
invalid_refund_idRefund ID format invalidUse valid rfnd_ format

Refund Status Codesโ€‹

StatusDescription
pendingRefund being processed
successfulRefund completed successfully
failedRefund failed (rare)

๐Ÿ”‘API Credentials

Try it outโ€‹

Required - 2 fields
โ–ผ
Your IP: ...Loading...