Skip to main content
The YuvexPay API is organized around REST. It accepts JSON request bodies, returns JSON responses, and uses standard HTTP status codes and verbs.

Base URL

https://api.yuvexpay.com
All API requests must be made over HTTPS. The same URL serves both sandbox and production — the environment is determined by which API key you send. Sandbox keys are prefixed with ypk_test_, production keys with ypk_live_.

Authentication

All /v1/* endpoints authenticate with an API key sent as a Bearer token. Create keys in the dashboard under Settings > API Keys:
Authorization: Bearer ypk_<env>_<kid>_<secret>
See the authentication guide for the full key format, scopes and rotation workflow. To inspect the key being used, call GET /v1/auth/self.

Request headers

HeaderRequiredDescription
AuthorizationYesBearer ypk_<env>_<kid>_<secret> — your API key.
Content-TypeYes (POST/PATCH)application/json
X-Idempotency-KeyYes (write POST)Unique key for safe retries. See idempotency.

Response envelope

Successful responses are JSON objects keyed by the resource ({ "payment": {...} }, { "withdrawal": {...} }, etc.). List responses include a pagination block:
{
  "payments": [ ... ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 137,
    "totalPages": 7
  }
}
Errors follow a consistent envelope. See the errors guide for codes and handling patterns.

Resources

Payments

Create and manage payments via PIX, direct card charges, hosted card checkout, or boleto.

Withdrawals

Transfer BRL funds from your balance via PIX.

Products

Manage your product catalog.

Customers

Store and manage customer records.

Documents

Generate receipts and account statements.

Balance

Read the company’s available, frozen, held, and total balance.

Authentication

Inspect the API key currently in use.