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

Retrieve a Receipt

Retrieve details for a specific receipt by its identifier. Returns a complete receipt object with fee breakdown.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`receipt_id`STRING(required)
Receipt identifier matching pattern /rcpt(_test)?_[0-9a-z]+/. This is provided in the URL path.
Example:"rcpt_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must be a valid receipt ID

Responsesโ€‹

200

Successful retrieval

Receipt retrieved successfully. Returns the complete receipt object with all details.

Response includes:
  • id - Receipt identifier
  • charge_fee - Accumulated charge fees
  • transfer_fee - Accumulated transfer fees
  • total - Total fee amount
  • currency - Currency code
  • created_at - Creation timestamp

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

Receipt not found with the provided ID.

Common causes:
  • Invalid receipt ID format
  • Receipt does not exist
  • Receipt belongs to different account
  • Using test key with live receipt ID (or vice versa)

Code samplesโ€‹

curl https://api.omise.co/receipts/rcpt_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundReceipt not foundCheck receipt ID is correct and exists
invalid_receipt_idMalformed receipt IDEnsure ID matches format rcpt(test)?[0-9a-z]+

Receipt Object Fieldsโ€‹

FieldTypeDescription
objectstringAlways returns "receipt"
idstringUnique receipt identifier
livemodebooleanProduction vs test environment indicator
charge_feeintegerOmise charge fee in smallest currency unit
transfer_feeintegerTransfer fee in smallest currency unit
subtotalintegerSubtotal before tax
vatintegerVAT amount
whtintegerWithholding tax amount
totalintegerTotal calculated as subtotal + vat - wht
currencystringThree-letter ISO 4217 code
created_atstringCreation timestamp (ISO 8601)

Try it outโ€‹

Required - 1 fields
โ–ผ