# Post PrepaidActivation Payment

This service is used to post payment for prepaid activations.

# 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 CAD as this payment service only accepts CAD.

# Sample Reqeust

# Sample Request Body

{
    // Credit Card Related: 5
    "CreditCardNumber": 6666888866668888,
    "CreditCardName": "Magic Gary",
    "CCV": "520",
    "ExpirationMonth": "08",
    "ExpirationYear": "2020",

    //Payment Related: 2
    "PaymentAmt": 66.66,
    "Currency": "CAD"
}

# cURL

curl --location --request POST 'https://testmyaccount.azurewebsites.net/api/Activation/PostpaidActivationPayment' \
--header 'client: 1234' \
--header 'apitoken: foqxcFJ82EhecRXnIZbeQbb8m9' \
--header 'paid: 6808' \
--data-raw '{
    "CreditCardNumber": 6666888866668888,
    "CreditCardName": "Magic Gary",
    "CCV": "520",
    "ExpirationMonth": "08",
    "ExpirationYear": "2020",
    "PaymentAmt": 66.66,
    "Currency": "CAD"
}'

# Python - Requests

import requests

url = "https://testmyaccount.azurewebsites.net/api/Activation/PostpaidActivationPayment"

payload = "{\n    \"CreditCardNumber\": 6666888866668888,\n    \"CreditCardName\": \"Magic Gary\",\n    \"CCV\": \"520\",\n    \"ExpirationMonth\": \"08\",\n    \"ExpirationYear\": \"2020\",\n    \"PaymentAmt\": 66.66,\n    \"Currency\": \"CAD\"\n}"
headers = {
  'client': '1234',
  'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9',
  'paid': '6808'
}

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":"2020","PaymentAmt":66.66,"Currency":"CAD"});

var config = {
  method: 'post',
  url: 'https://testmyaccount.azurewebsites.net/api/Activation/PostpaidActivationPayment',
  headers: { 
    'client': '1234', 
    'apitoken': 'foqxcFJ82EhecRXnIZbeQbb8m9', 
    'paid': '6808'
  },
  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."
}
LastUpdated: 11/5/2020, 2:36:22 AM