MSD

Developer Hub

Next-Gen
Payments
Commerce
integration

We are here 24/7, keeping an eye on things and making sure everything runs smoothly.

Credit Card API

Sandbox endpoint URL:

https://gateway2-stg.merchantservicedepot.com/apis/{method}

Example:

https://gateway2-stg.merchantservicedepot.com/apis/sale.php

Production endpoint URL:

https://portal.merchantservicedepot.com/apis/{method}

Sale

Sale API

This API is responsible for creating new payment transactions, and this API is compatible with both encrypted and plain credit card methods of transactions.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/sale.php

Method of form submission

POST

Proxynization APIs

Sandbox

https://gateway2-stg.merchantservicedepot.com/services/proxynization_api.js

Production

https://portal.merchantservicedepot.com/services/proxynization_api.js

  1. Include proxynization_api.js script file. Please copy the following lines and paste them to your HTML page to enable the proxynization functionality within your application.

Example

<script type="text/javascript" src="https://[server-name]/services/proxynization_api.js"></script>

2Implement 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.

Example

<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>
  

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.

Example

<input type="button" value="submit" onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />

This table describes the request parameters for Authorize API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
card_tokenGet 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.CXXXXXXXXXXXXXXXXXXXXXXXXX
creditcard_numberCredit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required.C4111111111111111
expire_monthExpiry Month of the Credit Card. This is not required if you use a card token number.C06
expire_yearExpiry Year of the Credit Card. This is not required if you use a card token number.C2025
cvvCVV of the Credit Card.
Change CVV requirement as optional/mandatory from merchant's account settings for all transactions.C123
use_secret_keySet 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.NY or N (default value N)
Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption
amountAmount to be chargedY133.24
currencyCurrency of Transaction (allowed currencies will be determined during the time of merchant boarding).YUSD,EUR,GBP,CAD,AUD,NZD,AED,
DKK,MXN,SEK,CHF
company_nameCompany Name of the cardholderN-
first_nameFirst name of the cardholderYRoberto
last_nameLast name of the cardholderYDiaz
addressAddress of the cardholderN4446 Green Avenue, Suite 56
cityCity of the cardholderNLos Angeles
stateState of the cardholderNCA
country_codeCountry of the cardholder(ISO alpha-2)YUS, CN
zip_codeZip code of the cardholderY94085
phone_numberPhone Number of the cardholderN408-345-2323
ship_address_as_bill_addressBilling address copy Shipping addressYY or N (default value N) Y- Billing address copy to Shipping address N- Not copy
ship_company_nameShipping Company NameN-
ship_first_nameShipping First nameYRoberto
ship_last_nameShipping Last nameYDiaz
ship_addressShipping AddressN4446 Green Avenue, Suite 56
ship_cityShipping CityNLos Angeles
ship_stateShipping StateNCA
ship_country_codeShipping Country (ISO alpha-2)YUS, CN
ship_zip_codeShipping Zip codeY94085
ship_phone_numberShipping Phone NumberN408-345-2323
emailEmail ID of the cardholderY[email protected]
email_receiptSends transaction details to specified cardholder emailNY or N (default value N) Y- Send email N- Not send
emailReceiptDBAEmailEmail Receipt to Merchant DBA Contact EmailNY or N (default value N) Y- Send email N- Not send
memoMemo of the transactionN
client_ipClient IP addressN127.0.0.1
custom_field_1Nadditional parameter 1
custom_filed_2Nadditional parameter 2
sourceCsource=SHOPIFY if using Shopify otherwise it is not required
3ds_redirect_urlRedirect to this URL after 3D-Secure authenticationN
(To process transactions with 3DS, contact TCB Pay to enable 3DS and set 'Denied Payment Transaction' or 'Continue Payment Transaction' for non-3DS transactions).Cif using 3D-Secure then it is required otherwise it is not required.
reference_idTransaction reference idNReference ID should be unique

Example

  <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>

Response

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.

 

Sample Response

{"response":{"code":"00","description":" Transaction Entry Success","transaction_id":102," total_amount":15.7," convenience_fee":1.2}}

Sample Response for 3D-Secure

