get-transfers-WTID.rst (3605B)
1 .. http:get:: /transfers/$WTID 2 3 Provides deposits associated with a given wire transfer. The 4 wire transfer identifier (WTID) and the base URL for tracking 5 the wire transfer are both given in the wire transfer subject. 6 7 **Response:** 8 9 :http:statuscode:`200 OK`: 10 The wire transfer is known to the exchange, details about it follow in the body. 11 The body of the response is a `TrackTransferResponse`. 12 :http:statuscode:`400 Bad Request`: 13 The ``$WTID`` is malformed. 14 This response comes with a standard `ErrorDetail` response with 15 a code of ``TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_MALFORMED``. 16 :http:statuscode:`404 Not found`: 17 The wire transfer identifier is unknown to the exchange. 18 Returned with an error code of 19 ``TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_NOT_FOUND``. 20 :http:statuscode:`500 Internal server error`: 21 The exchange encountered an internal problem processing 22 the request. Error codes used are: 23 - ``TALER_EC_GENERIC_DB_FETCH_FAILED`` 24 - ``TALER_EC_GENERIC_DB_INVARIANT_FAILURE`` 25 - ``TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE`` 26 - ``TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_NOT_FOUND`` 27 - ``TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT`` 28 29 .. ts:def:: TrackTransferResponse 30 31 interface TrackTransferResponse { 32 // Actual amount of the wire transfer, excluding the wire fee. 33 total: Amount; 34 35 // Applicable wire fee that was charged. 36 wire_fee: Amount; 37 38 // Public key of the merchant (identical for all deposits). 39 merchant_pub: EddsaPublicKey; 40 41 // Hash of the payto:// account URI (identical for all deposits). 42 h_payto: FullPaytoHash; 43 44 // Full payto://-URI of the exchange's own bank account that 45 // was debited to make the wire transfer. Merchants may show 46 // this to their staff to help locate the incoming transfer in 47 // their bank statement. Optional, as the exchange does not 48 // have this information for wire transfers that were executed 49 // before the exchange started to record it. 50 // @since protocol **v39**. 51 exchange_payto_uri?: string; 52 53 // Time of the execution of the wire transfer by the exchange. 54 execution_time: Timestamp; 55 56 // Details about the deposits. 57 deposits: TrackTransferDetail[]; 58 59 // Signature from the exchange made with purpose 60 // ``TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT`` 61 // over a `TALER_WireDepositDataPS`. 62 exchange_sig: EddsaSignature; 63 64 // Public EdDSA key of the exchange that was used to generate the signature. 65 // Should match one of the exchange's signing keys from ``/keys``. Again given 66 // explicitly as the client might otherwise be confused by clock skew as to 67 // which signing key was used. 68 exchange_pub: EddsaPublicKey; 69 } 70 71 .. ts:def:: TrackTransferDetail 72 73 interface TrackTransferDetail { 74 // SHA-512 hash of the contact of the merchant with the customer. 75 h_contract_terms: HashCode; 76 77 // Coin's public key, both ECDHE and EdDSA. 78 coin_pub: CoinPublicKey; 79 80 // The total amount the original deposit was worth, 81 // including fees and after applicable refunds. 82 deposit_value: Amount; 83 84 // Applicable fees for the deposit, possibly 85 // reduced or waived due to refunds. 86 deposit_fee: Amount; 87 88 // Refunds that were applied to the value of 89 // this coin. Optional. 90 // @since protocol **v19**. Before, refunds were 91 // incorrectly still included in the 92 // ``deposit_value`` (!). 93 refund_total?: Amount; 94 95 }