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

Mark charge as paid

Mark a test charge as paid. This endpoint is primarily used for testing and reconciliation purposes with limited support for specific payment methods.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`id`STRING(required)
The charge ID to mark as paid. Must be a test charge that is eligible for manual status updates.
Example:"chrg_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must start with chrg_test_, Charge must be in eligible status, Limited support per payment method

Responsesโ€‹

200

Successfully marked as paid

Charge status updated to successful and marked as paid.

Key field changes:
  • status - Changes to successful
  • paid - Set to true
  • paid_at - Set to current timestamp
  • transaction - Transaction ID created

400

Bad request

Request validation failed.

Common causes:
  • Invalid charge ID format
  • Charge not eligible for manual payment
  • Using live charge (only test charges supported)

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/mark_as_paid \
-X POST \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
not_foundCharge ID doesn't existVerify charge ID is correct
not_eligibleCharge cannot be marked as paidCheck charge status and payment method
already_paidCharge already paidNo action needed
not_test_chargeOnly test charges supportedUse test key and test charge

Try it outโ€‹

Required - 1 fields
โ–ผ