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.

GET/recharge_history

Description: Fetches recharge transaction history.

Query Parameters

You must pass exactly one of the following parameters:

ParameterTypeDescription
mobileStringThe mobile number of the customer (e.g., 7086303816). Returns the last 5 recharge history records.
order_idStringThe specific order ID to look up (e.g., 346734768234782). Returns the full details for this single order.

Example Requests

// Get last 5 recharges by mobile number
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.

GET/payment_history

Description: Fetches payment transaction history.

Query Parameters

You must pass exactly one of the following parameters:

ParameterTypeDescription
mobileStringThe mobile number of the customer (e.g., 7086303816). Returns the last 5 payment history records.
order_idStringThe specific payment order ID to look up (e.g., 346734768234782). Returns the full details for this single payment.

Example Requests

// Get last 5 payments by mobile number
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.