Skip to content

Creates a merchant API key

Request

POST {{baseURL}}/pay-api/v1/merchants/tokens

This endpoint creates an API key for a merchant managed by their partner account.

Provide the Merchant ID and a API key name to generate a client Id and client secret for the merchant.

Use the returned credentials to authenticate as the merchant for API operations.

This endpoint requires the API token to be from a partner API key. API tokens generated from a merchant key are not accepted.

See Also:
To list merchants, see GET /pay-api/v1/merchants.
To list merchant API keys, see GET /pay-api/v1/merchants/tokens.
To revoke a merchant API key, see DELETE /pay-api/v1/merchants/tokens/{clientId}.

Security
Bearer
Bodyapplication/json
merchantIdstring, (uuid)required

Specifies the identifier of the merchant.

Example: 46063d32-10fa-44cb-b118-20ddd085ce3f

Example:"46063d32-10fa-44cb-b118-20ddd085ce3f"
tokenNamestring, non-emptyrequired

A free-formed descriptive name for the API key.

Example: Peppared Street Cafe's API Key

Example:"Peppared Street Cafe's API Key"
curl -i -X POST \
  https://developer.flute.com/_mock/api-reference/pay-api/v1/merchants/tokens \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "merchantId": "46063d32-10fa-44cb-b118-20ddd085ce3f",
    "tokenName": "Peppared Street Cafe'\''s API Key"
  }'

Responses

OK

Bodyapplication/json
clientIdstring, (uuid)

Identifies the clientId associated with the API key.

See clientSecret for the client secret.

Example: 3b87fab4-5be4-44d3-9070-5f6ec1dfcbf5

Example:"3b87fab4-5be4-44d3-9070-5f6ec1dfcbf5"
clientSecretstring or null

Identifies the client secret associated with the API key.

This value is only shown once at the time of creation. Be sure to store it securely, as it cannot be retrieved again later.

See clientId for the client identifier.

Response
{ "clientId": "3b87fab4-5be4-44d3-9070-5f6ec1dfcbf5", "clientSecret": "string" }