curl --location --request POST '/api/v1/sandbox/simulate-error' \
--header 'x-business-id;' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"transactionId": "trxn_123",
"scenarioType": "PAYMENT_FAILED"
}'
{
"success": true,
"message": "Error scenario 'PAYMENT_FAILED' simulated successfully",
"transaction": {
"id": "trxn_123",
"status": "FAILED",
"payoutStatus": "PENDING",
"failureReason": "Insufficient confirmations",
"errorCode": "TXN_CONF_LOW"
},
"webhook": {
"url": "https://merchant.example/webhook",
"status": 200,
"statusText": "OK",
"response": "{\"received\":true}"
}
}