post-private-accept-tos-early.rst (1794B)
1 .. http:post:: [/instances/$INSTANCE]/private/accept-tos-early 2 3 Record that the user has accepted a specific version of the 4 terms of service of an exchange ahead of the regular KYC flow. 5 The merchant backend persists this information so that 6 ``GET /private/kyc`` can report it back via the 7 ``tos_accepted_early`` field of `MerchantAccountKycRedirect`. 8 9 This is intended for deployments where the exchange has set 10 ``kyc_swap_tos_acceptance`` in its ``/keys`` response, meaning 11 the frontend swaps the terms-of-service and KYC auth 12 authentication steps in the user experience. 13 14 Introduced in **v31**. 15 16 **Required permission:** ``accounts-write`` 17 18 **Request:** 19 20 The request body is a `TosAcceptedEarlyRequest`. 21 22 **Response:** 23 24 :http:statuscode:`204 No content`: 25 The acceptance has been recorded. 26 :http:statuscode:`400 Bad Request`: 27 The request body is malformed. 28 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 29 :http:statuscode:`401 Unauthorized`: 30 The request is unauthorized. 31 Returned with ``TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED``. 32 :http:statuscode:`404 Not found`: 33 The instance is unknown to the backend. 34 Returned with ``TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN``. 35 :http:statuscode:`500 Internal Server Error`: 36 The server experienced an internal failure. 37 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 38 39 **Details:** 40 41 .. ts:def:: TosAcceptedEarlyRequest 42 43 interface TosAcceptedEarlyRequest { 44 45 // Base URL of the exchange for which the user has 46 // accepted the terms of service. 47 exchange_url: string; 48 49 // ``Taler-Terms-Version`` (see the exchange's 50 // ``/terms`` endpoint) of the terms of service 51 // that the user has accepted. 52 tos_version: string; 53 54 }