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

Retrieve a charge

Retrieve details of an existing charge. Returns complete information about the charge including its status, payment method, and transaction details.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`id`STRING(required)
The charge ID to retrieve. Must be a valid charge ID from your account.
Example:"chrg_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must start with chrg_, Test charges: chrg_test_, Live charges: chrg_live_

Responsesโ€‹

200

Successful retrieval

Returns complete charge object with all fields.

Response includes:
  • status - pending, successful, failed, expired, or reversed
  • amount - Charge amount in smallest currency unit
  • paid - Whether payment is completed
  • authorized - Whether charge is authorized
  • card / source - Payment method details
  • refunds - List of refunds (if any)
  • failure_code / failure_message - Error details if failed

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key

404

Not found

Charge ID does not exist.

Common causes:
  • Incorrect charge ID
  • Charge from different account
  • Using test key for live charge (or vice versa)

Code samplesโ€‹

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

Error and result codesโ€‹

Charge Status Valuesโ€‹

StatusDescriptionNext Steps
pendingAwaiting customer actionWait for webhook or poll periodically
successfulPayment completedFulfill order
failedPayment failedCheck failure_code and failure_message
expiredCharge expiredCreate new charge
reversedPre-auth cancelledNo funds transferred

Boolean Flagsโ€‹

FieldDescriptionUse Case
paidPayment completedCheck before fulfillment
authorizedFunds authorizedPre-auth status
capturableCan capture pre-authCheck before capture
refundableCan create refundCheck before refund
reversibleCan reverse pre-authCheck before reverse

Try it outโ€‹

Required - 1 fields
โ–ผ