MSD

Developer Hub

Next-Gen
Payments
Commerce
integration

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

ACH

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.

 

Sandbox endpoint URL:

https://gateway2-stg.www.merchantservicedepot.com/apis/ach_sale.php

Production endpoint URL

https://portal.www.merchantservicedepot.com/apis/ach_sale.php

Method of form submission

POST

This table describes the request parameters for Sale API.

Variable NameDescriptionRequiredExpected Value
usernameMerchant service depot Gateway UsernameYMerchant service depot Gateway Username
api_keyMerchant service depot Gateway API KeyYMerchant service depot Gateway API Key
account_number Bank account number
(Set the secret key in the account setting to encrypt account_number. Make sure to encrypt account_number with AES 128-bit ECB cipher code.)
Y0000000016
routing_numberBank routing number
(Set the secret key in the account setting to encrypt routing_number. Make sure to encrypt routing_number with AES 128-bit ECB cipher code.)
Y122105278
account_typeBank account typeYSAVINGS, CHECKING, OTHER
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 cardholderYtest@test.com
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_field_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://gateway2-stg.tcbpay.com/apis/ach_sale.php" method="post">
<input type="text" name="username" value="tcbpayusername"/>
<input type="text" name="api_key" value="tcbpayapikey"/>
<input type="text" name="account_number" value="0000000016"/>
<input type="text" name="routing_number" value="122105278"/>
<input type="text" name="account_type" value="CHECKING"/>
<input type="text" name="amount" value="14.5"/>
<input type="text" name="currency" value="USD"/>
<input type="text" name="company_name" value="Merchant service depot"/>
<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="abcdef@mail.com"/>
<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, transaction_id, and reference_id. The response code for a successful API call is always 00.

 

Sample Response :

{"response":{"code":"00","description":"Transaction Entry Success","transaction_id":8405,"total_amount":9.99,"convenience_fee":0,"reference_id":""}}

ACH

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

 

Sandbox endpoint URL:

https://gateway2-stg.www.merchantservicedepot.com/apis/ach_credit.php

Production endpoint URL

https://portal.www.merchantservicedepot.com/apis/ach_credit.php

Method of form submission

POST

This table describes the request parameters for Credit API.

Variable NameDescriptionRequiredExpected Value
usernameMerchant service depot Gateway UsernameYMerchant service depot Gateway Username
api_keyMerchant service depot Gateway API KeyYMerchant service depot Gateway API Key
account_numberBank account number
(Set the secret key in the account setting to encrypt account_number. Make sure to encrypt account_number with AES 128-bit ECB cipher code.)
Y0000000016
routing_numberBank routing number
(Set the secret key in the account setting to encrypt routing_number. Make sure to encrypt routing_number with AES 128-bit ECB cipher code.)
Y122105278
account_typeBank account typeYSAVINGS, CHECKING, OTHER
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 cardholderYtest@test.com
email_receiptSends transaction details to specified cardholder emailNY or N (default value N) Y- Send email N- Not send
email_receipt_DBA_emailEmail 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_field_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://gateway2-stg.tcbpay.com/apis/ach_credit.php" method="post">
<input type="text" name="username" value="tcbpayusername"/>
<input type="text" name="api_key" value="tcbpayapikey"/>
<input type="text" name="account_number" value="0000000016"/>
<input type="text" name="routing_number" value="122105278"/>
<input type="text" name="account_type" value="CHECKING"/>
<input type="text" name="amount" value="14.5"/>
<input type="text" name="currency" value="USD"/>
<input type="text" name="company_name" value="Merchant service depot"/>
<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="abcdef@mail.com"/>
<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, transaction_id, and reference_id. The response code for a successful API call is always 00.

 

Sample Response :

{"response":{"code":"00","description":"Transaction Entry Success","transaction_id":8405,"total_amount":9.99,"convenience_fee":0,"reference_id":""}}

ACH

Refund API

This API is responsible for refunding an existing successful transaction.

 

Sandbox endpoint URL:

https://gateway2-stg.www.merchantservicedepot.com/apis/ach_refund.php

Production endpoint URL

https://portal.www.merchantservicedepot.com/apis/ach_refund.php

Method of form submission

POST

This table describes the request parameters for Refund API.

Variable NameDescriptionRequiredExpected Value
usernameMerchant service depot Gateway UsernameYMerchant service depot Gateway Username
api_keyMerchant service depot Gateway API KeyYMerchant service depot 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://gateway2-stg.tcbpay.com/apis/ach_refund.php" method="post">
<input type="text" name="username" value=" tcbpayusername"/>
<input type="text" name="api_key" value=" tcbpayapikey"/>
<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"}}

ACH

Report API

This API is responsible for generating transaction reports.

 

Sandbox endpoint URL:

https://gateway2-stg.www.merchantservicedepot.com/apis/ach_report.php

