API Get Package List by Phone Number
WARNING
This API is only for checking mobile data packages.
Endpoint: /api/v1/service/topup/{phone_number}/products
Method: GET
Header: How to generate JWT_TOKEN
{
"X-APPOTAPAY-AUTH": Bearer JWT_TOKEN,
"Content-Type": "application/json"
}
Params
| Params | Required | Type | Description |
|---|---|---|---|
| phone_number | √ | String | Phone number to top up (format: 09x, 08x,..) |
| telco_service_type | √ | String | Service type prepaid: Mobile topup prepaid postpaid: Mobile topup postpaid |
| value | String | Package value (e.g., 10000, 20000, 30000, ..) |
Data result
| Params | Type | Description |
|---|---|---|
| errorCode | Integer | Error code result |
| message | String | Description error code detail |
| data | Array | List of package objects |
| *.productCode | String | Product code |
| *.amount | Integer | Package price |
| *.type | String | Package type (data) |
| *.telco | String | Telco name |
| *.description | String | Description detail of package |
Example
Request
{
"telco_service_type": "prepaid"
}
Response
Success
{
"errorCode": 0,
"message": "Success",
"data": [
{
"productCode": "D24",
"amount": 20000,
"type": "topup_data",
"telco": "mobifone_data",
"description": "- Tổng lưu lượng data của gói là 24GB\n- Thời hạn áp dụng của gói là 24 giờ"
},
{
"productCode": "7ED_DC",
"amount": 70000,
"type": "topup_data",
"telco": "mobifone_data",
"description": "- Tổng lưu lượng data của gói là 56GB\n- Thời hạn áp dụng của gói là 7 ngày"
}
]
}
Error
{
"errorCode": 91,
"message": "The system is busy, please try again later"
}