MSD

Developer Hub

Next-Gen
Payments
Commerce
integration

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

Vault API

Sandbox endpoint URL:

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

Example:

https://gateway2-stg.merchantservicedepot.com/apis/add-card-vault.php

Production endpoint URL:

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

Add Card

Add Card API

This API is responsible to store Card information inside MSD Vault.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/add-card-vault.php

Method of form submission

POST

Proxynization APIs

POST

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 Add Card API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
creditcard_numberCredit Card NumberY4111111111111111
expiry_monthExpiry Month of the Credit CardY06
expiry_yearExpiry Year of the Credit CardY2025
card_holder_nameCard holder's name of the Credit CardYRoberto Diaz

Example

Card Details

Card Details API

This API is responsible to retrieve card details from Vault.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/get-card-details.php

Method of form submission

POST

This table describes the request parameters for Card Details API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
tokenUnique token number, get it during creating a new card vaultYXXXXXXXXXXXXXXXXXXXXXXXXX

Example

<form name="" id="formID" action="https://portal.merchantservicedepot.com/apis/get-card-details.php" method="post">
  <input type="text" name="username" value=" msdusername"/>
  <input type="text" name="api_key" value=" msdapikey"/>
  <input type="text" name="token" value="XXXXXXXXXXXXXXXXXXXXXXXXX"/>
  <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 details. The response code is always 00 for a successful API call.

Sample Response

{ "response": { "code": "00", "description": "success", "details": { "token": "XXXXXXXXXXXXXXXXXXXXXXXXX", "card_holder_name": "Test card holder name", "creditcard_number": "400551******0013", "expiry_month": "06", "expiry_year": "2025" } } }

Delete Card

Delete Card API

This API is responsible to delete secure card details from Vault.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/delete-card-vault.php

Method of form submission

POST

This table describes the request parameters for Delete Card API.

Variable NameDescriptionRequiredExpected Values
usernameTCB Pay Gateway UsernameYTCB Pay Gateway Username
api_keyTCB Pay Gateway API KeyYTCB Pay Gateway API Key
tokenUnique token number, get it during creating a new card vaultYXXXXXXXXXXXXXXXXXXXXXXXXX

Example

<form name="" action="https://portal.merchantservicedepot.com/apis/delete-card-vault.php" method="post">
  <input type="text" name="username" value=" msdusername"/>
  <input type="text" name="api_key" value=" msdapikey"/>
  <input type="text" name="token" value=""/>
  <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 token. The response code is always 00 for a successful API call.

 

Sample Response

{"response":{"code":"00","description":"Card Vault is successfully deleted","token":"XXXXXXXXXXXXXXXXXXXXXXXXX"}}

Sale

Sale API

This API is responsible for creating new payment transactions.

URL to call

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

Method of form submission

POST

This table describes the request parameters for Sale 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.YXXXXXXXXXXXXXXXXXXXXXXXXX
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 customerN-
first_nameFirst name of Account HolderYRoberto
last_nameLast name of Account HolderYDiaz
addressAddress of the customerN4446 Green Avenue, Suite 56
cityCity of the customerNLos Angeles
stateState of the customerNCA
country_codeCountry of the customer(ISO alpha-2)YUS, CN
zip_codeZip code of the customerY94085
phone_numberPhone Number of the customerN408-345-2323
emailEmail ID of the customerY[email protected]
email_receiptSend transaction details to a specified 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
sourceCsource=SHOPIFY if using Shopify 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="card_token" id="card_token" value="XXXXXXXXXXXXXXXXXXXXXXXXX"/>
  <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"  />
</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":" Transaction Entry Success","transaction_id":102," total_amount":15.7," convenience_fee":1.2}}

Authorize

Authorize API

This API is responsible to perform pre-authorization payment.

URL to call

https://gateway2-stg.merchantservicedepot.com/apis/authorize.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
card_tokenGet a token during Add Card Vault API.CXXXXXXXXXXXXXXXXXXXXXXXXX
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 customerN-
first_nameFirst name of Account HolderYRoberto
last_nameLast name of Account HolderYDiaz
addressAddress of the customerN4446 Green Avenue, Suite 56
cityCity of the customerNLos Angeles
stateState of the customerNCA
country_codeCountry of the customer(ISO alpha-2)YUS, CN
zip_codeZip code of the customerY94085
phone_numberPhone Number of the customerN408-345-2323
e-mailEmail ID of the customerY[email protected]
e-mail receiptSend transaction details to a specified emailNY or N (default value N)
Y- Send email
N- Not send
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="card_token" id="card_token" value="XXXXXXXXXXXXXXXXXXXXXXXXX"/>
  <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"  />
</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"}}

Response Codes

Add Plan

CodeDescription
01Username is missing or invalid
02Credit Card is missing or invalid
03Expiry Month missing or invalid
04Expiry Year missing or invalid
05Expiry Date is invalid
06CVV missing or invalid
07Card holder's Name missing or Credit Card Number missing
08Token Missing
09API Key is missing or invalid
21Message contains words that have been identified as profanity and this message has been blocked due to company policy. Please try again.
23Token does not exist
26Potential duplicate transaction
UNUnknown error, please contact an administrator
FYour transaction is declined
00Transaction entry is successful