Getting started
Postman
Open Postman and start testing in under a minute — no copy-pasting curl commands.
We publish a ready-made Postman collection with every endpoint pre-configured, plus two environments (sandbox and production). Import them, paste your API key, and you're firing real requests against the API in seconds — no tedious header setup.
Downloads
Collection
All endpoints with sample bodies, idempotency-key auto-generation, and inline docs.
key2pay-postman-collection.json →
Sandbox env
Pre-set baseUrl for sandbox. Drop in your sk_test_… key.
key2pay-postman-environment-sandbox.json →
Production env
Pre-set baseUrl for production. Drop in your sk_live_… key.
key2pay-postman-environment-production.json →
Import & configure
- In Postman, click Import (top-left) and drop the three files above. Postman creates the collection and both environments automatically.
- Pick Key2Pay (Sandbox) from the environment selector (top-right). Click the eye icon next to it, then Edit.
- Paste your
sk_test_…into theapiKeyfield and save. - Open Health & Identity → GET /ping and hit Send. You should see a
200 OKwith"ok": true. - When you're ready for live traffic, swap to Key2Pay (Production), paste your
sk_live_…, and run the same flow.
Postman stores environment values locally. Use the secret field type (already configured) for API keys so they don't appear in screen recordings or shared workspaces.
What's included
- Health & Identity —
GET /ping,GET /me - Checkout sessions — create & retrieve hosted-checkout flows.
- Payments — direct charge, retrieve, list with cursor pagination, refund.
- Catalog — list available payment methods (with icon URLs) and your balance.
- Webhooks — register an endpoint and get a per-endpoint signing secret.
A pre-request script generates a fresh Idempotency-Key on each call so your retries don't double-charge. Override the idempotencyKey environment variable when you intentionally want to replay the same request.