Skip to content

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

  1. Postman → ImportLink.
  2. Paste:
    • Sandbox: https://api.sandbox.paylera.io/openapi/v1.json
    • Live: https://api.paylera.io/openapi/v1.json
  3. 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:

VariableSandboxLive
BASE_URLhttps://api.sandbox.paylera.iohttps://api.paylera.io
PAYLERA_KEYsk_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

  1. Application → ImportFrom URL.
  2. Paste the OpenAPI URL.
  3. 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:

Terminal window
bru import openapi --output ./paylera-collection openapi.json

Same 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:

Terminal window
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:

Terminal window
paylera api get /v1/customers
paylera api post /v1/customers --data @body.json
paylera api list /v1/subscriptions --status active

Helpful when you want shell loops with auto-pagination and no collection setup.