KulPayAPI Live

API reference

Diagnostics

GET /me

What am I authenticated as?

Describes the calling key: its id, label, mode, the account it acts for, and its scopes. Requires NO scope โ€” a key may always describe itself, and gating this would mean the key most likely to be misconfigured is the one that cannot find out why.

Call this first when something returns 401 or 403. It distinguishes the three causes that otherwise look identical: a key that was never sent, a key in the wrong mode (charges succeed, the dashboard you are watching stays empty), and a key acting for a different account than you expect.

Never returns the secret.

Responses

  • 200 The calling identity. Also returned, with authenticated: false, when the gateway has no key registry.
  • 401 No bearer token, or one the registry does not hold. unauthorized

Request

curl -X GET "$KULPAY_URL/me" \
  -H "Authorization: Bearer $KULPAY_KEY"
200 Response application/json
{
  "account_id": "OcThktmhLjl2JAewdDBNXh2u0lT",
  "account_name": "KulPay Local",
  "account_status": "active",
  "authenticated": true,
  "key_id": "535163a20e6ce0cae10b379d29134a7f",
  "label": "local merchant test key",
  "mode": "test",
  "note": "Test mode: real provider calls where the provider has a sandbox, but no money moves. A test key can never read or write live data.",
  "rate_per_minute": 6000,
  "scopes": [
    "payments:read",
    "payments:write"
  ]
}
401 Error ยท unauthorized application/problem+json
{
  "code": "unauthorized",
  "detail": "missing bearer token",
  "error": {
    "code": "unauthorized",
    "message": "missing bearer token"
  },
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}