taler-docs

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

post-orders-ORDER_ID-unclaim.rst (1267B)


      1 .. http:post:: [/instances/$INSTANCE]/orders/$ORDER_ID/unclaim
      2 
      3   Wallet releases ownership over an order. By unclaiming an
      4   order, it becomes possible for another wallet to claim it.
      5   This is useful if a user abandons buying the order with one
      6   wallet but then wants to pay with a different wallet.
      7 
      8   @since protocol **v26**.
      9 
     10   **Request:**
     11 
     12   The request must be an `UnclaimRequest`.
     13 
     14   **Response:**
     15 
     16   :http:statuscode:`204 No content`:
     17     The client has successfully unclaimed the order.
     18   :http:statuscode:`403 Forbidden`:
     19     The signature is invalid.
     20   :http:statuscode:`404 Not found`:
     21     The backend is unaware of the instance or order.
     22   :http:statuscode:`409 Conflict`:
     23     The order was already paid, and thus cannot be unclaimed anymore.
     24 
     25   **Details:**
     26 
     27   .. ts:def:: UnclaimRequest
     28 
     29     interface UnclaimRequest {
     30       // Signature using the key of the claim nonce
     31       // to affirm unclaiming of the order.
     32       unclaim_sig: EddsaSignature;
     33 
     34       // Nonce to identify the wallet that claimed the order,
     35       // public key matching ``unclaim_sig``.
     36       nonce: EddsaPublicKey;
     37 
     38       // Hash of the order's contract terms, used
     39       // to enable signature verification without
     40       // database access.
     41       h_contract: HashCode;
     42     }