StarPay SGH

Authentication

The StarPay SGH API uses your Secret Key to authenticate every request. Include it as a Bearer token in the Authorization header.

Authorization: Bearer sk_test_xxxxxxxxxxxxxxxx

Your keys

KeyPrefixWhere it's used
Secret Keysk_test_Server-side API calls (this is the one you authenticate with)
Public Keypk_test_Reserved for future client-side use — not required for current endpoints
Webhook Secretwhsec_Verifying webhook signatures — see Webhooks
🔒 Never expose your Secret Key in client-side code, mobile apps, or public repositories. Treat it like a password.

Missing or invalid key

Requests without a valid key return 401 Unauthorized:

{ "message": "Invalid or inactive API key." }

Regenerating keys

You can regenerate your keys anytime from your dashboard. This immediately invalidates the old Secret Key and Webhook Secret — update your integration before regenerating in production.