Skip to main content

User Financial Profile

This section contains the endpoints adapted to manage and retrieve the driver's information required exclusively for payment processing, billing, and cross-auditing.


Auto-provisioning (Lazy Sync)

The financial microservice (NestJS) operates semi-autonomously and decentralized from the legacy Laravel system.

When a user interacts with the financial module for the first time, the API validates the JWT token with the central system and executes an Automatic Synchronized Registration (registerUserLocally). This ensures that the payment database (PostgreSQL) keeps an updated copy of the customer lazily (Lazy), without requiring heavy mass data migration routines.


Get Current Financial Profile

Retrieves the financial data, billing address, and external identifiers (e.g., pagarmeId) of the authenticated driver. This route is triggered by the Mobile App before starting the recharge flow.

Method: GET
Route: /users/me
Authentication: Required (Bearer JWT)

Success Response (200 OK)

The response includes vital data for submitting anti-fraud charges and linking the customer to the payment gateway.

{
"id": 123,
"althergoId": 4567,
"pagarmeId": "cus_000000000",
"email": "driver@company.com",
"phone": "5511999999999",
"meta": {
"document": "12345678900",
"documentType": "cpf",
"addresses": [
{
"zip_code": "01000-000",
"country": "BR",
"state": "SP",
"city": "São Paulo",
"line_1": "Av. Paulista 1000 São Paulo BR"
}
]
}
}