put-deposit-confirmation.rst (3220B)
1 .. http:put:: /deposit-confirmation 2 3 Submits a :ts:type:`DepositConfirmation` to the auditor. Should succeed 4 unless the signature provided is invalid or the exchange is not 5 audited by this auditor. 6 7 **Request:** 8 9 The request body must be a :ts:type:`DepositConfirmation`. 10 11 **Response:** 12 13 :http:statuscode:`204 No Content`: 14 The deposit confirmation was accepted and stored. 15 :http:statuscode:`400 Bad Request`: 16 The request body is malformed or invalid. 17 The response comes with a ``TALER_EC_GENERIC_JSON_INVALID`` or 18 ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code. 19 :http:statuscode:`403 Forbidden`: 20 The signature on the deposit confirmation is invalid. 21 The response comes with a ``TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID`` 22 error code. 23 :http:statuscode:`410 Gone`: 24 The public key used to sign the deposit confirmation 25 was revoked. 26 The response comes with a ``TALER_EC_AUDITOR_EXCHANGE_SIGNING_KEY_REVOKED`` 27 error code. 28 :http:statuscode:`500 Internal Server Error`: 29 The server experienced an internal error. 30 The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``, 31 ``TALER_EC_GENERIC_DB_STORE_FAILED``, or 32 ``TALER_EC_GENERIC_DB_FETCH_FAILED`` error code. 33 34 **Details:** 35 36 .. ts:def:: DepositConfirmation 37 38 interface DepositConfirmation { 39 40 // Hash over the contract for which this deposit is made. 41 h_contract_terms: HashCode; 42 43 // Hash over the policy concerning this deposit. 44 h_policy: HashCode; 45 46 // Hash over the wiring information of the merchant. 47 h_wire: HashCode; 48 49 // Time when the deposit confirmation confirmation was generated. 50 exchange_timestamp: Timestamp; 51 52 // How much time does the merchant have to issue a refund 53 // request? Zero if refunds are not allowed. 54 refund_deadline: Timestamp; 55 56 // By what time does the exchange have to wire the funds? 57 wire_deadline: Timestamp; 58 59 // Amount to be deposited, excluding fee. Calculated from the 60 // amount with fee and the fee from the deposit request. 61 total_without_fee: Amount; 62 63 // Array of public keys of the deposited coins. 64 coin_pubs: EddsaPublicKey[]; 65 66 // Array of deposit signatures of the deposited coins. 67 // Must have the same length as ``coin_pubs``. 68 coin_sigs: EddsaSignature[]; 69 70 // The Merchant's public key. Allows the merchant to later refund 71 // the transaction or to inquire about the wire transfer identifier. 72 merchant_pub: EddsaPublicKey; 73 74 // Signature from the exchange of type 75 // ``TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT``. 76 exchange_sig: EddsaSignature; 77 78 // Public signing key from the exchange matching ``exchange_sig``. 79 exchange_pub: EddsaPublicKey; 80 81 // When does the validity of the exchange_pub end? 82 ep_start: Timestamp; 83 84 // When will the exchange stop using the signing key? 85 ep_expire: Timestamp; 86 87 // When does the validity of the exchange_pub end? 88 ep_end: Timestamp; 89 90 // Exchange master signature over ``exchange_sig``. 91 master_sig: EddsaSignature; 92 } 93 94 .. note:: 95 96 This endpoint is still experimental.