taler-docs

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

post-management-wire.rst (3357B)


      1 .. http:post:: /management/wire
      2 
      3   This request will be used to enable a wire method (exchange bank account).
      4 
      5   **Request:**
      6 
      7   The request must be a `WireSetupRequest`.
      8 
      9   **Response:**
     10 
     11   :http:statuscode:`204 No content`:
     12     The wire method was successfully enabled.
     13   :http:statuscode:`400 Bad Request`:
     14     The payto URI or another parameter is malformed.
     15     This response comes with a standard `ErrorDetail` response with
     16     a code of ``TALER_EC_GENERIC_PAYTO_URI_MALFORMED`` or
     17     ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     18   :http:statuscode:`403 Forbidden`:
     19     A master signature is invalid. Return with error codes of:
     20     - ``TALER_EC_EXCHANGE_MANAGEMENT_WIRE_ADD_SIGNATURE_INVALID``
     21     - ``TALER_EC_EXCHANGE_MANAGEMENT_WIRE_DETAILS_SIGNATURE_INVALID``
     22   :http:statuscode:`409 Conflict`:
     23     The exchange has a more recent request related to this wire method (replay detected).
     24     Returned with an error code of
     25     ``TALER_EC_EXCHANGE_MANAGEMENT_WIRE_MORE_RECENT_PRESENT``.
     26   :http:statuscode:`413 Request entity too large`:
     27     The uploaded body is to long, it exceeds the size limit.
     28     Returned with an error code of
     29     ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``.
     30   :http:statuscode:`500 Internal Server Error`:
     31     The server experienced an internal error.
     32     This response comes with a standard `ErrorDetail` response.
     33     Possible error codes include
     34     ``TALER_EC_GENERIC_DB_FETCH_FAILED`` or
     35     ``TALER_EC_GENERIC_DB_STORE_FAILED``.
     36 
     37 
     38   **Details:**
     39 
     40   .. ts:def:: WireSetupRequest
     41 
     42     interface WireSetupRequest {
     43 
     44       // Full ``payto://`` URL identifying the account and wire method
     45       payto_uri: string;
     46 
     47       // Signature using the exchange's offline key
     48       // over a `TALER_MasterWireDetailsPS`
     49       // with purpose ``TALER_SIGNATURE_MASTER_WIRE_DETAILS``.
     50       master_sig_wire: EddsaSignature;
     51 
     52       // Signature using the exchange's offline key over a
     53       // `TALER_MasterAddWirePS`
     54       // with purpose ``TALER_SIGNATURE_MASTER_WIRE_ADD``.
     55       master_sig_add: EddsaSignature;
     56 
     57       // When does the wire method become active?
     58       // Should be the time when the signature was created,
     59       // using the (monotonic!) local time of the system
     60       // with the offline master public key. Note that
     61       // even if the time is in the future, the wire method will
     62       // become active immediately! Used ONLY to detect replay attacks.
     63       validity_start: Timestamp;
     64 
     65       // Base URL of a conversion service.
     66       // Only given if available.
     67       conversion_url?: string;
     68 
     69       // Base URL of a open banking gateway service.
     70       // Only given if available.
     71       // @since protocol **v34**.
     72       open_banking_gateway?: string;
     73 
     74       // Base URL of a wire transfer gateway service.
     75       // Only given if available.
     76       // @since protocol **v34**.
     77       wire_transfer_gateway?: string;
     78 
     79       // Restrictions imposed on crediting the account.
     80       credit_restrictions: AccountRestriction[];
     81 
     82       // Restrictions imposed on debiting the account.
     83       debit_restrictions: AccountRestriction[];
     84 
     85       // Display label wallets should use to show this
     86       // bank account.
     87       // @since protocol **v19**.
     88       bank_label?: string;
     89 
     90       // *Signed* integer with the display priority for
     91       // this bank account.
     92       // @since protocol **v19**.
     93       priority?: Integer;
     94 
     95     }