quickstart
Access to our APIs is managed through the Customer Portal.
1. Access & Credentialsβ
- Access: Log in to the portal and navigate to the Integrations section.
- Generation: Click "New Credentials" to get your
client_idandclient_secret. - Security: Important! Store your
client_secretin a secure location. It will be partially hidden after you close the generation modal.
2. Authentication (OAuth 2.0)β
curl --request POST \
--url 'https://api.sdb.lbpay.com.br/v1/oauth2/token' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--form client_id=YOUR_CLIENT_ID \
--form grant_type=client_credentials \
--form client_secret=YOUR_CLIENT_SECRET
3. Webhook Configurationβ
To receive notifications (e.g., PIX received or boleto paid), you must register a webhook URL:
- Call the endpoint
PUT /v1/webhook/{pixKey} - Provide the URL of your server that will receive
POSTnotifications - Once registered, events will be sent automatically to your environment
4. Sandbox Environmentβ
Before going to production, use our Sandbox environment. It simulates real API behavior with fictitious data.
- Sandbox Endpoint:
https://api.sdb.lbpay.com.br - HTTPS Required: All requests must use TLS encryption
5. Best Practicesβ
- Never expose your
client_secretin frontend code - Rotate credentials periodically
- Use environment variables to store sensitive data
- Validate webhook signatures (if applicable)
- Implement retry logic for webhook processing