- POST /reserves/$RESERVE_PUB/close#
Force immediate closure of a reserve. Does not actually delete the reserve or the KYC data, but merely forces the reserve’s current balance to be wired back to the account where it originated from, or another account of the user’s choosing if they performed the required KYC check and designated another target account.
Request:
The request body must be a ReserveCloseRequest object.
Response:
- 200 OK:
The exchange responds with a ReserveCloseResponse object.
- 403 Forbidden:
The TALER_SIGNATURE_WALLET_RESERVE_CLOSE signature is invalid. This response comes with a standard ErrorDetail response.
- 404 Not found:
The reserve key does not belong to a reserve known to the exchange.
- 409 Conflict:
No target account was given, and the exchange does not know an origin account for this reserve.
- 451 Unavailable For Legal Reasons:
This account has not yet passed the KYC checks, hence wiring funds to a non-origin account is not allowed. The client must pass KYC checks before the reserve can be opened. The response will be an LegitimizationNeededResponse object.
Details:
interface ReserveCloseRequest { // Signature of purpose // TALER_SIGNATURE_WALLET_RESERVE_CLOSE over // a TALER_ReserveCloseRequestSignaturePS. reserve_sig: EddsaSignature; // Time when the client made the request. // Timestamp must be reasonably close to the time of // the exchange, otherwise the exchange may reject // the request (with a status code of 400). request_timestamp: Timestamp; // Full payto://-URI of the account the reserve balance is to be // wired to. Must be of the form: 'payto://$METHOD' for a // wire method supported by this exchange (if the // method is not supported, this is a bad request (400)). // If not given, the reserve's origin account // will be used. If no origin account is known for the // reserve and not given, this is a conflict (409). payto_uri?: string; }
interface ReserveCloseResponse { // Actual amount that will be wired (excludes closing fee). wire_amount: Amount; }