Production endpoint URL

https://portal.www.merchantservicedepot.com/apis/ach_report.php

Method of form submission

POST

This table describes the request parameters for Report API.

Variable NameDescriptionRequiredExpected Value
usernameMerchant service depot Gateway UsernameYMerchant service depot Gateway Username
api_keyMerchant service depot Gateway API KeyYMerchant service depot 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 up to total page number
reference_idTransaction reference idNReference ID should be unique

Example

<html lang="en">
<head>
<meta charset="UTF-8">
<title>Merchant service depot ACH API Report Test</title>
</head>
<body>
<form name="" action="https://gateway2.tcbpay.com/apis/ach_report.php"
method="post">
<input type="text" name="username" value="tcbpayusername"/>
<input type="text" name="api_key" value="tcbpayapikey"/>
<input type="text" name="start_date" value="2019-04-01"/>
<input type="text" name="end_date" value="2019-04-15"/>
<br/>
<input type="submit" value="submit"/>
</form>
</body>
</html>

Response:

The response of the API Call is a JSON array. For Error, two elements are returned, code and description. For Successful transactions, three additional elements are returned along with code and description which are no_of_transactions, total_pages, current_page, and an array of transactions. The response code is always 00 for a successful API call.

 

Sample Response :

{
  "response": {
    "code": "00",
    "description": "success",
    "no_of_transactions": "1",
    "total_pages": 1,
    "current_page": "1",
    "transactions": [
      {
        "transaction_id": "A9169",
        "parent_transaction_id": "",
        "transaction_type": "SALE",
        "transaction_source": "Moto",
        "initiated_by": "api_user (goutam@mailinator.com)",
        "transaction_status": "INACTIVE",
        "decline_reason": "",
        "transaction_time": "2025-01-30 07:20:49",
        "time_zone": "America/New_York",
        "gmt_time": "2025-01-30 12:20:49",
        "account_no": "********2222",
        "routing_no": "********0025",
        "account_type": "Checking",
        "auth_response_code": "Success",
        "error_response": "",
        "currency": "USD",
        "total_amount": "8.88",
        "amount": "8.88",
        "surcharge": "0",
        "tax": "0",
        "tip": "0",
        "first_name": "Grk",
        "last_name": "Karm",
        "company_name": "",
        "address_1": "555 West 5th Avenue",
        "address_2": "bill 2nd",
        "city": "Columbus",
        "state": "OH",
        "zip_code": "43201",
        "email": "goutam@tcbpay.com",
        "phone_no": "+19999999999",
        "subscription_id": null,
        "ship_first_name": "Grk",
        "ship_last_name": "Karm",
        "ship_company_name": "",
        "ship_address_1": "555 West 5th Avenue",
        "ship_address_2": "bill 2nd",
        "ship_city": "Columbus",
        "ship_state": "OH",
        "ship_zip_code": "43201",
        "ship_phone_no": "+19999999999",
        "is_risk_hold": "NO",
        "IP": null,
        "reference_id": null
      }
    ]
  }
}

Error Codes

Error CodeDescription
01Merchant Information is Missing
02Transaction Currency is missing
03Account Number is missing or Invalid
04Routing Number is missing or invalid
05Check Number is missing or invalid
06Invalid Amount
07Account Type is Missing
08Proper Zip code is missing
09Proper Customer Email Id is missing
10Invalid Processor
11Requested Currency is not allowed for this merchant
12Invalid Merchant Information
13Invalid Country Code
14Sale Volume exceeded for this Merchant
15Monthly Volume exceeded for this Merchant
16Transaction limit exceeded for this Merchant
17IP-wise transaction limit exceeded for this Merchant
18Bank Name is missing
19Transaction Start Date is missing or invalid
20Transaction End Date is missing or invalid
P1Invalid page number
A1Transaction entry failed

ACH

Country List

Country CodeCountry Name
USUnited States
CACanada

ACH

Currency List

Currency CodeCurrency Name
USDUnited States Dollar

ACH

Response Codes

CodeDescription
01Merchant Information is Missing
02Transaction Currency is missing
03Account Number is missing or Invalid
04Routing Number is missing or invalid
05Check Number is missing or invalid
06Invalid Amount
07Account Type is Missing
08Proper Zip code is missing
09Proper Customer Email Id is missing
10Invalid Processor
11Requested Currency is not allowed for this merchant
12Invalid Merchant Information
13Invalid Country Code
14Sale Volume exceeded for this Merchant
15Monthly Volume exceeded for this Merchant
16Transaction limit exceeded for this Merchant
17IP-wise transaction limit exceeded for this Merchant
18Bank Name is missing
19Transaction Start Date is missing or invalid
20Transaction End Date is missing or invalid
P1Invalid page number
A1Transaction entry failed