# Get Total Prepaid Fee
This service is used to get the fee amount for the prepaid plan dedicated to the partner.
# 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 |
|
end | DateTime | Use below formula calculate end .
|
promocode | string | Use PromoCode returned from VerifySimcard |
# Request Body
None
# Sample Reqeust
# Sample Request URL
http://localhost:60904/api/Activation/GetTotalPrepaid?orderSimCard=True&PlanID=6666&CountryId=42&ProvinceCode=BC&start=2020-10-31&promocode=MyPromoCode
# cURL
curl --location --request GET 'http://localhost:60904/api/Activation/GetTotalPrepaid?orderSimCard=True&PlanID=6666&CountryId=42&ProvinceCode=BC&start=2020-10-31&promocode=MyPromoCode' \
--header 'client: 6666' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9/dFFHO'
# Python - Requests
import requests
url = "http://localhost:60904/api/Activation/GetTotalPrepaid"
params = {
'orderSimCard': 'True',
'PlanID': '66666',
'CountryId': '247',
'ProvinceCode': 'ON',
'start': '2020-10-31',
'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({
carrier: 'R',
promocode: 'MyPromoCode'
}).toString();
const url =
"https://testmyaccount.azurewebsites.net/api/Activation/PrepaidPlans" +
params;
axios
.get(
url,
{
headers: {
client: '66666',
apitoken: 'foqxcFJ82EhecRXnIZbeQbb8m9'
},
params: {
orderSimCard: 'True',
PlanID: '66666',
CountryId: '247',
ProvinceCode: 'ON',
start: '2020-10-31',
promocode: 'MyPromoCode'
}
}
)
.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": 45.00,
"prorate_Duration": "Oct 31, 2020~Nov 01, 2020",
"charge_Duration": "Nov 02, 2020~Dec 01, 2020",
"prorate_Amt": 3.00,
"simcard_amt": 0.0,
"subtotal": 48.00,
"gst_rate": 5.000,
"pst_rate": 7.000,
"gst_Amt": 2.40,
"pst_Amt": 3.36,
"promo_Amt": 0.00,
"total": 53.76,
"prorate_Start": "Oct 31, 2020",
"prorate_End": "Nov 01, 2020",
"prorate_DataCap": "204.80 MB",
"firstmonth_DataCap": "204.80 MB",
"charge_Start": "Nov 02, 2020",
"dataaddon_Fee": 0.0,
"prorate_Pct": 0.07
}
]
# Fail
Failed Authorization
reason: wrong login credential
{
"Message": "Authorization has been denied for this request."
}