ReleaseReservationCommand (v1.0.0)
Command to release a previously made reservation in a merchant account
ReleaseReservationCommand
Releases a previously held reservation on a merchant account, typically as part of the refund confirmation process.
Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "ReleaseReservationCommand", "description": "Command to release a previously made reservation in a merchant account", "properties": { "accountId": { "type": "object", "description": "Account identifier", "properties": { "value": { "type": "string", "format": "uuid", "description": "The unique account UUID" } }, "required": ["value"] }, "reservationId": { "type": "object", "description": "Reservation identifier", "properties": { "value": { "type": "string", "format": "uuid", "description": "The unique reservation UUID to release" } }, "required": ["value"] }, "reason": { "type": "string", "description": "Reason for releasing the reservation", "example": "Transaction completed" } }, "required": ["accountId", "reservationId"], "additionalProperties": false}Purpose
This command releases funds that were previously reserved for a potential refund, making them available again in the merchant’s account balance. It’s executed when a refund is confirmed or when a reservation expires.
Key Attributes
- Account ID: Merchant account aggregate identifier
- Transaction ID: Unique identifier for the transaction being released
- Amount: Amount to be released from reservation
- Currency: Currency of the reserved amount
- Reservation Reference: Reference to the original reservation
Business Rules
- Reservation must exist for the specified transaction
- Amount must match the originally reserved amount
- Currency must match the account currency
- Only active reservations can be released
- Account balance is updated to reflect the released amount
Usage Scenarios
- Refund Confirmation: When a refund is successfully processed
- Reservation Expiry: When a reservation times out without confirmation
- Manual Release: Administrative action to release stuck reservations
- Failed Refund: When refund processing fails and funds need to be released
Result
When successful, this command produces a ReservationReleasedEvent and updates the merchant account balance by releasing the reserved funds.