Sim TV API¶
Overview¶
The Sim TV API provides functionalities for retrieving user details and processing payments for Sim TV services. It is designed to help you integrate Sim TV functionalities into your application or service. There are two primary endpoints available: one for looking up user details and another for processing payments.
- User Detail API: Retrieve the user's name and due amount.
- Payment API: Process payments for a specified amount.
User Detail API¶
URL:
{{base_url}}/api/lookup/simtv/
Method:
GET
Parameters:
{
"token": "token provided",
"customer_id": "customer_id of user, eg: 1000088047"
}
Success Response:
{
"status": true,
"data": {
"customer_name": "YADAV PRD KHAREL",
"due_amount": "0"
}
}
Unsuccessful Response:
{
"status": false,
"error_code": "4000",
"message": "Can't fulfill request",
"error": "client_error",
"details": "Invalid information",
"error_data": {},
"state": "Error"
}
Payment API¶
URL:
{{base_url}}/api/use/simtv/
Service Parameters:
{
"customer_id": "Customer Id (e.g., 1000159157)",
"token": "",
"reference": "",
"amount": ""
}
Valid Amounts:
[
300, 325, 375, 400, 425, 475, 500, 550, 575, 600, 750, 800, 875, 975, 1000,
1050, 1065, 1125, 1190, 1275, 1425, 1440, 1625, 1875, 1900, 1950, 2000, 2125,
2250, 2375, 2550, 2875, 3250, 3800, 3900, 4250, 4275, 4500, 4750, 5000, 5100,
5175, 5750, 7000, 10000
]
Regex for Customer ID:
{
"name": "Customer ID",
"slug": "",
"pattern": "([0-9]{10,11})",
"error_message": "Invalid customer id"
}
Request:
{
"token": "",
"reference": "",
"amount": "",
"customer_id": ""
}
Success Response:
{
"status": true,
"state": "Success",
"message": "Successfully Completed Transaction",
"extra_data": {},
"detail": "Transaction successful"
}
Unsuccessful Response:
{
"error_code": "1010",
"message": "Validation error",
"status": false,
"error_data": {},
"details": ""
}