Getting Started
Introduction
Environments, API keys and request signing.
FlazzPay's merchant API is a server-to-server JSON API.
Environments
| Environment | Base URL | API key prefix |
|---|---|---|
| Live | https://api.flazzpay.com | fp_live_ |
| Sandbox | https://api-sandbox.flazzpay.com | fp_sandbox_ |
A key works only on its own host. The sandbox never moves money.
Signing requests
Every request under /v1, reads included, carries the API key and a signature:
Authorization: Bearer <api_key>
X-Timestamp: <unix seconds>
X-Signature: hex(HMAC_SHA256(secret_key, X-Timestamp + "\n" + METHOD + "\n" + path_with_query + "\n" + hex(SHA256(raw_body))))
The timestamp must be within five minutes of FlazzPay's clock. An empty body signs as the SHA-256 of an empty string.