{"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.

ANI

ANI API

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.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/account_validation.php

Method of form submission

POST

Proxynization APIs

Sandbox

https://gateway2-stg.merchantservicedepot.com/services/proxynization_api.js

Production

https://portal.merchantservicedepot.com/services/proxynization_api.js

  1. Include proxynization_api.js script file. Please copy the following lines and paste them to your HTML page to enable the proxynization functionality within your application.

Example

<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.

Example

<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.

Example

<input type="button" value="submit"  onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />

This table describes the request parameters for ANI API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
creditcard_numberCredit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required.C4111111111111111
expire_monthExpiry Month of the Credit Card. This is not required if you use a card token number.C06
expire_yearExpiry Year of the Credit Card. This is not required if you use a card token number.C2025
cvvCVV of the Credit Card.
Change CVV requirement as optional/mandatory from merchant's account settings for all transactions.C123
use_secret_keySet 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.NY or N (default value N)
Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption
amountAmount to be chargedY133.24
currencyCurrency of Transaction (allowed currencies will be determined during the time of merchant boarding).YUSD,EUR,GBP,CAD,AUD,NZD,AED,
DKK,MXN,SEK,CHF
company_nameCompany Name of the cardholderN-
first_nameFirst name of the cardholderYRoberto
last_nameLast name of the cardholderYDiaz

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"00","description":"Successful","nameMatchDecision": "string","lastNameMatchDecision": "string","firstNameMatchDecision": "string","middleNameMatchDecision": "string"}}

Apple Pay

Apple Pay API

This API is responsible for creating new payment transactions using Apple Pay.

 

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/apple_sale.php

Method of form submission

POST

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.

Proxynization APIs

Sandbox

https://gateway2-stg.merchantservicedepot.com/services/applePaySandbox.js

Production

https://portal.merchantservicedepot.com/services/applePay.js

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.

  1. Include applePay.js script file. Please copy the following lines and paste them to your HTML page to enable the Apple Pay functionality within your application.

Example

<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.

Example

