Skip to main content
All server-side requests to Paymnt Cloud use API keys. Send your secret key in the api-key header. If you use routing profiles, include x-profile-id.
  • Production: https://api.paymnt.cloud
  • Sandbox: https://sandbox.paymnt.cloud
Never expose secret keys in browsers or mobile apps. Keep keys in your server environment variables or your secret manager.

Headers

  • api-key — required for all authenticated calls
  • x-profile-id — lets you target a specific routing/profile configuration
  • Idempotency-Key — prevents duplicate processing on retries for mutating requests
See also: ProfilesIdempotency

Key scope & environments

  • Keys are environment-scoped. Create separate keys for Sandbox and Production
  • Rotate keys periodically; remove old keys from all deployments
  • Limit who can view/rotate keys via RBAC. See RBAC & Keys
  • For local dev and CI/CD, load keys via environment variables. See Environments

Using the API Reference (Try it)

In the API reference tab, open any endpoint and use Try it. Enter your api-key (and x-profile-id if used) once; it will be applied to subsequent requests. If your OpenAPI lists both servers, you can switch between Sandbox and Production from the server selector. Browser-based calls originate from your docs domain (e.g., https://docs.paymnt.cloud). Ensure CORS allows that origin only if you plan to call your API from the docs.

Examples

cURL — list customers

cURL — create payment (with idempotency)

Node (fetch)

Python (requests)


Errors

  • 401 Unauthorized — missing/invalid api-key
  • 403 Forbidden — the key is valid but not permitted for the action/profile
Log the request_id from error bodies for support and correlation. See Error Codes.

Good practices

  • Keep keys server-only; never hardcode them in client apps
  • Use idempotency for all mutating requests; implement retry with jitter for transient failures
  • Store keys in a secret manager; rotate on a schedule; monitor usage
  • Separate Sandbox vs Production keys and configs; do not reuse across environments. See Environments