summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-12-28 12:51:23 +0100
committerChristian Grothoff <christian@grothoff.org>2022-12-28 12:51:23 +0100
commit5bac85ddeee72792d8507f6b67d8ffec9fbb19ea (patch)
tree6ab3559d7a1b02e840387ff65d00591f16689521
parent9a4807ef7745c78345ddf62afd6d82f0423b4f5e (diff)
downloaddocs-5bac85ddeee72792d8507f6b67d8ffec9fbb19ea.tar.gz
docs-5bac85ddeee72792d8507f6b67d8ffec9fbb19ea.tar.bz2
docs-5bac85ddeee72792d8507f6b67d8ffec9fbb19ea.zip
document purse deletion API
-rw-r--r--core/api-exchange.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 7fbe6fe2..68528fb7 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -3930,6 +3930,34 @@ Wallet-to-wallet transfers
}
+
+.. http:delete:: /purses/$PURSE_PUB
+
+ Delete a purse that is unmerged and not yet expired. Refunds any money that
+ is already in the purse.
+
+ **Request:**
+
+ The request body must be empty, as recommended for HTTP delete in general.
+ To authorize the request, the header must contain a
+ ``Taler-Purse-Signature: $PURSE_SIG`` where ``$PURSE_SIG`` is the Crockford base32-encoded
+ EdDSA signature of purpose TALER_SIGNATURE_WALLET_PURSE_DELETE.
+
+ **Response:**
+
+ :http:statuscode:`204 No Content`:
+ The operation succeeded, the exchange confirms that the purse
+ was deleted.
+ :http:statuscode:`403 Forbidden`:
+ The signature is invalid.
+ This response comes with a standard `ErrorDetail` response.
+ :http:statuscode:`404 Not Found`:
+ The purse is not known. Might have already been deleted previously.
+ :http:statuscode:`409 Conflict`:
+ It is too late to delete the purse, its fate (merge or expiration)
+ was already decided.
+
+
.. http:POST:: /purses/$PURSE_PUB/merge
Merge purse with account, adding the value of the purse into