# Merchant

Merchant endpoints for payment methods and exchange currencies

## Create public access token

 - [POST /public_token/create](https://docs.chicksx.com/apis/sdk-authentication/createpublictoken.md): Creates a public access token for SDK authentication. This endpoint must be called from your secure backend server using your merchant credentials.

The returned access token can be safely used in client-side applications to authenticate with the ChicksX SDK.

Session and order correlation: A sessionId is required and ties each public token to exactly one order. Once an order has been placed, the session expires and cannot be reused. If a user attempts to place another order within the same session, they will see a message indicating the session has expired and must restart the checkout process from your platform.

Security: Never expose your x-api-key or x-client-id in client-side code.

## Create public access token

 - [POST /public_token/create](https://docs.chicksx.com/apis/merchant/createpublictoken.md): Creates a public access token for SDK authentication. This endpoint must be called from your secure backend server using your merchant credentials.

The returned access token can be safely used in client-side applications to authenticate with the ChicksX SDK.

Session and order correlation: A sessionId is required and ties each public token to exactly one order. Once an order has been placed, the session expires and cannot be reused. If a user attempts to place another order within the same session, they will see a message indicating the session has expired and must restart the checkout process from your platform.

Security: Never expose your x-api-key or x-client-id in client-side code.

## Get payment methods

 - [GET /payment-methods](https://docs.chicksx.com/apis/merchant/getpaymentmethods.md): Returns the list of payment methods available for the given operation type and country. Requires merchant authentication (x-api-key, x-client-id).

## Get exchange currencies

 - [GET /exchange/currencies](https://docs.chicksx.com/apis/merchant/getexchangecurrencies.md): Returns receive (crypto) and spend (fiat) currencies available for exchange. Requires merchant authentication (x-api-key, x-client-id).

## Calculate exchange quote

 - [POST /exchange/quotes](https://docs.chicksx.com/apis/merchant/calculateexchangequote.md): Calculates an exchange quote for a given operation, currencies, amount and payment method. Requires merchant authentication (x-api-key, x-client-id).

