taler-docs

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

post-kyc-start-ID.rst (2247B)


      1 .. http:post:: /kyc-start/$ID
      2 
      3   The ``/kyc-start/$ID`` POST endpoint allows the SPA to set up a new external
      4   KYC process. It will return the URL that the client must GET to begin the
      5   KYC process. The SPA should probably open this URL in a new window or tab.
      6   The ``$ID`` will be provided as part of the ``/kyc-info`` body.  In
      7   practice, ``$ID`` will encode the ``$ACCESS_TOKEN``, legitimization measure
      8   serial ID (to disambiguate) and the index of the selected measure (but these
      9   details should be irrelevant for the client).
     10 
     11   **Request:**
     12 
     13   Use empty JSON body for now.
     14 
     15   **Response:**
     16 
     17   :http:statuscode:`200 Ok`:
     18     The KYC process was successfully initiated. The URL is in a
     19     `KycProcessStartInformation` object.
     20   :http:statuscode:`400 Bad Request`:
     21     The request body is malformed or a parameter is invalid.
     22     This response comes with a standard `ErrorDetail` response with
     23     a code of ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     24   :http:statuscode:`404 Not Found`:
     25     The ``$ID`` is unknown to the exchange.
     26   :http:statuscode:`409 Conflict`:
     27     The KYC form has already been uploaded or the KYC logic
     28     is invalid.
     29     This response comes with a standard `ErrorDetail` response with
     30     a code of ``TALER_EC_EXCHANGE_KYC_FORM_ALREADY_UPLOADED`` or
     31     ``TALER_EC_EXCHANGE_KYC_INVALID_LOGIC_TO_CHECK``.
     32   :http:statuscode:`413 Request entity too large`:
     33     The uploaded body is to long, it exceeds the size limit.
     34     Returned with an error code of
     35     ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``.
     36   :http:statuscode:`500 Internal Server Error`:
     37     The server had an internal problem processing the request.
     38     Returned with error codes of:
     39     - ``TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_BUG``
     40     - ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``
     41     - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
     42     - ``TALER_EC_GENERIC_DB_STORE_FAILED``
     43 
     44   **Details:**
     45 
     46   .. ts:def:: KycProcessStartInformation
     47 
     48     interface KycProcessStartInformation {
     49 
     50       // URL to open.
     51       redirect_url: string;
     52     }
     53 
     54   .. note::
     55 
     56     As this endpoint is involved in every KYC check at the beginning, this
     57     is also the place where we could integrate the payment process for the KYC fee
     58     in the future (since protocol **vATTEST**).