Skip to main content
POST
/
api
/
v1
/
api-keys
Create new API key
curl --request POST \
  --url https://api-beta.pepay.io/api/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production API Key",
  "scope": "merchant",
  "expires_at": "2025-12-31T23:59:59Z"
}
'
{
  "key_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Production API Key",
  "scope": "merchant",
  "api_key": "pk_live_dj2hd8j29dx8h2j9xd82h9x2",
  "expires_at": "2025-12-31T23:59:59Z"
}

Authorizations

Authorization
string
header
required

JWT token for wallet authentication

Body

application/json
name
string
required

Human-readable name for the API key

Required string length: 1 - 255
Example:

"Production API Key"

scope
enum<string>
required

Scope for this API key.

Available options:
merchant,
commerce
expires_at
string<date-time>

Optional expiration date (UTC). If not provided, key never expires.

Example:

"2025-12-31T23:59:59Z"

Response

API key created successfully

key_id
string<uuid>
Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
Example:

"Production API Key"

scope
enum<string>
Available options:
merchant,
commerce
api_key
string
Example:

"pk_live_dj2hd8j29dx8h2j9xd82h9x2"

expires_at
string<date-time>
Example:

"2025-12-31T23:59:59Z"