/* 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.

 

This table describes the request parameters for Apple pay js.

Variable NameDescriptionRequiredExpected Values
app_keyThis is MD5 of TCB Pay Gateway Username and 16 digit Secret keyYIf Username is test and Secret key is abcdefgh12345678 app_key=MD5(testabcdefgh12345678)
business_nameDisplay this name in Apple Pay windowYTest shop
amountAmount to be chargedY100.00
currencyCurrency of TransactionYUSD

Example

<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>

This table describes the request parameters for Authorize API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
signature_tokenGet a token from TCBPayApplePay.paymentResponseY{"identifyKey":"test","data":"test",
"ephemeralPublicKey":"test","publicKeyHash":"test",
"transactionId":"test","signature":"test",
"version":"EC_v1","displayName":"MasterCard 1111",
"network":"MasterCard","type":"credit"}
company_nameCompany Name of the cardholderN-
first_nameFirst name of the cardholderYRoberto
last_nameLast name of the cardholderYDiaz
addressAddress of the cardholderN4446 Green Avenue, Suite 56
cityCity of the cardholderNLos Angeles
stateState of the cardholderNCA
country_codeCountry of the cardholder(ISO alpha-2)YUS, CN
zip_codeZip code of the cardholderY94085
phone_numberPhone Number of the cardholderN408-345-2323
emailEmail ID of the cardholderY[email protected]
email_receiptSends transaction details to specified cardholder emailNY or N (default value N) Y- Send email N- Not send
emailReceiptDBAEmailEmail Receipt to Merchant DBA Contact EmailNY or N (default value N) Y- Send email N- Not send
memoMemo of the transactionN
client_ipClient IP addressN127.0.0.1
custom_field_1Nadditional parameter 1
custom_filed_2Nadditional parameter 2

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"00","description":" Transaction Entry Success","transaction_id":102," total_amount":15.7}}

Authorize

Authorize API

This API is responsible for performing pre-authorization payments, and this API is
compatible with both encrypted and plain credit card methods of transactions.

 

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/authorize.php

Method of form submission

POST

Proxynization APIs

Sandbox

https://gateway2-stg.merchantservicedepot.com/services/proxynization_api.js

Production

https://portal.merchantservicedepot.com/services/proxynization_api.js

  1. Include proxynization_api.js script file. Please copy the following lines and paste them to your HTML page to enable the proxynization functionality within your application.

Example

<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.

Example

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.
 

Example

<input type="button" value="submit"  onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />

This table describes the request parameters for Authorize API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
card_tokenGet 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.CXXXXXXXXXXXXXXXXXXXXXXXXX
creditcard_numberCredit Card Number that is used to complete the sale. If you use a card token number, the credit card number is not required.C4111111111111111
expire_monthExpiry Month of the Credit Card. This is not required if you use a card token number.C06
expire_yearExpiry Year of the Credit Card. This is not required if you use a card token number.C2025
cvvCVV of the Credit CardY123
amountAmount to be chargedY133.24
currencyCurrency of Transaction (allowed currencies will be determined during the time of merchant boarding).YUSD,EUR,GBP,CAD,AUD,NZD,AED,
DKK,MXN,SEK,CHF
company_nameCompany Name of the cardholderN-
first_nameFirst name of the cardholderYRoberto
last_nameLast name of the cardholderYDiaz
addressAddress of the cardholderN4446 Green Avenue, Suite 56
cityCity of the cardholderNLos Angeles
stateState of the cardholderNCA
country_codeCountry of the cardholder(ISO alpha-2)YUS, CN
zip_codeZip code of the cardholderY94085
phone_numberPhone Number of the cardholderN408-345-2323
ship_address_as_bill_addressBilling address copy Shipping addressYY or N (default value N) Y- Billing address copy to Shipping address N- Not copy
ship_company_nameShipping Company NameN-
ship_first_nameShipping First nameYRoberto
ship_last_nameShipping Last nameYDiaz
ship_addressShipping AddressN4446 Green Avenue, Suite 56
ship_cityShipping CityNLos Angeles
ship_stateShipping StateNCA
ship_country_codeShipping Country (ISO alpha-2)YUS, CN
ship_zip_codeShipping Zip codeY94085
ship_phone_numberShipping Phone NumberN408-345-2323
emailEmail ID of the cardholderY[email protected]
email_receiptSends transaction details to specified cardholder emailNY or N (default value N) Y- Send email N- Not send
emailReceiptDBAEmailEmail Receipt to Merchant DBA Contact EmailNY or N (default value N) Y- Send email N- Not send
memoMemo of the transactionN
client_ipClient IP addressN127.0.0.1
reference_idTransaction reference idNReference ID should be unique

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"01","description":" Merchant Information is Missing"}}

Capture

Capture API

This API is responsible to capture an existing authorization transaction.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/capture.php

Method of form submission

POST

This table describes the request parameters for Capture API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
transaction_idUnique transaction ID generated by the GatewayY-
amountAmount to be charged, <= original transaction amountY133.24
email_receiptSend transaction details to the specified email during authorizationNY or N (default value N) Y- Send email N- Not send

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"01","description":" Merchant Information is Missing"}}

Void

Void API

This API is responsible for canceling an existing transaction.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/void.php

Method of form submission

POST

This table describes the request parameters for Void API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
transaction_idUnique transaction ID generated by the GatewayY-
email_receiptSends transaction details to specified email during authorizationNY or N (default value N) Y- Send email N- Not send

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"01","description":" Merchant Information is Missing"}}

Refund

Refund API

This API is responsible for refunding an existing successful transaction.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/refund.php

Method of form submission

POST

This table describes the request parameters for Authorize API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
transaction_idUnique transaction ID generated by gatewayY-
amountAmount to be charged, <= original transaction amountY133.24
email_receiptSend transaction details to the specified email during authorizationNY or N (default value N) Y- Send email N- Not send

Example

<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>

Response

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.

 

Sample Response

{"response":{"code":"01","description":" Merchant Information is Missing"}}

Report

Report API

This API is responsible for generating transaction reports.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/report.php

Method of form submission

POST

This table describes the request parameters for Report API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
start_dateFrom transaction dateYdate format YYYY-MM-DD
end_dateTo transaction dateYdate format YYYY-MM-DD
transaction_typeType of transactionN(default all transaction) SALE,AUTHORIZE,CAPTURE,REFUND,VOID,CREDIT
transaction_statusStatus of transactionN(default all transaction) SUCCESS,FAIL
transaction_idTCBPay ID of the transaction, If we need to know the details of a specific transactionN100000000000001605
page_noPage number of the entire result set. Each page has a maximum of 100 records listedN(default 1) can be upto total page number
reference_idTransaction reference idNReference ID should be unique

Example

<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>

Response

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.

 

Sample Response

{                    
    "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": ""         
            }               
        ]               
    }                 
}

Response Codes

CodeDescription
01Username is missing or invalid
02Credit Card is missing or invalid
03Expiration Date is missing or invalid
04First/Last Name is missing
05Invalid Country Code
06The proper cardholder Email ID is missing
07Invalid Amount
08Transaction Currency is missing
09API Key is missing or invalid
10Requested Currency is not allowed for this merchant
11Couldn't process a transaction due to load balancer rules
12The transaction ID is missing or invalid
13Refund is not possible, the transaction has already been voided.
14Refund is not possible, it exceeds Actual Amount
15Capture is not possible
16Void is not possible
17Sale limit exceeded
18Monthly limit exceeded
19Transaction limit exceeded
20IP/Transaction limit exceeded
21Message contains words that have been identified as profanity and this message has been blocked due to company policy. Please try again.
22IP Address is missing/invalid
23Date is invalid date format
24Transaction Type not valid
25Transaction Status not valid
26Potential duplicate transaction
A1Transaction entry failed
A2Transaction update failed
P1Invalid page number
UNUnknown error, please contact an administrator
FYour transaction is declined
00Transaction entry is successful

Unreferenced Refund

Unreferenced Refund API

This API is responsible for creating new payment transactions, and this API is compatible
with both encrypted and plain credit card methods of transactions.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/unreference_refund.php

Method of form submission

POST

Proxynization APIs

Sandbox

https://gateway2-stg.merchantservicedepot.com/services/proxynization_api.js

Production

https://portal.merchantservicedepot.com/services/proxynization_api.js

  1. Include proxynization_api.js script file. Please copy the following lines and paste them to your HTML page to enable the proxynization functionality within your application.

Example

<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.

Example

<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.

Example

<input type="button" value="submit"  onClick="MSDProxynizationAPI.process('#creditcard_number','msdClientCallback');" />

This table describes the request parameters for Authorize API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
creditcard_numberCredit Card Number that is used to complete an Unreferenced Refund. This is not required if a card token number is used.C4111111111111111
expire_monthExpiry Month of the Credit Card. This is not required if a card token number is used.C06
expire_yearExpiry Year of the Credit Card. This is not required if a card token number is used.C2025
use_secret_keySet 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.NY or N (default value N)
Y- encrypt creditcard_number using AES 128 bit ECB cipher mode encryption
amountAmount to be chargedY133.24
currencyCurrency of Transaction (allowed currencies will be determined during the time of merchant boarding).YUSD,EUR,GBP,CAD,AUD,NZD,AED,
DKK,MXN,SEK,CHF
company_nameCompany Name of the cardholderN-
first_nameFirst name of the cardholderYRoberto
last_nameLast name of the cardholderYDiaz
addressAddress of the cardholderN4446 Green Avenue, Suite 56
cityCity of the cardholderNLos Angeles
stateState of the cardholderNCA
country_codeCountry of the cardholder(ISO alpha-2)YUS, CN
zip_codeZip code of the cardholderY94085
phone_numberPhone Number of the cardholderN408-345-2323
emailEmail ID of the cardholderY[email protected]
email_receiptSends transaction details to specified cardholder emailNY or N (default value N) Y- Send email N- Not send
emailReceiptDBAEmailEmail Receipt to Merchant DBA Contact EmailNY or N (default value N) Y- Send email N- Not send
client_ipClient IP addressN127.0.0.1
custom_field_1Nadditional parameter 1
custom_filed_2Nadditional 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>

Response

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.

 

Sample Response

{"response":{"code":"00", "transaction_id":102, "amount":4.5, "description":" Your transaction is approved."}}