We are here 24/7, keeping an eye on things and making sure everything runs smoothly.
This API is responsible for creating new payment transactions, and this API is compatible with both encrypted and plain credit card methods of transactions.
<script type="text/javascript" src="https://[server-name]/services/proxynization_api.js"></script>
2. Implement the callback function. The callback function will be invoked once the proxynization response is returned from our system. We make a function call which invokes the pre-defined callback function, and the proxynization response is used as an argument.
<script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
3 Design your payment form and insert a proxynization call within the form’s submit action.
3.1
The first parameter can either be the value of the credit card number or the ID of the credit card number field. If the value of the parameter starts with a hashtag (#) symbol, the first parameter is assumed to be the ID of the credit card number field. If a hashtag is absent, the first parameter is assumed to be a credit card number.
3.2
The second parameter is the name of the callback function, which will be called when the proxynization call is completed.
<input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />
Variable Name | Description | Required | Expected Values | |
---|---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username | |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key | |
card_token | Get a token during Add Card Vault API. If you use a card token, the credit card number, expiry month, and expiry year are not required. | C | XXXXXXXXXXXXXXXXXXXXXXXXX | |
creditcard_number | Credit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required. | C | 4111111111111111 | |
expire_month | Expiry Month of the Credit Card. This is not required if you use a card token number. | C | 06 | |
expire_year | Expiry Year of the Credit Card. This is not required if you use a card token number. | C | 2025 | |
cvv | CVV of the Credit Card. | |||
Change CVV requirement as optional/mandatory from merchant's account settings for all transactions. | C | 123 | ||
use_secret_key | Set the secret key in the account setting to encrypt creditcard_number without using proxynization_api.js. Make sure to encrypt credit card numbers with AES 128-bit ECB cipher code. | N | Y or N (default value N) Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption | |
amount | Amount to be charged | Y | 133.24 | |
currency | Currency of Transaction (allowed currencies will be determined during the time of merchant boarding). | Y | USD,EUR,GBP,CAD,AUD,NZD,AED, DKK,MXN,SEK,CHF | |
company_name | Company Name of the cardholder | N | - | |
first_name | First name of the cardholder | Y | Roberto | |
last_name | Last name of the cardholder | Y | Diaz | |
address | Address of the cardholder | N | 4446 Green Avenue, Suite 56 | |
city | City of the cardholder | N | Los Angeles | |
state | State of the cardholder | N | CA | |
country_code | Country of the cardholder(ISO alpha-2) | Y | US, CN | |
zip_code | Zip code of the cardholder | Y | 94085 | |
phone_number | Phone Number of the cardholder | N | 408-345-2323 | |
ship_address_as_bill_address | Billing address copy Shipping address | Y | Y or N (default value N) Y- Billing address copy to Shipping address N- Not copy | |
ship_company_name | Shipping Company Name | N | - | |
ship_first_name | Shipping First name | Y | Roberto | |
ship_last_name | Shipping Last name | Y | Diaz | |
ship_address | Shipping Address | N | 4446 Green Avenue, Suite 56 | |
ship_city | Shipping City | N | Los Angeles | |
ship_state | Shipping State | N | CA | |
ship_country_code | Shipping Country (ISO alpha-2) | Y | US, CN | |
ship_zip_code | Shipping Zip code | Y | 94085 | |
ship_phone_number | Shipping Phone Number | N | 408-345-2323 | |
Email ID of the cardholder | Y | [email protected] | ||
email_receipt | Sends transaction details to specified cardholder email | N | Y or N (default value N) Y- Send email N- Not send | |
emailReceiptDBAEmail | Email Receipt to Merchant DBA Contact Email | N | Y or N (default value N) Y- Send email N- Not send | |
memo | Memo of the transaction | N | ||
client_ip | Client IP address | N | 127.0.0.1 | |
custom_field_1 | N | additional parameter 1 | ||
custom_filed_2 | N | additional parameter 2 | ||
source | C | source=SHOPIFY if using Shopify otherwise it is not required | ||
3ds_redirect_url | Redirect to this URL after 3D-Secure authentication | N | ||
(To process transactions with 3DS, contact TCB Pay to enable 3DS and set 'Denied Payment Transaction' or 'Continue Payment Transaction' for non-3DS transactions). | C | if using 3D-Secure then it is required otherwise it is not required. | ||
reference_id | Transaction reference id | N | Reference ID should be unique |
<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/sale.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="creditcard_number" id="creditcard_number" value="4111111111111111"/> <input type="text" name="expire_month" value="06"/> <input type="text" name="expire_year" value="2025"/> <input type="text" name="cvv" value="123"/> <input type="text" name="amount" value="14.5"/> <input type="text" name="currency" value="USD"/> <input type="text" name="company_name" value="MSD"/> <input type="text" name="first_name" value="Roberto"/> <input type="text" name="last_name" value="Diaz"/> <input type="text" name="address" value="4446 Green Avenue, Suite 56"/> <input type="text" name="city" value="Los Angeles"/> <input type="text" name="state" value="CA"/> <input type="text" name="country_code" value="US"/> <input type="text" name="zip_code" value="11111"/> <input type="text" name="phone_number" value="323-323-3223"/> <input type="text" name="client_ip" value="127.0.0.1"/> <input type="text" name="email" value="[email protected]"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" /> </form> <script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code for a successful API call is always 00.
{"response":{"code":"00","description":" Transaction Entry Success","transaction_id":102," total_amount":15.7," convenience_fee":1.2}}
{"response":{"code":"00","description":"Transaction pending cardholder authentication","transaction_id":102,"redirect_url":"https://[server-name]/challenge_request.php?uid=xxxxxxxxx"}}
Subscriber needs to redirect to redirect_url within 30 seconds.
After the 3DS challenge, the API response is redirected to 3ds_redirect_url, parameters are transaction_id, code, and description.
The Account Name Inquiry (ANI) API allows applications to run validations of the payment
account before processing a transaction ensuring a greater probability of success. This
feature is enabled only for VISA card types.
<script type="text/javascript" src="https://[server-name]/services/proxynization_api.js"></script>
2. Implement the callback function. The callback function will be invoked once the proxynization response is returned from our system. We make a function call which invokes the pre-defined callback function, and the proxynization response is used as an argument.
<script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
3. Design your payment form and insert a proxynization call within the form’s submit action.
<input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
creditcard_number | Credit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required. | C | 4111111111111111 |
expire_month | Expiry Month of the Credit Card. This is not required if you use a card token number. | C | 06 |
expire_year | Expiry Year of the Credit Card. This is not required if you use a card token number. | C | 2025 |
cvv | CVV of the Credit Card. | ||
Change CVV requirement as optional/mandatory from merchant's account settings for all transactions. | C | 123 | |
use_secret_key | Set the secret key in the account setting to encrypt creditcard_number without using proxynization_api.js. Make sure to encrypt credit card numbers with AES 128-bit ECB cipher code. | N | Y or N (default value N) |
Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption | |||
amount | Amount to be charged | Y | 133.24 |
currency | Currency of Transaction (allowed currencies will be determined during the time of merchant boarding). | Y | USD,EUR,GBP,CAD,AUD,NZD,AED, |
DKK,MXN,SEK,CHF | |||
company_name | Company Name of the cardholder | N | - |
first_name | First name of the cardholder | Y | Roberto |
last_name | Last name of the cardholder | Y | Diaz |
<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/account_validation.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="creditcard_number" id="creditcard_number" value="4111111111111111"/> <input type="text" name="expire_month" value="12"/> <input type="text" name="expire_year" value="2025"/> <input type="text" name="first_name" value="Roberto"/> <input type="text" name="middle_name" value="Diaz"/> <input type="text" name="last_name" value="Diaz"/> <br/> <input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" /> </form> <script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, two elements are returned, code, description token. The response code is always 00 for a successful API call.
{"response":{"code":"00","description":"Successful","nameMatchDecision": "string","lastNameMatchDecision": "string","firstNameMatchDecision": "string","middleNameMatchDecision": "string"}}
This API is responsible for creating new payment transactions using Apple Pay.
Integrating Apple Pay to your application is a three step process, first call the javascript, display the Apple Pay button and finally send the response to processing API. All the steps are described below.
MSD will provide apple-developer-merchantid-domain-association.txt file. This file must be uploaded to a folder called /.well-known/ at the document root of the web server.This is required to verify the domain.
<script type="text/javascript" src="https://[server-name]/services/applePay.js"></script>
2. Display an Apple Pay button: The example code below is to display Apple Pay button. Set the style and locale where you add the button.
/* CSS */ #applePay { width: 150px; height: 50px; display: none; border-radius: 5px; margin-left: auto; margin-right: auto; margin-top: 20px; background-image: -webkit-named-image(apple-pay-logo-white); background-position: 50% 50%; background-color: black; background-size: 60%; background-repeat: no-repeat; } /* HTML */ <button type="button" id="applePay" onclick="callPayment()"></button>
3. Implement the request and response function. The msdApplePay.paymentRequest function will be called when click on Apple Pay Button. This function accepts 4 parameters (app_key,business_name,amount,currency). The msdApplePay.paymentResponse function will be invoked once the Apple Pay response is returned from our system. This function has 2 parameters (responseStatus,responseText). Parameter responseText is used as an input parameter to apple_sale.php API. Value of responseStatus is S for success.
Variable Name | Description | Required | Expected Values |
---|---|---|---|
app_key | This is MD5 of TCB Pay Gateway Username and 16 digit Secret key | Y | If Username is test and Secret key is abcdefgh12345678 app_key=MD5(testabcdefgh12345678) |
business_name | Display this name in Apple Pay window | Y | Test shop |
amount | Amount to be charged | Y | 100.00 |
currency | Currency of Transaction | Y | USD |
<script type="text/javascript" > function callPayment() { var amount=document.getElementById("amount").value; var currency=document.getElementById("currency").value; var app_key="b0cf87c7e314af8638ce34732f1f7d24"; var business_name="Test shop"; msdApplePay.paymentRequest(app_key,business_name,amount,currency); } msdApplePay.paymentResponse=function(responseStatus,responseText){ if(responseStatus=="S") { document.getElementById('signature_token').value = responseText; document.getElementById("formID").submit(); }else{ alert(responseText); } } </script>
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
signature_token | Get a token from TCBPayApplePay.paymentResponse | Y | {"identifyKey":"test","data":"test", "ephemeralPublicKey":"test","publicKeyHash":"test", "transactionId":"test","signature":"test", "version":"EC_v1","displayName":"MasterCard 1111", "network":"MasterCard","type":"credit"} |
company_name | Company Name of the cardholder | N | - |
first_name | First name of the cardholder | Y | Roberto |
last_name | Last name of the cardholder | Y | Diaz |
address | Address of the cardholder | N | 4446 Green Avenue, Suite 56 |
city | City of the cardholder | N | Los Angeles |
state | State of the cardholder | N | CA |
country_code | Country of the cardholder(ISO alpha-2) | Y | US, CN |
zip_code | Zip code of the cardholder | Y | 94085 |
phone_number | Phone Number of the cardholder | N | 408-345-2323 |
Email ID of the cardholder | Y | [email protected] | |
email_receipt | Sends transaction details to specified cardholder email | N | Y or N (default value N) Y- Send email N- Not send |
emailReceiptDBAEmail | Email Receipt to Merchant DBA Contact Email | N | Y or N (default value N) Y- Send email N- Not send |
memo | Memo of the transaction | N | |
client_ip | Client IP address | N | 127.0.0.1 |
custom_field_1 | N | additional parameter 1 | |
custom_filed_2 | N | additional parameter 2 |
<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/apple_sale.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="signature_token" id="signature_token" value="{"identifyKey":"test","data":"test","ephemeralPublicKey":"test","publicKeyHash":"test","transactionId":"test","signature":"test","version":"EC_v1","displayName":"MasterCard 1111","network":"MasterCard","type":"credit"}"/> <input type="text" name="company_name" value="MSD"/> <input type="text" name="first_name" value="Roberto"/> <input type="text" name="last_name" value="Diaz"/> <input type="text" name="address" value="4446 Green Avenue, Suite 56"/> <input type="text" name="city" value="Los Angeles"/> <input type="text" name="state" value="CA"/> <input type="text" name="country_code" value="US"/> <input type="text" name="zip_code" value="11111"/> <input type="text" name="phone_number" value="323-323-3223"/> <input type="text" name="client_ip" value="127.0.0.1"/> <input type="text" name="email" value="[email protected]"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <button type="button" id="applePay" onclick="callPayment()"></button> </form> <script type="text/javascript" > function callPayment() { var amount=document.getElementById("amount").value; var currency=document.getElementById("currency").value; var app_key="b0cf87c7e314af8638ce34732f1f7d24"; var business_name="Test shop"; msdApplePay.paymentRequest(app_key,business_name,amount,currency); } msdApplePay.paymentResponse=function(responseStatus,responseText){ if(responseStatus=="S") { document.getElementById('signature_token').value = responseText; document.getElementById("formID").submit(); }else{ alert(responseText); } } </script>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, four elements are returned, code, description, transaction_id, total_amount. The response code is always 00 for a successful API call.
{"response":{"code":"00","description":" Transaction Entry Success","transaction_id":102," total_amount":15.7}}
This API is responsible for performing pre-authorization payments, and this API is
compatible with both encrypted and plain credit card methods of transactions.
<script type="text/javascript" src="https://[server-name]/services/proxynization_api.js"></script>
2. Implement the callback function. The callback function will be invoked once the proxynization response is returned from our system. We make a function call which invokes the pre-defined callback function, and the proxynization response is used as an argument.
function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
3. Design your payment form and insert a proxynization call within the form’s submit action.
<input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
card_token | Get a token during Add Card Vault API. If you use a card token, the credit card number, expiry month, and expiry year are not required. | C | XXXXXXXXXXXXXXXXXXXXXXXXX |
creditcard_number | Credit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required. | C | 4111111111111111 |
expire_month | Expiry Month of the Credit Card. This is not required if you use a card token number. | C | 06 |
expire_year | Expiry Year of the Credit Card. This is not required if you use a card token number. | C | 2025 |
cvv | CVV of the Credit Card | Y | 123 |
amount | Amount to be charged | Y | 133.24 |
currency | Currency of Transaction (allowed currencies will be determined during the time of merchant boarding). | Y | USD,EUR,GBP,CAD,AUD,NZD,AED, DKK,MXN,SEK,CHF |
company_name | Company Name of the cardholder | N | - |
first_name | First name of the cardholder | Y | Roberto |
last_name | Last name of the cardholder | Y | Diaz |
address | Address of the cardholder | N | 4446 Green Avenue, Suite 56 |
city | City of the cardholder | N | Los Angeles |
state | State of the cardholder | N | CA |
country_code | Country of the cardholder(ISO alpha-2) | Y | US, CN |
zip_code | Zip code of the cardholder | Y | 94085 |
phone_number | Phone Number of the cardholder | N | 408-345-2323 |
ship_address_as_bill_address | Billing address copy Shipping address | Y | Y or N (default value N) Y- Billing address copy to Shipping address N- Not copy |
ship_company_name | Shipping Company Name | N | - |
ship_first_name | Shipping First name | Y | Roberto |
ship_last_name | Shipping Last name | Y | Diaz |
ship_address | Shipping Address | N | 4446 Green Avenue, Suite 56 |
ship_city | Shipping City | N | Los Angeles |
ship_state | Shipping State | N | CA |
ship_country_code | Shipping Country (ISO alpha-2) | Y | US, CN |
ship_zip_code | Shipping Zip code | Y | 94085 |
ship_phone_number | Shipping Phone Number | N | 408-345-2323 |
Email ID of the cardholder | Y | [email protected] | |
email_receipt | Sends transaction details to specified cardholder email | N | Y or N (default value N) Y- Send email N- Not send |
emailReceiptDBAEmail | Email Receipt to Merchant DBA Contact Email | N | Y or N (default value N) Y- Send email N- Not send |
memo | Memo of the transaction | N | |
client_ip | Client IP address | N | 127.0.0.1 |
reference_id | Transaction reference id | N | Reference ID should be unique |
<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/authorize.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="creditcard_number" id="creditcard_number" value="4111111111111111"/> <input type="text" name="expire_month" value="06"/> <input type="text" name="expire_year" value="2025"/> <input type="text" name="cvv" value="123"/> <input type="text" name="amount" value="14.5"/> <input type="text" name="currency" value="USD"/> <input type="text" name="company_name" value="MSD"/> <input type="text" name="first_name" value="Roberto"/> <input type="text" name="last_name" value="Diaz"/> <input type="text" name="address" value="4446 Green Avenue, Suite 56"/> <input type="text" name="city" value="Los Angeles"/> <input type="text" name="state" value="CA"/> <input type="text" name="country_code" value="US"/> <input type="text" name="zip_code" value="11111"/> <input type="text" name="phone_number" value="323-323-3223"/> <input type="text" name="email" value="[email protected]"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" /> </form> <script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code for a successful API call is always 00.
{"response":{"code":"01","description":" Merchant Information is Missing"}}
This API is responsible to capture an existing authorization transaction.
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
transaction_id | Unique transaction ID generated by the Gateway | Y | - |
amount | Amount to be charged, <= original transaction amount | Y | 133.24 |
email_receipt | Send transaction details to the specified email during authorization | N | Y or N (default value N) Y- Send email N- Not send |
<form name="" action="https://portal.merchantservicedepot.com/apis/capture.php" method="post"> <input type="text" name="username" value=" msdusername"/> <input type="text" name="api_key" value=" msdapikey"/> <input type="text" name="transaction_id" value=""/> <input type="text" name="amount" value="14.5"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="submit" value="submit"/> </form>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code for a successful API call is always 00.
{"response":{"code":"01","description":" Merchant Information is Missing"}}
This API is responsible for canceling an existing transaction.
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
transaction_id | Unique transaction ID generated by the Gateway | Y | - |
email_receipt | Sends transaction details to specified email during authorization | N | Y or N (default value N) Y- Send email N- Not send |
<form name="" action="https://portal.merchantservicedepot.com/apis/void.php" method="post"> <input type="text" name="username" value=" msdusername"/> <input type="text" name="api_key" value=" msdapikey"/> <input type="text" name="transaction_id" value=""/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="submit" value="submit"/> </form>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code is always 00 for a successful API call.
{"response":{"code":"01","description":" Merchant Information is Missing"}}
This API is responsible for refunding an existing successful transaction.
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
transaction_id | Unique transaction ID generated by gateway | Y | - |
amount | Amount to be charged, <= original transaction amount | Y | 133.24 |
email_receipt | Send transaction details to the specified email during authorization | N | Y or N (default value N) Y- Send email N- Not send |
<form name="" action="https://portal.merchantservicedepot.com/apis/refund.php" method="post"> <input type="text" name="username" value=" msdusername"/> <input type="text" name="api_key" value=" msdapikey"/> <input type="text" name="transaction_id" value=""/> <input type="text" name="amount" value="14.5"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="submit" value="submit"/> </form>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code is always 00 for a successful API call.
{"response":{"code":"01","description":" Merchant Information is Missing"}}
This API is responsible for generating transaction reports.
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
start_date | From transaction date | Y | date format YYYY-MM-DD |
end_date | To transaction date | Y | date format YYYY-MM-DD |
transaction_type | Type of transaction | N | (default all transaction) SALE,AUTHORIZE,CAPTURE,REFUND,VOID,CREDIT |
transaction_status | Status of transaction | N | (default all transaction) SUCCESS,FAIL |
transaction_id | TCBPay ID of the transaction, If we need to know the details of a specific transaction | N | 100000000000001605 |
page_no | Page number of the entire result set. Each page has a maximum of 100 records listed | N | (default 1) can be upto total page number |
reference_id | Transaction reference id | N | Reference ID should be unique |
<form name="" action="https://portal.merchantservicedepot.com/apis/report.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="start_date" value="2021-01-15"/> <input type="text" name="end_date" value="2021-03-15"/> <br/> <input type="submit" value="submit"/> </form>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and array of transactions. The response code is always 00 for a successful API call.
{ "response": { "code": "00", "description": "success", "no_of_transactions": "450", "total_pages": 5, "current_page": "1", "transactions": [ { "transaction_id": "100000000000001605", "parent_transaction_id": "", "transaction_type": "SALE", "transaction_source": "Moto", "initiated_by": "System User", "transaction_status": "SUCCESS", "decline_reason": "", "transaction_time": "2021-08-17 03:10:50", "time_zone": "America/Caracas", "gmt_time": "2021-08-17 07:10:50", "card_type": "MASTERCARD", "3d_secure_transaction": "NO", "credit_card_number": "************2205", "card_expiry_date": "12/2025", "auth_response_code": "Success", "avs_response_code": "Z", "avs_response": "Not Matched", "cvv_response_code": "M", "cvv_response": "Matched", "error_response": "Approved", "currency": "USD", "total_amount": "2", "amount": "2", "surcharge": "0", "tax": "0", "tip": "0", "first_name": "Tanmoy", "last_name": "Mondal", "company_name": "", "address_1": "802 E Frierson Ave", "address_2": "", "city": "TAMPA", "state": "FL", "zip_code": "33606", "email": "[email protected]", "phone_no": "", "subscription_id": "", "is_risk_hold": "NO", "IP": "192.168.0.93" "reference_id": "" } ] } }
Code | Description |
---|---|
01 | Username is missing or invalid |
02 | Credit Card is missing or invalid |
03 | Expiration Date is missing or invalid |
04 | First/Last Name is missing |
05 | Invalid Country Code |
06 | The proper cardholder Email ID is missing |
07 | Invalid Amount |
08 | Transaction Currency is missing |
09 | API Key is missing or invalid |
10 | Requested Currency is not allowed for this merchant |
11 | Couldn't process a transaction due to load balancer rules |
12 | The transaction ID is missing or invalid |
13 | Refund is not possible, the transaction has already been voided. |
14 | Refund is not possible, it exceeds Actual Amount |
15 | Capture is not possible |
16 | Void is not possible |
17 | Sale limit exceeded |
18 | Monthly limit exceeded |
19 | Transaction limit exceeded |
20 | IP/Transaction limit exceeded |
21 | Message contains words that have been identified as profanity and this message has been blocked due to company policy. Please try again. |
22 | IP Address is missing/invalid |
23 | Date is invalid date format |
24 | Transaction Type not valid |
25 | Transaction Status not valid |
26 | Potential duplicate transaction |
A1 | Transaction entry failed |
A2 | Transaction update failed |
P1 | Invalid page number |
UN | Unknown error, please contact an administrator |
F | Your transaction is declined |
00 | Transaction entry is successful |
This API is responsible for creating new payment transactions, and this API is compatible
with both encrypted and plain credit card methods of transactions.
<script type="text/javascript" src="https://[server-name]/services/proxynization_api.js"></script>
2. Implement the callback function. The callback function will be invoked once the proxynization response is returned from our system. We make a function call which invokes the pre-defined callback function, and the proxynization response is used as an argument.
<script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
3. Design your payment form and insert a proxynization call within the form’s submit action.
<input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />
Variable Name | Description | Required | Expected Values |
---|---|---|---|
username | TCB Pay Gateway Username | Y | TCB Pay Gateway Username |
api_key | TCB Pay Gateway API Key | Y | TCB Pay Gateway API Key |
creditcard_number | Credit Card Number that is used to complete an Unreferenced Refund. This is not required if a card token number is used. | C | 4111111111111111 |
expire_month | Expiry Month of the Credit Card. This is not required if a card token number is used. | C | 06 |
expire_year | Expiry Year of the Credit Card. This is not required if a card token number is used. | C | 2025 |
use_secret_key | Set the secret key in the account setting to encrypt creditcard_number without using proxynization_api.js. Make sure to encrypt credit card numbers with AES 128-bit ECB cipher code. | N | Y or N (default value N) Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption |
amount | Amount to be charged | Y | 133.24 |
currency | Currency of Transaction (allowed currencies will be determined during the time of merchant boarding). | Y | USD,EUR,GBP,CAD,AUD,NZD,AED, |
DKK,MXN,SEK,CHF | |||
company_name | Company Name of the cardholder | N | - |
first_name | First name of the cardholder | Y | Roberto |
last_name | Last name of the cardholder | Y | Diaz |
address | Address of the cardholder | N | 4446 Green Avenue, Suite 56 |
city | City of the cardholder | N | Los Angeles |
state | State of the cardholder | N | CA |
country_code | Country of the cardholder(ISO alpha-2) | Y | US, CN |
zip_code | Zip code of the cardholder | Y | 94085 |
phone_number | Phone Number of the cardholder | N | 408-345-2323 |
Email ID of the cardholder | Y | [email protected] | |
email_receipt | Sends transaction details to specified cardholder email | N | Y or N (default value N) Y- Send email N- Not send |
emailReceiptDBAEmail | Email Receipt to Merchant DBA Contact Email | N | Y or N (default value N) Y- Send email N- Not send |
client_ip | Client IP address | N | 127.0.0.1 |
custom_field_1 | N | additional parameter 1 | |
custom_filed_2 | N | additional parameter 2 |
Example
<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/unreference_refund.php" method="post"> <input type="text" name="username" value="msdusername"/> <input type="text" name="api_key" value="msdapikey"/> <input type="text" name="creditcard_number" id="creditcard_number" value="4111111111111111"/> <input type="text" name="expire_month" value="06"/> <input type="text" name="expire_year" value="2025"/> <input type="text" name="amount" value="4.5"/> <input type="text" name="currency" value="USD"/> <input type="text" name="company_name" value="MSD"/> <input type="text" name="first_name" value="Roberto"/> <input type="text" name="last_name" value="Diaz"/> <input type="text" name="address" value="4446 Green Avenue, Suite 56"/> <input type="text" name="city" value="Los Angeles"/> <input type="text" name="state" value="CA"/> <input type="text" name="country_code" value="US"/> <input type="text" name="zip_code" value="11111"/> <input type="text" name="phone_number" value="323-323-3223"/> <input type="text" name="client_ip" value="127.0.0.1"/> <input type="text" name="email" value="[email protected]"/> <input type="checkbox" name="email_receipt" value="Y"/> <br/> <input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" /> </form> <script type="text/javascript" > function MSDClientCallback(responseCode, responseMessage, proxyNumber){ if(responseCode == "A01"){ document.getElementById('creditcard_number').value = proxyNumber; document.getElementById("formID").submit(); } else{ alert(responseMessage); return false; } } </script>
The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three elements are returned, code, description, and transaction_id. The response code is always 00 for a successful API call.
{"response":{"code":"00", "transaction_id":102, "amount":4.5, "description":" Your transaction is approved."}}