Merchant Developer Platform
iDataRiver offers a developer open platform for merchants. With this feature, merchants can carry out custom development on the iDataRiver
platform. This allows them to directly utilize the platform's infrastructure for data
, payments
, security
, risk control
, and more, without needing to implement these themselves.
Features
The Merchant Developer Platform currently includes the following parts:
- Merchant Open API
- Event Callback Notifications
- Custom Customer Service
Webhook
Merchant Open API
Event Callback Notifications
In development...
Custom Customer Service Webhook
Currently, custom customer service is only effective for merchants' custom Telegram bots
.
Use Cases
If a user sends a regular text message to a merchant's custom Telegram bot, the robot will pass the message to the merchant through the API. The merchant will process and reply, and then the robot will send the merchant's reply to the user.
Configuring the Webhook
You need to provide a Webhook API
and configure it in Console
-> Merchant Settings
-> Developer
-> Custom Customer Service Webhook
.
We will send an HTTPS POST
request to this API, containing the user's unique ID and message content, formatted as follows (application/json
):
{
"uid": "202cb962ac59075b964b07152d234b70",
"content": "Hello"
}
uid
User's unique ID, used to differentiate between different users.content
Text message.
When the merchant receives the above request, it need to return a JSON result containing a message
field. We will directly return the content of the message
field to the user, formatted as follows:
{
"message": "Hello! How can I assist you?"
}
message
Reply text content. Please keep it within a reasonable length (e.g., within 1000 characters) to avoid possible reply failures.
Notice
Since we cannot determine the time it takes for the merchant to return, we limit the waiting time to 60 seconds. If the timeout occurs, the user will be informed that the processing has failed.
When a user sends a message, we will immediately reply with a message stating Customer service is processing
to prevent the user from sending repeated messages or closing the interface prematurely.
If you need to use AI models for intelligent responses, you can use our OpenAI Proxy Service.