# Get Total Prepaid Fee
This service is used to get the fee amount for a prepaid plan.
# Request Configuration
# Request Endpoint
/api/Activation/GetTotalPrepaid
# Request Method
GET
# Request Headers
Name | Type | Description |
---|---|---|
client | string | Use bID returned from Login |
apitoken | string | Use Token returned from Login |
# Request Parameters:
Name | Type | Description |
---|---|---|
orderSimcard | boolean |
|
PlanId | int | Select the plan that is activation, use planID returned from Get Prepaid Plans |
CountryId | int | Service country ID, must use 42 . |
ProvinceCode | string | Use the Two-Letter Postal Abbreviation for Canadian provinces (opens new window), e.g., BC , QC . |
start | DateTime |
|
promocode | string | Use PromoCode returned from VerifySimcard |
# Request Body
None
# Sample Reqeust
# Sample Request URL
https://phoneboxapi.azurewebsites.net/api/Activation/GetTotalPrepaid?orderSimCard=True&PlanID=6666&CountryId=42&ProvinceCode=BC&start=2025-03-01&promocode=MyPromoCode
# cURL
curl --location --request GET 'https://phoneboxapi.azurewebsites.net/api/Activation/GetTotalPrepaid?orderSimCard=True&PlanID=1679&CountryId=42&ProvinceCode=BC&start=2025-03-01&promocode=MyPromoCode' \
--header 'client: 1234' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
# Python - Requests
import requests
url = "https://phoneboxapi.azurewebsites.net/api/Activation/GetTotalPrepaid"
params = {
'orderSimCard': 'True',
'PlanID': '1679',
'CountryId': '42',
'ProvinceCode': 'BC',
'start': '2025-03-01',
'promocode': 'MyPromoCode'
}
headers = {
'client': '1234',
'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
}
response = requests.get(url, headers=headers, params=params)
print(response.text.encode('utf8'))
# NodeJs -Axios
var axios = require('axios');
var data = {};
const params = new URLSearchParams({
orderSimCard: 'True',
PlanID: '1679',
CountryId: '42',
ProvinceCode: 'BC',
start: '2025-03-01',
promocode: 'MyPromoCode'
}).toString();
const url = "https://phoneboxapi.azurewebsites.net/api/Activation/GetTotalPrepaid" + params;
axios
.get(
url,
{
headers: {
client: '1234',
apitoken: 'foqxcFJ82EhecRXnIZbeQbb8m9'
}
}
)
.then(res => {
console.log(JSON.parse(res.data));
})
.catch(err => {
console.log(err);
});
# Response
# Success
return a list of JSON containing below information
[
{
"currency": "CAD",
"plan_Amt": 60,
"prorate_Duration": "N/A",
"charge_Duration": "Mar 01, 2025~Mar 30, 2025",
"prorate_Amt": 0,
"simcard_amt": 10,
"subtotal": 70,
"gst_rate": 5,
"pst_rate": 7,
"gst_Amt": 3.5,
"pst_Amt": 4.9,
"promo_Amt": 0,
"total": 78.4
}
]
# Fail
Failed Authorization
reason: wrong login credential
{
"Message": "Authorization has been denied for this request."
}