Cookbooks and recipes home

Use these quick tutorials to integrate Payabli workflows fast
View as MarkdownOpen in Claude
Applies to:DevelopersPartnersPaypoints

This page contains recipes that are designed to help you use and integrate Payabli. Recipes are short tutorials that cover a workflow. We’ve organized these by Payabli product area.

Browse by product

General recipes

Recipe: Authentication guide

/// Step 1: Provision API credentials

In the Payabli Portal, go to Developers > API Credentials and create an API Authentication credential. You receive a client ID and a client secret, scoped to an environment. Store the secret securely — Payabli shows it only once.

/// Step 2: Get an access token

Exchange your client ID and secret at the token endpoint for a short-lived Bearer access token. The token’s lifetime is returned in the response’s expires_in field (in seconds).

$curl -X POST "https://api-sandbox.payabli.com/api/v2/Token/serverside" \
> -H "Content-Type: application/json" \
> -d '{
> "clientId": "YOUR_CLIENT_ID",
> "clientSecret": "YOUR_CLIENT_SECRET"
> }'

/// Step 3: Add the token to request headers

Send the access token in the Authorization header as a Bearer token. All API requests must be made over HTTPS.

$curl -X POST "https://api.payabli.com/api/ExampleEndpoint/authorize" \
> -H "Content-Type: application/json" \
> -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

/// Step 4: Add idempotency key (recommended)

Include a unique idempotencyKey header to prevent duplicate transactions. This key persists for 2 minutes.

$curl -X POST "https://api.payabli.com/api/ExampleEndpoint/authorize" \
> -H "Content-Type: application/json" \
> -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
> -H "idempotencyKey: unique-request-id-123"

Learn more about credentials, tokens, and idempotency in OAuth authentication and the API overview.