4. Generate an API key

The API key is used to call payment routes from your server. Start with a test key, then create a live key once your integration is validated.

Generate an API key

POST/auth/keysSession token

Request body
{
  "name": "Mon serveur",
  "environment": "test",
  "expires_at": null
}
Response 201
{
  "success": true,
  "data": {
    "key": "sk_test_<votre-cle>",
    "meta": {
      "id": 1,
      "name": "Mon serveur",
      "environment": "test",
      "is_active": true,
      "last_used_at": null,
      "expires_at": null,
      "created_at": "2026-11-02T08:00:00Z"
    }
  },
  "meta": {
    "request_id": "...",
    "timestamp": "..."
  }
}
CodeWhen
401Missing or expired session token.
422environment other than test or live, missing name.

The key value is only shown here. Copy it immediately.

  • List your keys: GET /auth/keys. Revoke: DELETE /auth/keys/{id}.