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

Import & configure

  1. In Postman, click Import (top-left) and drop the three files above. Postman creates the collection and both environments automatically.
  2. Pick Key2Pay (Sandbox) from the environment selector (top-right). Click the eye icon next to it, then Edit.
  3. Paste your sk_test_… into the apiKey field and save.
  4. Open Health & Identity → GET /ping and hit Send. You should see a 200 OK with "ok": true.
  5. 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 & IdentityGET /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.