Postman & Insomnia
The OpenAPI 3.1 document loads cleanly into Postman, Insomnia, Bruno, and every other modern REST client. Use it for ad-hoc exploration, support escalations, or building one-off operational scripts.
Postman
Import
- Postman → Import → Link.
- Paste:
- Sandbox:
https://api.sandbox.paylera.io/openapi/v1.json - Live:
https://api.paylera.io/openapi/v1.json
- Sandbox:
- Postman creates a collection mirroring the API surface.
Auth
Set a collection-level variable PAYLERA_KEY. Under
Authorization, set type Bearer Token and value
{{PAYLERA_KEY}}.
Environments
Create two environments:
| Variable | Sandbox | Live |
|---|---|---|
BASE_URL | https://api.sandbox.paylera.io | https://api.paylera.io |
PAYLERA_KEY | sk_sandbox_… | sk_live_… |
Switch with the environment picker.
Idempotency keys in Postman
Add a pre-request script to the collection:
if (["POST", "PATCH"].includes(pm.request.method)) { if (!pm.request.headers.has("Idempotency-Key")) { pm.request.headers.add({ key: "Idempotency-Key", value: pm.variables.replaceIn("{{$guid}}"), }); }}That generates a fresh key per request unless you’ve set one explicitly. Add the same to your Insomnia chain via a custom plugin.
Insomnia
- Application → Import → From URL.
- Paste the OpenAPI URL.
- Insomnia creates a workspace.
For auth, set a base environment with PAYLERA_KEY, then a sub-env
with BASE_URL. The auth field on requests is auto-populated from the
OpenAPI security scheme.
Bruno
Bruno’s OpenAPI import:
bru import openapi --output ./paylera-collection openapi.jsonSame shape. Bruno saves collections as flat JSON on disk, which makes versioning and code-review pleasant.
Curl
For quick checks, copy the curl from any tool’s “view code” panel. A template:
curl https://api.sandbox.paylera.io/v1/customers \ -H "Authorization: Bearer $PAYLERA_KEY" \ -H "Paylera-Version: 2026-04-01" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "email": "ada@example.com", "name": "Ada Lovelace" }'CLI
The paylera CLI also accepts ad-hoc REST:
paylera api get /v1/customerspaylera api post /v1/customers --data @body.jsonpaylera api list /v1/subscriptions --status activeHelpful when you want shell loops with auto-pagination and no collection setup.