API Reference / Charges / Mark as failed

Mark as failed

Test Mode Only

Force a test charge to the failed state.

Test Mode Only
This endpoint only works with test mode API keys (skey_test_...). Calling this endpoint with a live mode key will return a 400 Bad Request error.
POSThttps://api.omise.co/charges/:id/mark_as_failed
This endpoint is only available in test mode. It forces a pending charge to transition to the `failed` state without actually processing a payment. Use this for integration testing to simulate failed payments and test your error handling logic. Attempting to call this endpoint on a live-mode charge will return a `400 Bad Request` error.

Parameters

idstringrequired
The charge ID to mark as failed
Other Charge Endpoints
Create a chargeRetrieve a chargeList all chargesUpdate a chargeCapture a chargeReverse a chargeExpire a chargeMark as paid