taler-docs

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

get-deposits-H_WIRE-MERCHANT_PUB-H_CONTRACT_TERMS-COIN_PUB.rst (4599B)


      1 .. http:get:: /deposits/$H_WIRE/$MERCHANT_PUB/$H_CONTRACT_TERMS/$COIN_PUB
      2 
      3   Provide the wire transfer identifier associated with an (existing) deposit operation.
      4   The arguments are the hash of the merchant's payment details (H_WIRE), the
      5   merchant's public key (EdDSA), the hash of the contract terms that were paid
      6   (H_CONTRACT_TERMS) and the public key of the coin used for the payment (COIN_PUB).
      7 
      8   **Request:**
      9 
     10   :query merchant_sig: EdDSA signature of the merchant made with purpose
     11     ``TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION`` over a
     12     ``TALER_DepositTrackPS``, affirming that it is really the merchant who
     13     requires obtaining the wire transfer identifier.
     14   :query timeout_ms=NUMBER: *Optional.* If specified, the exchange will wait
     15     up to ``NUMBER`` milliseconds for completion of a deposit operation before
     16     sending the HTTP response.
     17   :query lpt=TARGET: *Optional*.
     18     Specifies what status change we are long-polling for.
     19     Use 1 to wait for the a 202 state where ``kyc_ok`` is false *or* a 200 OK response.
     20     2 to wait exclusively for a 200 OK response.
     21     @since protocol **v21**.
     22 
     23   **Response:**
     24 
     25   :http:statuscode:`200 OK`:
     26     The deposit has been executed by the exchange and we have a wire transfer identifier.
     27     The response body is a `TrackTransactionResponse` object.
     28   :http:statuscode:`202 Accepted`:
     29     The deposit request has been accepted for processing, but was not yet
     30     executed.  Hence the exchange does not yet have a wire transfer identifier.  The
     31     merchant should come back later and ask again.
     32     The response body is a `TrackTransactionAcceptedResponse`.
     33   :http:statuscode:`403 Forbidden`:
     34     A signature is invalid.
     35     This response comes with a standard `ErrorDetail` response.
     36   :http:statuscode:`404 Not found`:
     37     The deposit operation is unknown to the exchange.
     38 
     39   **Details:**
     40 
     41   .. ts:def:: TrackTransactionResponse
     42 
     43     interface TrackTransactionResponse {
     44 
     45       // Raw wire transfer identifier of the deposit.
     46       wtid: Base32;
     47 
     48       // When was the wire transfer given to the bank.
     49       execution_time: Timestamp;
     50 
     51       // The contribution of this coin to the total (without fees)
     52       coin_contribution: Amount;
     53 
     54       // Binary-only Signature_ with purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE``
     55       // over a `TALER_ConfirmWirePS`
     56       // whereby the exchange affirms the successful wire transfer.
     57       exchange_sig: EddsaSignature;
     58 
     59       // Public EdDSA key of the exchange that was used to generate the signature.
     60       // Should match one of the exchange's signing keys from /keys.  Again given
     61       // explicitly as the client might otherwise be confused by clock skew as to
     62       // which signing key was used.
     63       exchange_pub: EddsaPublicKey;
     64     }
     65 
     66   .. ts:def:: TrackTransactionAcceptedResponse
     67 
     68     interface TrackTransactionAcceptedResponse {
     69 
     70       // Legitimization row. Largely useless, except
     71       // not present if the deposit has not
     72       // yet been aggregated to the point that a KYC
     73       // requirement has been evaluated.
     74       requirement_row?: Integer;
     75 
     76       // True if the KYC check for the merchant has been
     77       // satisfied.  False does not mean that KYC
     78       // is strictly needed, unless also a
     79       // legitimization_uuid is provided.
     80       kyc_ok: boolean;
     81 
     82       // Time by which the exchange currently thinks the deposit will be executed.
     83       // Actual execution may be later if the KYC check is not satisfied by then.
     84       execution_time: Timestamp;
     85 
     86       // Public key associated with the account. The client must sign
     87       // the initial request for the KYC status using the corresponding
     88       // private key.  Will be the merchant (instance) public key.
     89       //
     90       // This is ONLY given if the merchant did a KYC auth wire transfer.
     91       // It is not given if the deposit was made to a reserve public key.
     92       // The wallet would already know the reserve public key, plus there
     93       // could be various reserve public keys (which do not change), while
     94       // there is only the *latest* KYC auth wire transfer public key.
     95       //
     96       // Absent if no public key is currently associated
     97       // with the account and the client MUST thus first
     98       // credit the exchange via an inbound wire transfer
     99       // to associate a public key with the debited account.
    100       // Note that absence does *not* imply a need for a KYC auth
    101       // transfer if the deposit was made to a reserve public key
    102       // that was also used for the deposit.
    103       //
    104       // @since protocol **v20**.
    105       account_pub?: EddsaPublicKey;
    106 
    107     }