Skip to main content
Version: Lastest

API Get Package List by Phone Number

API Get Package List by Phone Number

Chat with AI▼
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

Language: en | vi

{
"X-APPOTAPAY-AUTH": Bearer JWT_TOKEN,
"Content-Type": "application/json",
"Language": LANGUAGE
}

Params​

ParamsRequiredTypeDescription
phone_number√StringPhone number to top up (format: 09x, 08x,..)
telco_service_type√StringService type

prepaid: Mobile topup prepaid

postpaid: Mobile topup postpaid

valueStringPackage value (e.g., 10000, 20000, 30000, ..)

Data result​

ParamsTypeDescription
errorCodeIntegerError code result
messageStringDescription error code detail
dataArrayList of package objects
*.productCodeStringProduct code
*.amountIntegerPackage price
*.typeStringPackage type (data)
*.telcoStringTelco name
*.descriptionStringDescription 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"
}

Code Examples​

curl --location 'https://gateway.dev.appotapay.com/api/v1/service/topup/0912345678/products?telco_service_type=prepaid' \
--header 'X-APPOTAPAY-AUTH: JWT_TOKEN' \
--header 'Content-Type: application/json'

Request​

REQUEST

Development server