Cancel withdrawal
Cancels a withdrawal initiated by the requesting entity. Allowed from pending or approved states. If the withdrawal was approved (funds reserved), cancellation reverses the payable entries and restores the available balance.
Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X POST "https://api.miracle.com/v1/withdrawals/string/cancel"{
"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"
}
}Approve withdrawal
Operator action that moves a pending withdrawal to `approved`. The balance guard is enforced at approval time — the amount is reserved on the entity’s payable bucket atomically. Operators may supply a `fundingAccountId` or `withdrawalChannelId` to override routing.
Mark withdrawal as completed
Closes an executing withdrawal with success. A `comment` (typically the bank wire reference) is mandatory for auditability. Creates the final ledger entries: debit the payable bucket and credit the funding account.