taler-docs

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

unclaim-payment.rst (1565B)


      1 .. ts:op:: unclaimPayment
      2 
      3   Release this wallet's claim on an unpaid order, so that the payment
      4   can be handed off to another wallet.
      5 
      6   The merchant is asked to release the order, and the operation returns
      7   a public ``taler://pay/`` URI for the order that contains no private
      8   nonce.  Another wallet can use this URI with
      9   :ts:op:`preparePayForUriV2` to claim and pay the order instead.  The
     10   payment can only be released before it is paid; use
     11   :ts:op:`reclaimPayment` to claim the order again for this wallet.
     12 
     13   **Request:**
     14 
     15     The ``args`` must be an `UnclaimPaymentRequest` object.
     16 
     17   **Response:**
     18 
     19     On success, the result is an `UnclaimPaymentResult` object.
     20 
     21   **Side effects:**
     22 
     23     Unclaims the payment at the merchant and generates a taler://pay
     24     URI that allows another wallet to complete it; changes the
     25     transaction state.
     26 
     27   **Expected errors:**
     28 
     29     The caller can handle the following errors inline:
     30     ``WALLET_TRANSACTION_NOT_FOUND``,
     31     ``WALLET_REQUEST_TRANSACTION_STATE_UNSUPPORTED``,
     32     ``WALLET_CORE_REQUEST_CANCELLED``,
     33     ``WALLET_UNEXPECTED_REQUEST_ERROR``.
     34 
     35 .. ts:def:: UnclaimPaymentRequest
     36 
     37   interface UnclaimPaymentRequest {
     38     // Transaction identifier of the payment to release.
     39     transactionId: TransactionIdStr;
     40 
     41     // Enables progress correlation and cancellation through
     42     // cancelProgressToken.
     43     progressToken?: string;
     44   }
     45 
     46 .. ts:def:: UnclaimPaymentResult
     47 
     48   interface UnclaimPaymentResult {
     49     // Public taler://pay/ URI that another wallet can claim.
     50     talerPayUri: TalerUriString;
     51   }