| Surface | Credential | Used on |
|---|---|---|
| Dashboard | JWT Bearer | /api/platform/* |
| Browser / mobile SDK | pk_live_… | /api/v1/* |
| Your server | sk_live_… | /api/v1/* |
| Hosted pay / public verify | None (rate-limited) | /api/public/gateway/* |
Publishable vs secret keys
Create a key pair on the app (Apps → API keys). Prefer app-scoped keys so the gateway can infer app_id. App-scoped keys can only touch resources for that app.
| pk_live_… (publishable) | sk_live_… (secret) | |
|---|---|---|
| Where it runs | Browser / mobile app | Your backend only |
| Read catalog | Yes | Yes |
| Create + verify checkout | Yes | Yes |
| Read entitlements | Yes | Yes |
| Complete checkout / refund | No | Yes |
| Cancel / resume subscription | Opt-in per app | Yes |
| Customers, keys, webhooks | No | Yes |
bash
# Server-to-server
curl https://api.payproof.et/api/v1/checkouts/ \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: order_42" \
-H "Content-Type: application/json" \
-d '{ "product_id": 1, "customer_ref": "user_42" }'Client cancel/resume is off unless the app enables it, and immediate cancellation always requires a secret key. See Subscriptions for the lifecycle.
Check a key
Call GET /api/v1/me/ to see the key type, its app, and the permission scopes. Both SDKs wrap this as diagnose().
bash
curl https://api.payproof.et/api/v1/me/ \
-H "Authorization: Bearer pk_live_..."
→ {
"key": { "type": "publishable", "app_id": 1, "scopes": ["catalog:read", "..."] },
"app": { "id": 1, "name": "My Shop" },
"company": { "id": 12 },
"api": { "version": "v1", "server_time": "2026-10-23T12:00:00Z" }
}Dashboard login
Telegram OIDC or phone OTP:
bash
POST https://api.payproof.et/api/auth/telegram-login/
{ "id_token": "<OIDC JWT>" }
POST https://api.payproof.et/api/auth/send-otp/ { "phone": "09xxxxxxxx" }
POST https://api.payproof.et/api/auth/verify-otp/ { "phone", "code" }Trailing slashes
API routes accept both forms. Examples use a trailing slash for consistency with the mobile clients.