Miracle Docs
Withdrawals

Mark withdrawal as failed

Closes an executing withdrawal with failure. A comment explaining the failure is mandatory. Reverses the payable entries — debit payable, credit available — so the requester can retry.

POST
/v1/withdrawals/{id}/fail
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.miracle.com/v1/withdrawals/string/fail" \  -H "Content-Type: application/json" \  -d '{    "comment": "string"  }'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "livemode": true,
    "entityType": "merchant",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "amount": {
      "currency": "string",
      "valueMinor": 0
    },
    "fundingAccountId": "2d58f397-b4d9-4f93-90cb-6efb6d145ec8",
    "withdrawalChannelId": "b70bedc4-aba7-434f-96c0-7262aa261ef0",
    "withdrawalMethodId": "fe4c65d7-2e82-4bec-b31e-7ddd5bc33f55",
    "destination": {
      "type": "bank_account",
      "details": {
        "property1": "string",
        "property2": "string"
      }
    },
    "fee": {
      "currency": "string",
      "valueMinor": 0
    },
    "status": "pending",
    "failureReason": "string",
    "rejectionReason": "string",
    "executionComment": "string",
    "providerReference": "string",
    "idempotencyKey": "string",
    "createdAt": "string",
    "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
    "approvedAt": "string",
    "approvedBy": "c91bd49a-5920-43a3-b792-1660455e23bf",
    "rejectedAt": "string",
    "rejectedBy": "5cb42f49-c6a2-45fc-805c-4333469e59d0",
    "canceledAt": "string",
    "canceledBy": "d47ffd0b-7a01-4641-8922-51e4bfae50be",
    "executedAt": "string",
    "executedBy": "7e6bdc13-8eb5-4edc-b30c-105a6e22bfbc",
    "completedAt": "string",
    "updatedAt": "string",
    "currency": "string"
  }
}
Empty
Empty
Empty

On this page