SavaPay Developers

Authentication

Protect API keys, use the smallest required permissions, and make repeated requests safe.

BuildNode.js and ExpressApproved merchant pilot
Browse developer documentationAuthentication

Your API key tells SavaPay which merchant account is making a request. Treat it like a password.

Use your key on the server only

Send your key from your server using the Authorization header or X-API-Key header. Never include it in browser JavaScript or a mobile app.

http
Authorization: Bearer sp_live_...
# or equivalently:
X-API-Key: sp_live_...

You only see a new key once

When SavaPay creates an API key, copy it and store it in a secure environment variable immediately. SavaPay stores only a protected version, so it cannot show the key again.

Use the smallest permission needed

  • Scoped: keys carry specific scopes, such as webhooks:write. A webhook-management key should not automatically access unrelated actions.
  • Revocable: revoke an exposed or unused key with DELETE /v1/api-keys/{keyHash}.
  • Never administrator: merchant keys never grant administrator access. Administrator endpoints require SavaPay administrator authentication.

Avoid duplicate actions

Add an Idempotency-Key header whenever a request changes data. Retrying the same request will not accidentally charge, refund, or create something twice.

http
Idempotency-Key: checkout-order-123

Getting ready to accept payments

  1. Create your merchant account with POST /v1/merchants. It is public and returns your first API key once.
json
{
  "merchant": { "id": "m_1abc", "businessName": "Acme", "status": "pending" },
  "apiKey": "sp_live_..."
}
  1. Submit the required business information and documents through POST /v1/merchants/{id}/kyc and the document upload endpoint.
  2. Wait for SavaPay to approve the account.
  3. Confirm that your merchant status is active.
  4. Start accepting production payments.

Key management

Issue additional scoped keys with POST /v1/api-keys and revoke them with DELETE /v1/api-keys/{keyHash}.

Maintained bySecurity and Payments Engineering

Last reviewed

Was this page helpful?