# Post PrepaidActivation Payment
This service is used to post payment for a prepaid activation.
# Request Configuration
# Request Endpoint
/api/Activation/PrepaidActivationPayment
# Request Method
POST
# Request Headers
Name | Type | Description |
---|---|---|
client | string | Use bID returned from Login |
apitoken | string | Use Token returned from Login |
paid | string | Use referenceID returned from Post Prepaid ActivationInfo |
# Request Parameters:
None
# Request Body
Name(7) | Type | Description |
---|---|---|
Credit Card Related (5) | ||
CreditCardNumber | string | Enter Credit card number. Most credit card numbers today are 16 digits , but some 13-digit numbers are still accepted. |
CreditCardName | string | Enter credit card holder's name on the card, in the format of FirstName, LastName . |
CCV | string | Enter 3 digits security code on the back of the credit card. |
ExpirationMonth | string | 2-character alphanumeric, use MM format. |
ExpirationYear | string | 4-character alphanumeric, use YYYY format. |
Payment Related (2) | ||
PaymentAmt | decimal | Use total returned from Get TotalPrepaid Fee |
Currency | string | Use currency returned from Get TotalPrepaid Fee |
# Sample Reqeust
# Sample Request Body
{
// Credit Card Related: 5
"CreditCardNumber": 6666888866668888,
"CreditCardName": "Magic Gary",
"CCV": "520",
"ExpirationMonth": "08",
"ExpirationYear": "2026",
//Payment Related: 2
"PaymentAmt": 66.66,
"Currency": "CAD"
}
# cURL
curl --location --request POST 'https://phoneboxapi.azurewebsites.net/api/Activation/PrepaidActivationPayment' \
--header 'client: 1234' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9' \
--header 'paid: 16808' \
--data-raw '{
"CreditCardNumber": 6666888866668888,
"CreditCardName": "Magic Gary",
"CCV": "520",
"ExpirationMonth": "08",
"ExpirationYear": "2026",
"PaymentAmt": 66.66,
"Currency": "CAD"
}'
# Python - Requests
import requests
url = "https://phoneboxapi.azurewebsites.net/api/Activation/PrepaidActivationPayment"
payload = "{\n \"CreditCardNumber\": 6666888866668888,\n \"CreditCardName\": \"Magic Gary\",\n \"CCV\": \"520\",\n \"ExpirationMonth\": \"08\",\n \"ExpirationYear\": \"2026\",\n \"PaymentAmt\": 66.66,\n \"Currency\": \"CAD\"\n}"
headers = {
'client': '1234',
'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9',
'paid': '16808'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
# NodeJs -Axios
var axios = require('axios');
var data = JSON.stringify({"CreditCardNumber":6666888866668888,"CreditCardName":"Magic Gary","CCV":"520","ExpirationMonth":"08","ExpirationYear":"2026","PaymentAmt":66.66,"Currency":"CAD"});
var config = {
method: 'post',
url: 'https://phoneboxapi.azurewebsites.net/api/Activation/PrepaidActivationPayment',
headers: {
'client': '1234',
'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9',
'paid': '16808'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
# Response
# Success
Return 1
1
# Non-Success
Return 0
0
# Fail
Failed Authorization
reason: wrong login credential
{
"Message": "Authorization has been denied for this request."
}