Documentation and API Reference

Integrate payments quickly and securely with LB Pay's RESTful API. Everything you need to build robust financial solutions.

Features

Everything you need to integrate payments

Our API was designed for developers, with a focus on simplicity, security, and scalability.

High Performance

Average latency of 45ms. Optimized infrastructure to process thousands of transactions per second.

PCI-DSS Security

PCI-DSS Level 1 certification. End-to-end encryption and sensitive data tokenization.

RESTful API

Well-documented endpoints, standardized JSON responses, and semantic versioning.

OAuth 2.0 + DPoP

Key-pair authentication with short-lived tokens and a signed proof for every request.

Real-time Webhooks

Receive instant notifications about status changes in payments and transactions.

Idempotency

All requests support idempotency keys to ensure data consistency.

Authentication

Key-pair authentication with DPoP

Keep the private key in your infrastructure. Use it to sign the token request and a fresh DPoP proof for every API call.

1

Register your public key

Generate an EC P-256 key pair and register only the public key in the Customer Portal.

2

Request the token

Sign a client_assertion with ES256 and send it to /v2/oauth/token with a DPoP proof.

3

Sign every API call

Send Authorization: DPoP <token> and a new request-bound DPoP proof.

autenticacao.sh
# 1. Request access token
curl -X POST \
  https://api-secure.lbpay.com.br/v2/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "DPoP: <signed-proof>" \
  --data-urlencode "client_id=<client-id>" \
  --data-urlencode "grant_type=client_credentials" \
  --data-urlencode "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
  --data-urlencode "client_assertion=<signed-jwt>"

# 2. Response
  {
  "access_token": "eyJhbGciOi...",
  "token_type": "DPoP",
  "expires_in": 60
}