taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

delete-purses-PURSE_PUB.rst (1639B)


      1 .. http:delete:: /purses/$PURSE_PUB
      2 
      3   Delete a purse that is unmerged and not yet expired. Refunds any money that
      4   is already in the purse.
      5 
      6   **Request:**
      7 
      8   The request body must be empty, as recommended for HTTP delete in general.
      9 
     10   To authorize the request, the header must contain the following HTTP header:
     11 
     12   *Taler-Purse-Signature*:
     13     $PURSE_SIG`` where ``$PURSE_SIG`` is the Crockford base32-encoded EdDSA
     14     signature of purpose TALER_SIGNATURE_WALLET_PURSE_DELETE.
     15 
     16   **Response:**
     17 
     18   :http:statuscode:`204 No Content`:
     19     The operation succeeded, the exchange confirms that the purse
     20     was deleted.
     21   :http:statuscode:`400 Bad request`:
     22     The request was malformed.
     23     Returned with an error code of
     24     ``TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED``.
     25   :http:statuscode:`403 Forbidden`:
     26     The signature is invalid.
     27     This response comes with a standard `ErrorDetail` response and
     28     an error code of ``TALER_EC_EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID``.
     29   :http:statuscode:`404 Not Found`:
     30     The purse is not known. Might have already been deleted previously.
     31     Returned with an error code of
     32     ``TALER_EC_EXCHANGE_GENERIC_PURSE_UNKNOWN``.
     33   :http:statuscode:`409 Conflict`:
     34     It is too late to delete the purse, its fate (merge or expiration)
     35     was already decided.
     36     Returned with an error code of
     37     ``TALER_EC_EXCHANGE_PURSE_DELETE_ALREADY_DECIDED``.
     38   :http:statuscode:`500 Internal server error`:
     39     The server encountered an internal error processing the request.
     40     Returned with an error code of
     41     ``TALER_EC_GENERIC_DB_STORE_FAILED`` or
     42     ``TALER_EC_GENERIC_DB_START_FAILED``.