The user authentication in all the flows related to the billing API is handled by the client backend app in same way in Authentication and Plans.
Entitlement Usage Flow
1
Client UI Initiates Action
The client UI sends a request to the client backend for an action, such as downloading a resource.
2
Client Backend Checks Entitlement
The client backend calls the Billing API endpoint
/api/v1/entitlements/status to check if the user is allowed to perform the action.3
Billing API Responds
If the user is not entitled, the Billing API returns an error. The client backend should handle this error appropriately.
If the user is entitled, the Billing API returns a success response.
4
Client Backend Processes Action
If entitled, the client backend can perform the action or forward the success response to the client UI.
5
Report Usage
The action execution is reported to the Billing API using the
/api/v1/entitlements/usage endpoint.