Hashed MSISDN

Hashed MSISDN

Since the end of 2017, EE has begun hashing MSISDNs of end users who have made purchases using Payforit. This means that your application will no longer receive the MSISDN of the end user in a notification. Instead, we will send you the hashed MSISDN where applicable.

We also provide you with an API to use to convert MSISDNs into hashes. This could be useful to help an end user when they provide their phone number to you.

The API is available at:

   <a rel="nofollow" class="external free" href="https://payforit.txtnation.com/api/amsr/">https://payforit.txtnation.com/api/amsr/</a>
	

You will need to make an HTTP GET or POST request to this address along with the following parameters:

Variable Name Example Description
company txtnation The company code that identifies you. This is the same value you use when making other Payforit 4 API requests.
password password1 Your password in our platform. This is the same value you use when making other Payforit 4 API requests.
action encrypt This parameter should always be set to encrypt. Decrypt is not available at this time.
msisdn 447528748504 The mobile number that you would like to hash.

In response to the API call, you will receive a JSON object containing the data you requested or an error explaining why the call was not successful. These errors will be accompanied by an HTTP code 500 if there was a problem with the request, an HTTP 403 if the credentials were incorrect or an HTTP 400 if the mobile number did not belong to an EE end user. Successful requests will be returned with an HTTP 200 OK.

Successful:

   {
       status: "OK", 
       msisdn: "447445566731",
       amsr: "YMUcIH9jXEeOdmMRfttsXg..",
       network: "EE"
   }
	

Not successful:

   {
       status: "ERROR", 
       error: "Bad credentials"
   }
	

Also, if the number you try to hash is not an EE number then you will receive the following error:

   {
       status: "ERROR", 
       error: "Not an EE number"
   }
	

Please note that you can only attempt to hash MSISDNs that have interacted with your application. This is to protect the privacy of end users.