paytrack docs
Getting started
Create a test key, make your first request, inspect logs, and move safely to live mode.
Quickstart
- 1. Create a paytrack account and finish workspace setup.
- 2. Open the Developer section from the app sidebar.
- 3. Create a test API key with the smallest scopes you need.
- 4. Copy the key securely. paytrack shows raw keys only once.
- 5. Make your first request to the versioned API.
- 6. View request logs and request IDs in Developer Logs.
- 7. When your integration is verified, create a live key and rotate secrets into production.
Base URL
All public API routes are versioned under
https://paytrack.ng/api/v1.cURL
Example
curl https://paytrack.ng/api/v1/account \ -H "Authorization: Bearer ptrk_test_xxx"
JavaScript fetch
Example
const response = await fetch("https://paytrack.ng/api/v1/account", {
headers: {
Authorization: `Bearer ${process.env.PAYTRACK_API_KEY}`,
},
});
const data = await response.json();SDK
Example
import { PaytrackClient } from "@paytrack/sdk";
const paytrack = new PaytrackClient({
apiKey: process.env.PAYTRACK_API_KEY,
});
const account = await paytrack.account.retrieve();