Contents

POST [/instances/$INSTANCE]/private/accept-tos-early#

Record that the user has accepted a specific version of the terms of service of an exchange ahead of the regular KYC flow. The merchant backend persists this information so that GET /private/kyc can report it back via the tos_accepted_early field of MerchantAccountKycRedirect.

This is intended for deployments where the exchange has set kyc_swap_tos_acceptance in its /keys response, meaning the frontend swaps the terms-of-service and KYC auth authentication steps in the user experience.

Introduced in v31.

Required permission: accounts-write

Request:

The request body is a TosAcceptedEarlyRequest.

Response:

204 No content:

The acceptance has been recorded.

400 Bad Request:

The request body is malformed. Returned with TALER_EC_GENERIC_PARAMETER_MALFORMED.

401 Unauthorized:

The request is unauthorized. Returned with TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED.

404 Not found:

The instance is unknown to the backend. Returned with TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN.

500 Internal Server Error:

The server experienced an internal failure. Returned with TALER_EC_GENERIC_DB_STORE_FAILED.

Details:

interface TosAcceptedEarlyRequest {

  // Base URL of the exchange for which the user has
  // accepted the terms of service.
  exchange_url: string;

  // Taler-Terms-Version (see the exchange's
  // /terms endpoint) of the terms of service
  // that the user has accepted.
  tos_version: string;

}