Start
Authentication
Separate credentials for your server, checkout SDK, and webhooks.
Zippy Pay uses four distinct credential types. Each is scoped to a specific surface — never mix them across server, browser, and webhook handlers.
Credential overview
Four credentials, four surfaces
| Name | Type | Description |
|---|---|---|
Business API key | zp_live_… | Server-only. Create sessions, poll status, and reconcile by sessionId or merchantReference. |
Client token | zps_… | Browser-safe. Returned when creating a session; passed to @zippypay/checkout. |
Webhook signing secret | whsec_… | Server-only. Verifies X-Zippy-Signature on inbound webhook POSTs. |
Session identifier | UUID | Public session reference (sessionId). Safe to pass to the SDK with the client token. |
Business API key
Keys contain the zp_live_ prefix followed by a secret value. The plaintext key is shown once when created in the portal. Send it only from trusted backend infrastructure.
Header
httpX-Api-Key: zp_live_REDACTEDMerchant key errors
| Name | Type | Description |
|---|---|---|
api-key.invalid | 401 | Missing, malformed, or unmatched key. |
api-key.revoked | 401 | Key revoked in the portal. |
api-key.expired | 401 | Key expiry date is in the past. |
Payment session token
When you create a payment session, the response includes a clientToken prefixed with zps_. Pass it to the Checkout SDK together with sessionId. It authorizes checkout for that session only and expires with the session.
Client token (example)
textzps_REDACTEDWebhook signing secret
When you register a webhook endpoint, Zippy shows a signing secret once, prefixed with whsec_. Use it to verify X-Zippy-Signature over the exact raw request body.
Webhook secret (example)
textwhsec_example_secret_for_documentation_onlySee Verify webhook signatures for language examples and the verification playground.
Correlation IDs
Send an optional X-Correlation-Id on create session requests to connect your logs with Zippy request logs. If omitted, Zippy generates a UUID. The effective correlation ID is returned in the response header and included in Problem Details responses.
Optional request header
httpX-Correlation-Id: merchant-request-123Idempotency
Send Idempotency-Key on every POST /api/v1/payment-sessions request. Use one UUID v4 per logical checkout attempt and keep it unchanged when retrying the same payload.
Idempotency header
httpIdempotency-Key: 83596f5e-2134-4e66-8304-20d61f290cf0Problem Details
Errors use application/problem+json. Branch on the stable code field and retain correlationId when contacting support.
Problem Details response
json{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "API key is missing or invalid",
"instance": "/api/v1/payment-sessions",
"code": "api-key.invalid",
"correlationId": "c7ccb49d-e6bb-45f7-b834-93c4521a6857"
}Security practices
- Store
zp_live_andwhsec_values in a secrets manager or encrypted environment configuration. - Send merchant-server requests only over HTTPS.
- Pass only
sessionIdandzps_client tokens to browser code. - Use a separate API key per environment and revoke keys that may be compromised.
Common failures
- Sending
zp_live_from the Checkout SDK or a mobile app. - Using
zps_asX-Api-Keyon merchant-server routes. - Verifying webhooks with the API key instead of
whsec_. - Omitting
Idempotency-Keyand creating duplicate sessions on network retries.