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.


๐Ÿ”‘API Credentials

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:
  • id - Refund ID
  • status - Current refund status (pending, successful, failed)
  • amount - Refunded amount in smallest currency unit
  • currency - Three-letter ISO currency code
  • charge - Associated charge ID
  • transaction - Transaction ID for the refund
  • voided - Whether refund was processed as a void
  • metadata - Custom metadata attached to refund
  • created_at - ISO 8601 timestamp of refund creation

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

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)

Try it outโ€‹

Required - 2 fields
โ–ผ