AI Agent Setup URL Guide
This documentation outlines the API endpoints that your custom AI Agent can call to retrieve user context, order details, and historical data. Integrate these endpoints into your AI workflows (like n8n, Make.com, or OpenAI Functions) to give your agent real-time access to user data.
1. Recharge History
Retrieve historical recharge records for a specific user, or look up the exact details of a single recharge order.
Description: Fetches recharge transaction history.
Query Parameters
You must pass exactly one of the following parameters:
| Parameter | Type | Description |
|---|---|---|
mobile | String | The mobile number of the customer (e.g., 7086303816). Returns the last 5 recharge history records. |
order_id | String | The specific order ID to look up (e.g., 346734768234782). Returns the full details for this single order. |
Example Requests
GET https://your-domain.com/api/recharge_history?mobile=7086303816
// Get specific order details
GET https://your-domain.com/api/recharge_history?order_id=346734768234782
2. Payment History
Retrieve historical payment records for a specific user, or look up the exact status of a single payment.
Description: Fetches payment transaction history.
Query Parameters
You must pass exactly one of the following parameters:
| Parameter | Type | Description |
|---|---|---|
mobile | String | The mobile number of the customer (e.g., 7086303816). Returns the last 5 payment history records. |
order_id | String | The specific payment order ID to look up (e.g., 346734768234782). Returns the full details for this single payment. |
Example Requests
GET https://your-domain.com/api/payment_history?mobile=7086303816
// Get specific payment details
GET https://your-domain.com/api/payment_history?order_id=346734768234782
Implementation Note for AI Workflows
When configuring your agent in n8n or Make, use an HTTP Request node pointing to these URLs. Ensure that your AI prompt gives the agent strict instructions to extract the mobile or order_id from the user's chat message before calling these endpoints.