Transfer To Api
-
Upload
robbie-josiah -
Category
Documents
-
view
293 -
download
9
description
Transcript of Transfer To Api
TransferTo API v.1.05
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 2
1. OVERVIEW 3
1.3. TOPUP PROCESS FLOW 3 1.4. SMS MANAGEMENT 3 1.5. PIN LESS VERSUS PIN BASED OPERATORS 3
2. TCP/IP PROTOCOL 4
3. HOW TO SEND REQUESTS 4
3.1. PLAIN TEXT GET-‐POST REQUEST 4 3.2. XML POST REQUEST 4
4. AUTHENTICATION AND SECURITY 5
5. TESTING ACCOUNT AND URL 6
6. METHODS OVERVIEW 6
7. METHODS DETAILS 7
7.1. METHOD “CHECK_WALLET” 7 7.2. METHOD “TOPUP” 8 7.3. METHOD “MSISDN_INFO” 13 7.4. METHOD “PING” 15 7.5. METHOD “TRANS_INFO” 16 7.6. METHOD “TRANS_LIST” 19 7.7. METHOD “RESERVE_ID” 20 7.8. METHOD “GET_ID_FROM_KEY” 21 7.9. METHOD “PRICELIST” 23
8. ERROR CODES 26
9. SAMPLE CODE IN JAVA FOR MD5 GENERATION 27
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 3
1. Overview
This document describes the TransferTo API protocol and its features. Send an email to support@transfer-‐to.com if you have any comments/questions.
1.3. Topup Process Flow
Different functions of the API can be used to conduct a topup (see below):
It’s possible to avoid having to call the “msisdn_info” function. To do this, you’ll have to store on your system an exact copy of the products configured in your account. In addition, your system must be able to identify the correct destination operator based on the recipient’s mobile number. Note that calling this function returns the list of available products in less than a few seconds.
1.4. SMS Management
By default, an SMS notification will be sent to the recipient after every successfully processed topup. The default SMS format is the following and can be customized to local languages: Congratulations! You've received AMOUNT CURRENCY from SENDER. Thank you for using SERVICE. FREE_TEXT Where FREE_TEXT is the contents of the field named “sms” of the topup method and SERVICE is set to “TransferTo” by default. The default TPOA of the SMS is “8888”.
1.5. PIN Less versus PIN Based Operators
Most operators are PIN Less (meaning the recipient mobiles are directly recharged). There are a few exceptions to this rule, namely with a few operators in the USA, where PINs are used. For these PIN based operators, a PIN code is sent by SMS to the recipient, who is then required to complete the process (usually by calling an IVR to redeem the PIN). Responses of the topup method are slightly different depending on the type of the operator. A few additional fields are returned in case of PIN based operator (IVR number, PIN code, instructions on how to redeem it, expiration date).
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 4
2. TCP/IP Protocol TransferTo’s application is reachable using HTTP over TCP/IP. RFC of the HTTP protocol may be found here http://www.faqs.org/rfcs/rfc_1945.html. Note: many very smart libraries and modules are available for many languages to send HTTP requests. Most transactions are processed in less than 30 seconds. However, as a few transactions may be delayed at the destination operator’s end, your timeout between topup request and response must be set to 600 seconds. TransferTo guarantees that transactions not processed within 600 seconds will not be charged, whatever the final status (successful or not). Our system is in real-‐time, therefore the response to a topup request is final. Once the TCP connection established for the previously sent request is closed, no confirmation can be received afterwards, except if you call the trans_info method.
3. How to send requests
TransferTo’s platform is reachable via HTTP and a specific URL. Arguments must be provided using HTTP POST or GET meth-‐ods (both are valid and recognized by our system). While GET method is good for writing test requests quickly, we recom-‐mend using POST method for operations as it has no length limitation and is safer. The URL to reach TransferTo’s platform is http://fm.transfer-‐to.com/cgi-‐bin/shop/topup A GET URL will look like this one: http://fm.transfer-‐to.com/cgi-‐bin/shop/topup?login=login&key=key&md5=md5&action=check_wallet For a POST request, arguments are sent in the data. Our protocol also supports XML POST requests (the system will answer in XML if you submitted your request in XML).
3.1. Plain text GET-‐POST request
If you send the arguments using the POST or GET methods, the TransferTo API sends back a text/plain document with hu-‐man readable information formatted in the following format (note that each line ends with ‘\r\n’): value1=result1 value2=result2 …
3.2. XML POST request
As mentioned above, TransferTo’s platform is also reachable using a more common format, XML. When sending a request, content must be formatted into XML before being posted to the URL. NOTE: don’t forget to set the content type to “text/xml”. The response will be in XML as well. All field names used to create the request and received in the response remain the same as those used in “text/plain” format.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 5
4. Authentication and Security TransferTo offers the option to establish an IPSEC VPN upon request to secure the data communication. TransferTo provides login and password at the creation of the merchant account. You may create sub accounts via the web interface http://shop.transferto.com. For each request, the client must generate a key, which must be an integer and unique. For each request, the following fields must be populated for authentication purposes: Parameter Type Description Login Alphanumeric
String Login provided by TransferTo
Key Integer Key generated by the client. The transaction will be refused if the key has already been used before. We advise to manage the key on your side and try to avoid using the API key() func-‐tion
md5 Alphanumeric String
MD5 sum of the hex encoded concatenation of login, password, key
NOTE: We strongly advise that you generate and manage the key on your side. A good key would be a time stamp with milli-‐seconds if you are using a unique server. If you are using multiple servers, the easiest solution may be to use a common se-‐quence shared via a database to ensure that all the servers are synchronized. You can also set up several topup accounts via the web interface allowing you to have distinct sequences (one per server for instance). Example Login and password provided by TransferTo (fake login/password; ask for your own account credentials): login: client password: pass99 Key generated by Client side for each transaction. Calculation of the MD5 hash: md5 = hex(md5(concat(login,password,key))); Key = 1, MD5 = 2f922ef79253f93d0fc05d0ac0b0d100 Key = 2, MD5 = 43dd325a272140a9f47a3be015eb8129 Key = 3, MD5 = cc98cf7d902047101be5635f6af3877e Key = 4, MD5 = b4a9d3a95ac0efb73d840bd0dbbe1d1c Key = 5, MD5 = a43cff6e5d057f84b1ae99e64245bff8 As we can see in the samples, only the key is modified each time from 1 to 5 but the MD5 result is really different.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 6
5. Testing Account and URL TransferTo will create an account and provide you with a valid login and password. (Please email us to request an account if this has not already been done) The URL to reach our topup platform is: http://fm.transfer-‐to.com/cgi-‐bin/shop/topup You can also reach us using a secure URL https://fm.transfer-‐to.com:5443/cgi-‐bin/shop/topup To test how your system reacts to the most common errors returned by our system in the topup method response, “fake” phone numbers in Indonesia have been set up with available products of IDR 5000, 10000, 20000, 50000 and 100000:
-‐ 628123456770 will return the error 0 (successful transaction) -‐ 628123456780 will return the error 204 (destination number is not a valid prepaid phone number) -‐ 628123456781 will return the error 301 (input value out of range or invalid product) -‐ 628123456790 will return the error 214 (transaction refused by the operator) -‐ 628123456791 will return the error 215 (denomination currently unavailable) -‐ 628123456798 will return the error 998 (system not available, please retry later) -‐ 628123456799 will return the error 999 (unknown error, please contact support)
6. Methods Overview
TransferTo’s API currently supports 5 different methods identified by a specific value of the parameter “action”. Each request must be submitted with at least all the mandatory arguments of the associated action or the system will reject the request. Optional arguments can be added depending on the action. Method (value of parameter “action”) Description topup This method is used to conduct a topup.
check_wallet This method is used to retrieve the balance in your wallet.
msisdn_info This method is used to retrieve relevant information from an MSISDN number (operator, country…) as well as the list of all products configured for your specif-‐ic account and the destination operator linked to that number.
trans_info This method is used to retrieve all available information on a specific transaction.
reserve_id This method is used to reserve an ID in the system. This ID can then be used in the “topup” or “simulation” requests. This way, your system knows the ID of the transaction before sending the request to TransferTo (or else it will only be dis-‐played in the response).
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 7
7. Methods Details
7.1. Method “check_wallet”
Description This function is used to retrieve the credit balance in your TransferTo account. Request details Field Type Required Notes Action Alphanumeric
String Y Must be set to “check_wallet”
Login Alphanumeric String
Y Your account login name.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
Key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise the use of an auto increment function. Refer to section 4 for more details on authentication mechanism.
Response details Field Type Notes error_code Integer Defines the error code of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
Balance Numeric Remaining amount in your account. Login Alphanumeric
String Your account login name.
Type Alphanumeric String
Defines your account type: “Master” or “Retailer”
Currency Alphanumeric String
Your account currency (USD, GBP, EUR, etc…)
Wallet Numeric Numeric value of your current total wallet (display sum of all your retailer and yourself only if you are type Master)
authentication_key Alphanumeric String
Key used in this request
Error Codes Field Description Notes 0 Transaction successful 919 All needed argument not received 921 Wrong MD5 encoding 923 Key or MD5 value cannot be empty 925 Key already used or invalid key value 926 Account not active. Please contact your Account
Manager
995 Account not found. Please enter and use a cor-‐rect login
Example Request sent
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 8
<xml> <login>test1</login> <key>1326958538</key> <md5>your MD5 here</md5> <action>check_wallet</action> </xml> Response received type Master <TransferTo> <type>Master</type> <name>test1</name> <currency>USD</currency> <balance>1.49</balance> <wallet>12.54</wallet> <authentication_key>1326958538</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo> Response received type Retailer <TransferTo> <type>Retailer</type> <name>test2</name> <currency>USD</currency> <balance>149.98</balance> <authentication_key>1326958689</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
7.2. Method “topup”
Description This method is used to recharge a destination number with a specified denomination (“product” field). This is the API’s most important action as it is required when sending a topup to a prepaid account phone number in a live environment. Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “topup”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise that you use an auto increment function. Refer to section 4 for more details on authentication mechanism.
msisdn Numeric String Y The international phone number of the user requesting to credit a phone number. The format must contain the country code, and will be valid with or without the ‘+’ or ‘00’ placed before it:. For exam-‐ple: “6012345678” or “+6012345678” or “006012345678” (Malay-‐
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 9
sia) are all valid. destination_msisdn Numeric String Y This is the destination phone number that will be credited with the
amount transferred. Format is similar to “msisdn”. product Alphanumeric
String Y This field is used to define the remote product (often, the same as
the amount in destination currency) to use in the request. operatorid Integer N It defines the operator id of the destination MSISDN that must be
used when treating the request. If set, the platform will be forced to use this operator ID and will not identify the operator of the des-‐tination MSISDN based on the numbering plan. It must be very useful in case of countries with number portability if you are able to know the destination operator.
sms Alphanumeric String (Must be less than 30 chars and special characters may have to be encoded (&, <, >…) depend-‐ing on the method used.)
N This field is used to send your own free text message. It will appear in the notification SMS received by the recipient. It does NOT define the SMS sent to recipient.
cid1 Alphanumeric String (less than 64 chars)
N This field can be used to record any kind of information when per-‐forming a transaction. It is stored in our database and may appear in various reports.
cid2 Alphanumeric String (less than 64 chars)
N This field can also be used to record any kind of information when performing a transaction. It is stored in our database and may ap-‐pear in various reports.
cid3 Alphanumeric String (less than 64 chars)
N This field can also be used to record any kind of information when performing a transaction. It is stored in our database and may ap-‐pear in various reports.
reserved_id Numeric String N If defines, TransferTo system will use the previously reserved ID (via method “reserved_id”) for this transaction.
sender_sms Alphanumeric String
N “yes” if required, blank or “no” if not required.
sender_text Alphanumeric String (less than 30 chars)
N Used only if “sender_sms” is defined. Value is appended to the end of a default message like below, You successfully transferred %product% %dest_currency% to the destination number %destination_msisdn%. Thank you. (Ref:%transactionid%) %send-‐er_text%
Response details Our system can return two possible response formats depending on the type of recharges performed: Pin-‐Less or Pin-‐Based. Please refer to prices listed on your account to know the different types of requested products.
1. Pin-‐Less Field Type Notes error_code Integer Defines the error code of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
msisdn Numeric String MSISDN (phone number) of the sender (the person who requested the trans-‐fer).
destination_msisdn Numeric String Destination MSISDN of the recipient originating currency Alphanumeric
String Currency used in the account that performed the transaction request.
destination_currency Alphanumeric Currency used in the destination country of the destination number (where
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 10
String the transfer is going to). product_requested Float Returns the value in the “product” tag the client requested. actual_product_sent Float Returns the real sent amount, this information will be the same as “out-‐
put_value” in case of successful transfer in most cases. It can be different in case of internal product mapping on our side (India mainly). This is the prod-‐uct that we requested to the operator.
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
sms_sent Alphanumeric String
Defines the status of the SMS sent to the destination number. If this field equals “yes”, it means a SMS has been sent to the destination number to notify him that a topup that has been done to his account.
sms Alphanumeric String
The custom message appended to the default SMS sent to the destination number.
sender_sms Alphanumeric String
Returns “yes” only if sms sent successfully.
sender_text Alphanumeric String
Returns the value requested if sms is sent successfully.
wholesale_price Numeric Return the price of this product sold to client in the account’s currency retail_price Numeric Return the retail price of this product the client is configured to sell balance Numeric Return the client’s account balance transactionid Integer Defines the ID of the transaction. cid1 Alphanumeric
String Value of the customized field cid1 sent in the topup request.
cid2 Alphanumeric String
Value of the customized field cid2 sent in the topup request.
cid3 Alphanumeric String
Value of the customized field cid3 sent in the topup request.
operator Alphanumeric String
Destination operator name
operatorid Numeric Destination operator ID returned only if forced by client, else blank country Alphanumeric
String Destination country
countryid Numeric Destination country ID reference_operator Alphanumeric
String Reference of the operator returned if available
2. Pin-‐Based Field Type Notes error_code Integer Defines the error code of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
msisdn Numeric String MSISDN (phone number) of the sender (the person who requested the trans-‐fer).
destination_msisdn Numeric String Destination MSISDN of the recipient originating currency Alphanumeric
String Currency used in the account that performed the transaction request.
destination_currency Alphanumeric String
Currency used in the destination country of the destination number (where the transfer is going to).
product_requested Float Returns the value in the “product” tag the client requested. actual_product_sent Float Returns the real sent amount, this information will be the same as “out-‐
put_value” in case of successful transfer in most cases. It can be different in case of internal product mapping on our side (India mainly). This is the prod-‐uct that we requested to the operator.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 11
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
sms_sent Alphanumeric String
Defines the status of the SMS sent to the destination number. If this field equals “yes”, it means a SMS has been sent to the destination number to notify him that a topup that has been done to his account.
sms Alphanumeric String
The custom message appended to the default SMS sent to the destination number.
wholesale_price Numeric Return the price of this product sold to client in the account’s currency retail_price Numeric Return the retail price of this product the client is configured to sell balance Numeric Return the client’s account balance transactionid Integer Defines the ID of the transaction. cid1 Alphanumeric
String Value of the customized field cid1 sent in the topup request.
cid2 Alphanumeric String
Value of the customized field cid2 sent in the topup request.
cid3 Alphanumeric String
Value of the customized field cid3 sent in the topup request.
operator Alphanumeric String
Destination operator name
operatorid Numeric Destination operator ID returned only if forced by client, else blank country Alphanumeric
String Destination country
countryid Numeric Destination country ID reference_operator Alphanumeric
String Reference of the operator returned if available
pin_based String Type of product returned (“Yes”, default “No” if not set). Appears only in case of Pin-‐based transactions.
pin_validity String Validity information of the PIN pin_code Alphanumeric
String Code of the PIN
pin_ivr Integer IVR number of this PIN pin_serial Alphanumeric
String Serial number of the PIN
pin_value Integer Value of the PIN returned pin_option_1 String Additional information pin_option_2 String Additional information pin_option_3 String Additional information Examples 1. Pin-‐Less Request sent
<xml> <login>test</login> <key>1326963417</key> <md5>md5</md5> <msisdn>69999999999</msisdn> <sms>Happy birthday !</sms> <destination_msisdn>+60172860300</destination_msisdn> <product>10</product> <cid1>My Text</cid1> <sender_sms>yes</sender_sms> <sender_text></sender_text> <action>topup</action> </xml>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 12
Response received <TransferTo> <transactionid>77748538</transactionid> <msisdn>69999999999</msisdn> <destination_msisdn>60172860300</destination_msisdn> <country>Malaysia</country> <countryid>799</countryid> <operator>Maxis Malaysia</operator> <reference_operator> reference_operator> <operatorid></operatorid> <originating_currency>USD</originating_currency> <destination_currency>MYR</destination_currency> <product_requested>10</product_requested> <product_really_requested>10</product_really_requested> <wholesale_price>3.39</wholesale_price> <retail_price>4.30</retail_price> <balance>8.1</balance> <sms_sent>yes</sms_sent> <sms>Happy birthday </sms> <sender_sms>yes</sender_sms> <sender_text></sender_text> <cid1> My Text </cid1> <cid2></cid2> <cid3></cid3> <authentication_key>1326963417</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo> 2. Pin-‐Based Request sent <xml> <login>test</login> <key>1326964272</key> <md5>md5</md5> <msisdn>69999999999</msisdn> <sms>Test credit from TransferTo</sms> <destination_msisdn>00009779742045269</destination_msisdn> <product>200</product> <action>topup</action> </xml> Response received <TransferTo> <transactionid>77749654</transactionid> <msisdn>69999999999</msisdn> <destination_msisdn>9779742045269</destination_msisdn> <country>Nepal</country> <countryid>819</countryid> <operator>NTC CDMA Nepal</operator> <reference_operator></reference_operator> <operatorid></operatorid> <originating_currency>USD</originating_currency>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 13
<destination_currency>NPR</destination_currency> <product_requested>200</product_requested> <product_really_requested>200</product_really_requested> <wholesale_price>2.58</wholesale_price> <retail_price>3.30</retail_price> <balance>5.52</balance> <sms_sent>yes</sms_sent> <sms>Test credit from TransferTo</sms> <cid1></cid1> <cid2></cid2> <cid3></cid3> <pin_based>yes</pin_based> <pin_option_1>To recharge your mobile, dial 1415 from your own Pre-‐Paid mobile phone and follow the instruc-‐tions.</pin_option_1> <pin_option_2>SkyPhone</pin_option_2> <pin_option_3></pin_option_3> <pin_value>200</pin_value> <pin_code>12345678901234</pin_code> <pin_ivr>1415</pin_ivr> <pin_serial>123456789123456789</pin_serial> <pin_validity>2014-‐01-‐18T00:00:00+05:45</pin_validity> <authentication_key>1326964272</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
7.3. Method “msisdn_info”
Description This method is used to retrieve various information of a specific MSISDN (operator, country…) as well as the list of all prod-‐ucts configured for your specific account and the destination operator of the MSISDN.
Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “msisdn_info”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
destination_msisdn Numeric String Y Destination MSISDN to use in the request. operatorid Integer N It defines the operator ID of the destination MSISDN that must be
used when treating the request. If set, the platform will be forced to use this operator ID and will not identify the operator of the destination MSISDN based on the numbering plan.
Response details
Field Type Notes error_code Integer Defines the error code of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric Returns the human readable value of “error_code”.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 14
String destination_msisdn Numeric String Destination MSISDN of the recipient country Alphanumeric
String Country of the destination operator
countryid Integer Unique ID of the destination country connection_status Integer Shows successful rate to the destination operator
1-‐100 with 100 being 100% success rate. destination_currency Alphanumeric
String Currency in the country of destination
operator Alphanumeric String
Operator of the destination MSISDN
operatorid Integer Unique ID of the destination operator authentication_key Integer Authentication key as it has been given by the client in the request. product_list String Returns the list of all available products configured for the current account.
Products are separated by a coma. retail_price_list String Returns the list of all final retail prices configured for the current topup ac-‐
count. Prices are separated by a coma and in the currency of the topup account.
wholesale_price_list String Returns the wholesale price list of all available products configured for the cur-‐rent account. Prices are separated by a coma and in the currency of the topup account.
Error codes Field Description Notes 0 Transaction successful 101 Destination MSISDN out of range 919 All needed argument not received 921 Wrong MD5 encoding 923 Key or MD5 value cannot be empty 925 Key already used or invalid key value 926 Account not active. Please contact your Account Manager 995 Account not found. Please enter a correct login id Example Request sent <xml> <login>stephenusd</login> <key>1326965217</key> <md5>md5</md5> <destination_msisdn>+60172860300</destination_msisdn> <action>msisdn_info</action> </xml> Response received <TransferTo> <country>Malaysia</country> <countryid>799</countryid> <operator>Maxis Malaysia</operator> <operatorid>385</operatorid> <connection_status>100</connection_status> <destination_msisdn>60172860300</destination_msisdn> <destination_currency>MYR</destination_currency> <product_list>10,30,50</product_list> <retail_price_list>4.30,12.70,21.10</retail_price_list>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 15
<wholesale_price_list>3.39,10.11,16.84</wholesale_price_list> <authentication_key>1326965217</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
7.4. Method “ping”
Description This method can be used when you want to test the connection and your account credentials. Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “ping”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
Response details Field Type Notes error_code Integer Defines the error code of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
info_txt Integer Should contain “pong” if the transaction is successful. originating currency Alphanumeric
String Currency used in the account that performed the transaction request.
authentication_key Integer Authentication key as it has been given by the client in the request. Example Request sent <xml> <login>stephenusd</login> <key>1327027869</key> <md5>md5</md5> <action>ping</action> </xml> Response received <TransferTo> <info_txt>pong</info_txt> <authentication_key>1327027869</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 16
7.5. Method “trans_info”
Description This method can be used to retrieve available information on a specific transaction. Please note that values of “input_value” and “debit_amount_validated” are rounded to 2 digits after the comma but are the same as the values returned in the fields “input_value” and “validated_input_value” of the “topup” method response. Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “trans_info”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
transactionid Integer Y ID of the transaction you want to get information on. Response details As there are 2 types of products available, there are 2 types or responses in the “topup” method and therefore, 2 types of responses in the “trans_info” method:
1. Pin-‐Less Field Type Notes error_code Integer Defines the status of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API.
error_txt Alphanumeric String
Returns the human readable value of “error_code”.
msisdn Numeric String MSISDN (phone number) of the sender (the person who requested the transfer).
destination_msisdn Numeric String Destination MSISDN of the recipient originating currency Alphanumeric
String Currency used in the account that performed the transaction re-‐quest.
destination_currency Alphanumeric String
Currency used in the destination country of the destination number (where the transfer is going to).
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
transaction_error_code Integer Defines the error code of the transaction ID requested. transaction_error_txt Alphanumeric
String Defines the human readable value of the error code of the transac-‐tion ID requested.
transaction_authentication_key Integer Authentication key used for this transaction date String Date when the transaction requested was performed (GMT). country String Destination country name
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 17
countryid String Destination country ID operator String Destination operator name operatorid String Destination operator ID, empty if not forced for this topup request reference_operator Alphanumeric
String Reference of the operator returned if available
sms Alphanumeric String
The custom message appended to the default SMS sent to the des-‐tination number.
wholesale_price Numeric Return the price of this product sold to client in the account’s cur-‐rency
retail_price Numeric Return the retail price of this product the client is configured to sell cid1 Alphanumeric
String Value of the customized field cid1 sent in the topup request.
cid2 Alphanumeric String
Value of the customized field cid2 sent in the topup request.
cid3 Alphanumeric String
Value of the customized field cid3 sent in the topup request.
product_requested Float Returns the value in the “product” tag the client requested. actual_product_sent Float Returns the real sent amount, this information will be the same as
“output_value” in case of successful transfer in most cases. It can be different in case of internal product mapping on our side (India mainly). This is the product that we requested to the operator.
pin_based String Type of product returned (“Yes”, default “No” if not set). Appears only in case of Pin-‐based transactions.
pin_validity String Validity information of the PIN pin_code Alphanumeric
String Code of the PIN
pin_ivr Integer IVR number of this PIN pin_serial Alphanumeric
String Serial number of the PIN
pin_value Integer Value of the PIN returned pin_option_1 String Additional information pin_option_2 String Additional information pin_option_3 String Additional information Error code Field Description Notes 0 Transaction successful 401 Transaction ID not found or was not made
by your account
907 Invalid transaction ID 919 All needed argument not received 921 Wrong MD5 encoding 923 Key or MD5 value cannot be empty 925 Key already used or invalid key value 926 Account not active. Please contact your Account Man-‐
ager
995 Account not found. Please enter a correct login id Example
1. Pin-‐Less Request sent <xml>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 18
<login>stephenusd</login> <key>1326967613</key> <md5>md5</md5> <msisdn>69999999999</msisdn> <transactionid>77748538</transactionid> <action>trans_info</action> </xml> Response received <TransferTo> <transactionid>77748538</transactionid> <msisdn>69999999999</msisdn> <destination_msisdn>60172860300</destination_msisdn> <transaction_authentication_key>1326963417</transaction_authentication_key> <transaction_error_code>0</transaction_error_code> <transaction_error_txt>Transaction successful</transaction_error_txt> <country>Malaysia</country> <countryid>799</countryid> <operator>Maxis Malaysia</operator> <operatorid>0</operatorid> <reference_operator>HASH(0x1343f70)</reference_operator> <product_requested>10</product_requested> <actual_product_sent>10</actual_product_sent> <wholesale_price>3.39</wholesale_price> <retail_price>4.30</retail_price> <sms>Tshop test from stephenusd</sms> <cid1></cid1> <cid2></cid2> <cid3></cid3> <date>2012-‐01-‐19 08:57:21.326342</date> <originating_currency>USD</originating_currency> <destination_currency>MYR</destination_currency> <authentication_key>1326967613</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
2. Pin-‐Based Request sent <xml> <login>stephenusd</login> <key>1326968024</key> <md5>md5</md5> <msisdn>69999999999</msisdn> <transactionid>77749654</transactionid> <action>trans_info</action> </xml> Response received <TransferTo> <transactionid>77749654</transactionid> <msisdn>69999999999</msisdn> <destination_msisdn>9779742045269</destination_msisdn> <transaction_authentication_key>1326964272</transaction_authentication_key> <transaction_error_code>0</transaction_error_code> <transaction_error_txt>Transaction successful</transaction_error_txt>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 19
<country>Nepal</country> <countryid>819</countryid> <operator>NTC CDMA Nepal</operator> <operatorid>0</operatorid> <reference_operator></reference_operator> <product_requested>200</product_requested> <actual_product_sent>200</actual_product_sent> <wholesale_price>2.58</wholesale_price> <retail_price>3.30</retail_price> <sms>Free credit from TransferTo</sms> <cid1></cid1> <cid2></cid2> <cid3></cid3> <date>2012-‐01-‐19 09:11:13.792268</date> <originating_currency>USD</originating_currency> <destination_currency>NPR</destination_currency> <pin_based>yes</pin_based> <pin_value>200</pin_value> <pin_code>12345678901234</pin_code> <pin_ivr>1415</pin_ivr> <pin_serial>123456789123456789</pin_serial> <pin_validity>2014-‐01-‐18T00:00:00+05:45</pin_validity> <pin_option_1>To recharge your mobile, dial 1415 from your own Pre-‐Paid mobile phone and follow the instruc-‐tions.</pin_option_1> <pin_option_2>SkyPhone</pin_option_2> <pin_option_3></pin_option_3> <authentication_key>1326968024</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
7.6. Method “trans_list”
Description This method is used to retrieve the list of transactions performed within the date range by the MSISDN if set. Note that both dates are included during the search. Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “trans_list”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
msisdn Numeric String N The format must be international with or without the ‘+’ or ‘00’: “6012345678” or “+6012345678” or “006012345678” (Malaysia)
destination_msisdn Numeric String N The format must be international with or without the ‘+’ or ‘00’: “6012345678” or “+6012345678” or “006012345678” (Malaysia)
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 20
code Numeric String N The error_code of the transactions to search for. E.g “0” to search for only all successful transactions. If left empty, all transactions will be returned(Failed and successful).
start_date String Y Defines the start date of the search. Format must be YYYY-‐MM-‐DD.
stop_date String Y Defines the end date of the search (included). Format must be YYYY-‐MM-‐DD.
Response details Field Type Notes status_code Integer Defines the status of a transaction. 0 will be returned in case of successful
transaction. Deprecated, use field “error_code” instead. error_code Integer Defines the status of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
transaction_list String List of transaction IDs found based on search parameters (date range and MSISDN). Transactions are separated by a coma.
Example Request sent <xml> <login>your_login</login> <key>1217301496240</key> <md5>14d1a9f386479b2af4d62a8f932f5d79</md5> <msisdn>6598236911</msisdn> <destination_msisdn>628123456770</destination_msisdn> <code>0</code> <start_date>2008-‐01-‐01</start_date> <stop_date>2008-‐08-‐01</stop_date> <action>trans_list</action> </xml> Response received <FixedAndMobile> <status_code>0</status_code> <transaction_list>6115,6137,6183,6184,6204,6514,8129,8135,14888,14891</transaction_list> <error_txt>Transaction successful</error_txt> <authentication_key>1217301496240</authentication_key> <error_code>0</error_code> </FixedAndMobile>
7.7. Method “reserve_id”
Description This method is used to reserve an ID in the system. This ID can then be used in the “topup” or “simulation” requests. This way, your system knows the ID of the transaction before sending the request to TransferTo (else it will only be dis-‐played in the response).
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 21
Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “reserve_id”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
Response details Field Type Notes error_code Integer Defines the status of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
reserved_id Numeric Reserved ID in TransferTo system to use in the next “topup” or “simulation” request.
Example Real example of request-‐response using XML POST method: Request sent <xml> <login>your_login</login> <key>1217303174266</key> <md5>b70aa58d2fe87d0bb0cd2b1902e5fce2</md5> <action>reserve_id</action> </xml> Response received <FixedAndMobile> <status_code>0</status_code> <reserved_id>20123457</reserved_id> <error_txt>Transaction successful</error_txt> <authentication_key>1217303174266</authentication_key> <error_code>0</error_code> </FixedAndMobile>
7.8. Method “get_id_from_key”
Description This method is used to retrieve the ID of a transaction previously performed based on the key used in the request at that time.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 22
Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “reserve_id”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
from_key Integer Y Key used in the request you want to retrieve the transaction ID. Response details Field Type Notes error_code Integer Defines the status of a transaction.
Please refer to section 8 for the list of all error codes returned by TransferTo API. error_txt Alphanumeric
String Returns the human readable value of “error_code”.
authentication_key Integer Authentication key as it has been given by the client in the request. As this key has to be different each time, it may be used as a unique ID on the client side.
from_key Integer Key used in the request you want to retrieve the ID. id Integer ID of the transaction you were looking for. Blank if not found Example Real example of request-‐response using XML POST method: Request sent <xml> <login>your_login</login> <key>1217303174266</key> <md5>b70aa58d2fe87d0bb0cd2b1902e5fce2</md5> <from_key>1334909705</from_key> <action>get_id_from_key</action> </xml> Response received <FixedAndMobile> <error_txt>Transaction successful</error_txt> <authentication_key>1217303174266</authentication_key> <error_code>0</error_code> <id>7654321</id> </FixedAndMobile>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 23
7.9. Method “pricelist”
Description This method is used to retrieve coverage and pricelist offered to you.
Request details Field Type Required Notes action Alphanumeric
String Y Must be set to “pricelist”
login Alphanumeric String
Y Your account login name. Refer to section 4 for more details on authentication mechanism.
md5 Alphanumeric String
Y MD5 sum of the hex encoded concatenation of login, password and key. Refer to section 4 for more details on authentication mechanism.
key Integer Y Key generated by the client. The transaction will be refused if the key has been used before. We advise to use an auto increment function. Refer to section 4 for more details on authentication mechanism.
info_type Alphanumeric String
Y i) “countries” : Returns a list of all countries offered to you ii) “country” : Returns a list of operators in the country iii) “operator” : Returns a list of wholesale and retail price for the operator
content Integer N i) Not used if info_type = “countries” ii) countryid of the requested country if info_type = “country” iii) operatorid of the requested operator if info_type = “operator”
Response details
Field Type Notes error_code Integer Defines the error code of a transaction.
0 or 919 error_txt Alphanumeric
String Returns the human readable value of “error_code”.
country Alphanumeric String
Country of the destination operator
countryid Integer Unique ID of the destination country destination_currency Alphanumeric
String Currency in the country of destination
operator Alphanumeric String
Operator of the destination MSISDN
operatorid Integer Unique ID of the destination operator authentication_key Integer Authentication key as it has been given by the client in the request. product_list String Returns the list of all available products configured for the current account.
Products are separated by a coma. retail_price_list String Returns the list of all final retail prices configured for the current topup ac-‐
count. Prices are separated by a coma and in the currency of the topup account.
wholesale_price_list String Returns the wholesale price list of all available products configured for the cur-‐rent account. Prices are separated by a coma and in the currency of the topup account.
Error codes Field Description Notes 0 Transaction successful 919 All needed argument not received
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 24
921 Wrong MD5 encoding 923 Key or MD5 value cannot be empty 925 Key already used or invalid key value 926 Account not active. Please contact your Account Manager 995 Account not found. Please enter a correct login id Example Request sent -‐ info_type = countries <xml> <login>stephenusd</login> <key>1326965217</key> <md5>md5</md5> <info_type>countries</info_type> <content>1310</content> <action>pricelist</action> </xml> Response received <TransferTo> <country>Russia,Senegal,India,Bolivia,United States,Morocco,Sri Lanka,El Salvador,United States,Indonesia,Poland,Burundi,Grenada,India,India,Pakistan,Turks and Caicos,United States,Egypt,Egypt,Fiji,Brazil,St Lu-‐cia,Antigua and Barbuda,Pakistan,Montserrat,Dominican Repub-‐lic,Guatemala,Mexico,Peru,India,Ghana,Venezuela,India,India,India,Indonesia,Russia,Afghanistan,India,Russia,Russia,India,Bolivia,India,Bangladesh,Guatemala,Russia,Tunisia,Brazil,Russia,Honduras,Honduras,Russia,Ukraine,Colombia,St Lu-‐cia,India,India,Poland,Laos,St Kitts and Nevis,Dominican Republic,Nepal,Poland,Ghana,Equatorial Guin-‐ea,Afghanistan,Anguilla,India,Afghanistan,Vietnam,Jamaica,Honduras,St Kitts and Ne-‐vis,Jordan,Vietnam,Kazakhstan,Indonesia,Malaysia,Ghana,Pakistan,Russia,Peru,Afghanistan,Venezuela,Kazakhstan,Haiti,Palestine,Bangladesh,Russia,Yemen,Barbados,India,Honduras,Sri Lanka,Turkey,Philippines,Russia,Russia,Sri Lanka,India,Russia,Mexico,Benin,Tunisia,Mexico,Senegal,Nepal,India,Russia,Pakistan,Sri Lanka,Afghanistan,Chile,India,China,Grenada,Central African Repub-‐lic,India,Philippines,India,Cambodia,Mali,Thailand,Poland,Cyprus,Russia,United States,Congo,Indonesia,Antigua and Barbu-‐da,Barbados,India,Nicaragua,Vietnam,Vietnam,United States,Jamaica,Dominican Repub-‐lic,Philippines,Nigeria,Anguilla,Guinea Bis-‐sau,Romania,Montserrat,Indonesia,India,Colombia,Pakistan,India,Vietnam,Tanzania,India,Ivory Coast,India,Portugal,India,India,Colombia,India,Sudan,Nicaragua,Guyana,Cameroon,Indonesia,India,Sri Lanka,Madagascar,Honduras,Dominican Repub-‐lic,Portugal,India,India,Haiti,Bangladesh,Malaysia,Nigeria,Ecuador,Nigeria,Cambodia,El Salva-‐dor,Nigeria,Mexico,Ghana,India,Pakistan,Indonesia,Indonesia,India,United States,Dominican Republic,St Vincent Grena-‐dines,Fiji,Ghana,Panama,Tanzania,Jamaica,Malaysia,Haiti,Trinidad and Tobago,Mexico,Costa Ri-‐ca,Russia,Somalia,Nigeria,Guatemala,Portugal,India,Mexico,Ukraine,Russia,Poland,Kenya,India,Dominica,Ukraine,Guyana,India,Vietnam,Russia,Russia,Liberia,Ivory Coast,Central African Republic,Guatemala,China,Nigeria,Russia,United States,Yemen,St Lucia,Rwanda,Kenya,Russia,Cambodia,India,Russia,Poland,Guatemala,Guatemala,Niger,Mexico,El Salva-‐dor,Jamaica,Bolivia,Nepal,United States,El Salvador,Russia,Indonesia,Honduras,Russia,Democratic Republic of the Con-‐go,Russia,Haiti,United States,Venezuela,India,India,India,Pakistan,Pakistan,St Vincent Grenadines,United States,Mexico,Kazakhstan,Pakistan,Iraq,Dominican Republic,Afghanistan,India,Venezuela,Russia,Dominican Repub-‐lic,Poland,Ukraine,Uganda,Cuba,Bangladesh,Bolivia,Russia,Peru,Nicaragua,Russia,Trinidad and Toba-‐go,India,Guinea,Ghana,Russia,India,Poland,Russia,Zimbabwe,Russia,Ghana,Russia,India,Nicaragua,Vietnam,Russia,Cameroon,Cayman Islands,Dominica,Brazil,Peru,Sri Lanka,Romania,Indonesia,Indonesia,India,Cayman Is-‐lands,Ecuador,Somalia,India,Russia,India,Colombia,Kenya,Chile,India,Mozambique,Ghana,Jamaica,China,Egypt,Guyana,Dominican Republic,Tunisia,Syria,United States,India,Brazil,Russia,Pakistan,Chile,British Virgin Is-‐lands,Russia,Ecuador,Venezuela,Suriname</country> <country-‐id>848,859,766,686,899,813,871,730,899,767,841,698,753,766,766,832,894,899,729,729,737,691,872,668,832,917,725,756,808,839,766,748,907,766,766,766,767,848,661,766,848,848,766,686,766,678,756,848,891,691,848,762,762,848,901,710,872,766,766,841,785,918,725,819,841,748,731,661,916,766,661,908,774,762,918,776,908,778,767,799,748,832,848,839,661,907,778,761,834,678,848,911,679,766,762,871,892,840,848,848,871,766,848,808,683,891,808,859,819,766,848,832,871,661,707,766,708,753,705,766,840,766,699,801,884,841,718,848,899,913,767,668,679,766,824,908,908,899,774,725,840,826,916,758,847,917,767,766,710,832,766,908,882,766,773,766,843,766,766,710,766,874,824,760,700,767,766,871,797,762,725,843,766,766,761,
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 25
678,799,826,727,826,699,730,826,808,748,766,832,767,767,766,899,725,873,737,748,836,882,774,799,761,889,808,715,848,867,826,756,843,766,808,901,848,841,779,766,724,901,760,766,908,848,848,789,773,705,756,708,826,848,899,911,872,849,779,848,699,766,848,841,756,756,825,808,730,774,686,819,899,730,848,767,762,848,712,848,761,899,907,766,766,766,832,832,873,899,808,778,832,769,725,661,766,907,848,725,841,901,900,717,678,686,848,839,824,848,889,766,757,748,848,766,841,848,915,848,748,848,766,824,908,848,700,704,724,691,839,871,847,767,767,766,704,727,867,766,848,766,710,779,707,766,814,748,774,708,729,760,725,891,879,899,766,691,848,832,707,692,848,727,907,875</countryid> <authentication_key>1337662098</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo> Request sent -‐ info_type = country <xml> <login>stephenusd</login> <key>1326965217</key> <md5>md5</md5> <info_type>country</info_type> <content>767</content> <action>pricelist</action> </xml> Response received <xml> <country>Indonesia</country> <countryid>767</countryid> <operator>Indosat Starone Indonesia,Telkom Flexi Indonesia,Indosat IM3 Indonesia,AAA-‐TESTING Indonesia,Esia Bakrie Telecom Indonesia,Indosat Mentari Indonesia,Telkomsel Simpati Indonesia,Three Telecom Indonesia,Telkomsel KartuAS Indonesia,Excelcom Indonesia,Axis Indonesia</operator> <operatorid>1320,1322,1313,1310,1326,1312,1324,1327,1325,215,1411</operatorid> <authentication_key>1337662386</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </xml> Request sent -‐ info_type = operator <xml> <login>stephenusd</login> <key>1326965217</key> <md5>md5</md5> <info_type>operator</info_type> <content>1310</content> <action>pricelist</action> </xml> Response received <xml> <country>Indonesia</country> <countryid>767</countryid> <operator>AAA-‐TESTING Indonesia</operator> <operatorid>1310</operatorid> <destination_currency>IDR</destination_currency> <product_list>5000,10000,20000,50000,100000</product_list> <retail_price_list>1.50,2.00,3.00,7.00,15.00</retail_price_list> <wholesale_price_list>0.50,0.01,0.01,0.01,0.01</wholesale_price_list> <authentication_key>1337662386</authentication_key> <error_code>0</error_code> <error_txt>Transaction successful</error_txt> </TransferTo>
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 26
8. Error Codes Exhaustive list of error codes returned by TransferTo platform Error code Description Note 0 Transaction successful 101 Destination MSISDN out of range 104 MSISDN in black list MSISDN refers to destination MSISDN 105 Not enough credit on your account 201 Transaction refused 203 Transaction incomplete 204 Destination Account is not prepaid 205 Originating Account is not prepaid 206 Error at debit confirmation 207 Transaction amount limit exceeded 208 Day amount limit exceeded 209 Total amount limit exceeded 210 Originator daily limit exceeded 211 Destination daily limit exceeded 212 Destination maximum balance exceeded 213 Duplicated transaction 214 Topup refused 215 Denomination currently unavailable 216 Destination number not activated 217 Destination number expired 218 Request timeout 219 Key does not exist 220 Request timeout 221 Fraud suspicion 222 Mobile number temporarily barred from refill 223 ID not reserved 224 Invalid length of destination MSISDN 230 Recipient reached maximum topup number 231 Recipient reached maximum topup amount 301 input_value out of range or invalid product 303 output_value out of range 310 Denomination blocked 401 transactionid not found 901 Invalid action 902 Invalid input_currency 903 Invalid output_currency 904 Invalid input_value 905 Invalid start_date 906 Invalid stop_date 907 Invalid transactionid 908 Account not configured for this service 909 Invalid flag 919 All needed argument not received Check column “Required” of the methods 921 Wrong key encoding 922 Originating IP not allowed 923 Key already used or invalid key value Key must be unique and greater than the last
key used. 998 System not available. Please retry later. 999 Unknown error. Please contact support.
TransferTo API
© 2012 – Transfer To Inc / Fixed & Mobile Pte. Ltd. – Confidential 27
9. Sample Code in JAVA for MD5 Generation
This class generates the MD5 value in JAVA language. import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.GregorianCalendar; class HelloWorldApp { public static void main(String[] args) { String md5_string = getKeyedDigest("your_login","your_password","your_key"); System.out.println(md5_string); } public static String getKeyedDigest(String login, String password, String key) { try { String temp = login + password + key; MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] bytes = md5.digest(temp.getBytes()); return byteToHex(bytes); } catch(NoSuchAlgorithmExceptione) { System.out.println("oops"); } return null; } public static String byteToHex(byte[] bits) { if (bits == null) { return null; } StringBuffer hex = new StringBuffer(bits.length * 2); for (int i = 0; i < bits.length; i++) { if (((int) bits[i] & 0xff) < 0x10) { hex.append("0"); } hex.append(Integer.toString((int) bits[i] & 0xff, 16)); } return hex.toString(); } }