Features
Our API was designed for developers, with a focus on simplicity, security, and scalability.
Average latency of 45ms. Optimized infrastructure to process thousands of transactions per second.
PCI-DSS Level 1 certification. End-to-end encryption and sensitive data tokenization.
Well-documented endpoints, standardized JSON responses, and semantic versioning.
Key-pair authentication with short-lived tokens and a signed proof for every request.
Receive instant notifications about status changes in payments and transactions.
All requests support idempotency keys to ensure data consistency.
Authentication
Keep the private key in your infrastructure. Use it to sign the token request and a fresh DPoP proof for every API call.
Generate an EC P-256 key pair and register only the public key in the Customer Portal.
Sign a client_assertion with ES256 and send it to /v2/oauth/token with a DPoP proof.
Send Authorization: DPoP <token> and a new request-bound DPoP proof.
# 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
}