Introduction
The Real-time Settlement feature establishes a direct payment channel between your agents in the field and your central system. As agents are equipped with Flouci, this system allows them to send money to you and instantly have their balance reflected in real-time. This solution is designed to:- Reduce Risk: Block agents who have accumulated a high cash balance.
- Optimize Resources: Facilitate seamless reconciliation between your accounts and your agents’ balances.
check
endpoint to validate an agent’s status and a confirm
endpoint to log the payment details in your system.
Authentication
To secure the communication between Flouci and your system, you will need to provide a JWT token. This token must be included in theAuthorization
header of every API request. These tokens will need to be renewed periodically.
Your JWT token for authenticating the request. Format:
Bearer {JWT_TOKEN}
Check Agent Endpoint
This endpoint is used to check if an agent has a valid ID and to retrieve their current due amount before a payment is initiated. The agent ID can be any easily identifiable string, such as a phone number, a national ID number, or a custom alphanumeric code.Path Parameters
The unique identifier for the agent.
Response Body
Indicates the status of the agent ID.
"0"
: Valid agent ID."1"
: Invalid agent ID.
The agent’s full name. This will be an empty string if the agent ID is invalid.
The total amount due from the agent, in millimes. The agent can choose to pay this amount or a different one.
HTTP Status Codes
200 OK
: Request was successful.403 Forbidden
: Unauthorized request (e.g., invalid JWT token).
Confirm Payment Endpoint
This endpoint is called to confirm that the payment details were successfully received and stored by your system after the agent completes a transaction.Request Body
The unique ID for the Flouci transaction.
The unique identifier for the agent who made the payment.
The amount paid by the agent, in millimes.
Response Body
Indicates the status of the confirmation.
"0"
: Transaction successfully stored."1"
: Invalid agent ID."2"
: Invalid amount."3"
: Invalid transaction (e.g., transaction ID already registered).
HTTP Status Codes
200 OK
: Request was successful.403 Forbidden
: Unauthorized request (e.g., invalid JWT token).