Authentication

Authentication

One bearer key per environment.

HTTP
Authorization: Bearer sk_live_...

Keys#

PrefixEnvironmentlivemode
sk_test_Testfalse
sk_live_Livetrue

Test and live data never mix. Every response carries livemode — check it.

Sandbox#

sk_test_ keys run against payout-partner sandboxes. No real money moves.

  • Same base URL, same endpoints, same responses.
  • Test objects never appear in live, and live objects never appear in test.
  • Going live is a key swap.

Rules#

  • Server-side only. Never ship a key to a browser or mobile app.
  • Store in a secret manager, not source control.
  • Leaked a key? Email hello@withsuperpay.com to rotate it.

Failures#

JSON
{
  "object": "error",
  "errors": [
    { "code": "secret_key_invalid", "message": "Invalid API key.", "metadata": null }
  ],
  "http_status_code": 401
}
CodeHTTPCause
secret_key_invalid401Header missing, malformed, or key unknown
action_unauthorized401 · 403Key is valid but not allowed to do this