Create API credentials

Creates new API credentials for a merchant with the following validations:

  1. Organization Validation:

    • Organization must exist
    • User must have access to the organization
  2. Merchant Validation:

    • Merchant must exist
    • Merchant must belong to the specified organization
    • User must have the required permissions for the merchant
  3. Role Assignment (required):

    • At least one role must be provided
    • Roles will be assigned to the API credentials for the merchant
    • Roles must be valid merchant roles (not organization roles)
    • Invalid or missing roles will result in a 400 error
  4. Permission Requirements:

    • User must have MERCHANT_DEV_SETTINGS_CREATE_API_KEY permission

Path parameters

organizationIdstringRequired
Organization ID
merchantIdstringRequired
Merchant ID

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

API credentials information to create
namestringRequired
Descriptive name to identify the purpose of the API credentials
roleslist of stringsRequired
Array of role IDs or names to assign to the API credentials for the merchant. Must contain at least 1 role.

Response

API credentials created successfully
apiKeystring
Generated API Key for the merchant
secretstring
Generated Secret for the merchant

Errors