Developers

Bringing business and technology together

TCB Pay offers plenty of integrations so you can give your customer the best shopping experience.

dev

Credit Card

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}

Example: https://gateway2-stg.tcbpay.com/apis/sale.php

Production endpoint URL: https://gateway2.tcbpay.com/apis/{method}

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.tcbpay.com/apis/sale.php
Method of Form Submission: POST

Proxynization APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/proxynization_api.js
  • Production: https://gateway2.tcbpay.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 tcbpayClientCallback(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="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                
                              

This table describes the request parameters for Sale API.

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
email Email ID of the cardholder Y test@test.com
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
(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.

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/sale.php" method="post">
                                  <input type="text" name="username" value="tcbpayusername"/>
                                  <input type="text" name="api_key" value="tcbpayapikey"/>
                                  <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="TCB Pay"/>
                                  <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="button" value="submit" onClick="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                  </form>
                                  <script type="text/javascript" >
                                  function tcbpayClientCallback(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://gateway2.tcbpay.com/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

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.tcbpay.com/apis/authorize.php
Method of Form Submission: POST

Proxynization APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/proxynization_api.js
  • Production: https://gateway2.tcbpay.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 tcbpayClientCallback(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="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                
                              
This table describes the request parameters for Authorize API.
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
email Email ID of the cardholder Y test@test.com
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

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/authorize.php" method="post">
                                  <input type="text" name="username" value="tcbpayusername"/>
                                  <input type="text" name="api_key" value="tcbpayapikey"/>
                                  <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="TCB Pay"/>
                                  <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="abcdef@mail.com"/>
                                  <input type="checkbox" name="email_receipt"  value="Y"/>
                                  <br/>
                                  <input type="button" value="submit" onClick="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                  </form>
                                  <script type="text/javascript" >
                                  function tcbpayClientCallback(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 API:

This API is responsible to capture an existing authorization transaction.

URL To Call: https://gateway2.tcbpay.com/apis/ capture.php
Method of Form Submission: POST
This table describes the request parameters for Capture API.
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

Example:

                                  
                                  <form name="" action="https://gateway2.tcbpay.com/apis/capture.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 for a successful API call is always 00.


Sample Response :

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

Void API:

This API is responsible for canceling an existing transaction.

URL To Call: https://gateway2.tcbpay.com/apis/ void.php
Method of Form Submission: POST
This table describes the request parameters for Void API.
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

Example:

                                  
                                  <form name="" action="https://gateway2.tcbpay.com/apis/void.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="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 API:

This API is responsible for refunding an existing successful transaction.

URL To Call: https://gateway2.tcbpay.com/apis/ refund.php
Method of Form Submission: POST
This table describes the request parameters for Refund API.
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

Example :

                                  
                                  <form name="" action="https://gateway2.tcbpay.com/apis/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"}}

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.tcbpay.com/apis/unreference_refund.php
Method of Form Submission: POST

Proxynization APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/proxynization_api.js
  • Production: https://gateway2.tcbpay.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 tcbpayClientCallback(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="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                
                              

This table describes the request parameters for an Unreferenced Refund API

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 Email ID of the cardholder Y test@test.com
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://gateway2.tcbpay.com/apis/unreference_refund.php" method="post">
                                  <input type="text" name="username" value="tcbpayusername"/>
                                  <input type="text" name="api_key" value="tcbpayapikey"/>
                                  <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="TCB Pay"/>
                                  <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="button" value="submit" onClick="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                  </form>
                                  <script type="text/javascript" >
                                  function tcbpayClientCallback(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."}}

Apple Pay API

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

URL To Call: https://gateway2.tcbpay.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 reponse to processing API. All the steps are described below.
Apple Pay APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/applePaySandbox.js
  • Production: https://gateway2.tcbpay.com/services/applePay.js
TCB Pay 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://gateway2.tcbpay.com/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 TCBPayApplePay.paymentRequest function will be called when click on Apple Pay Button. This function accepts 4 parameters (app_key,business_name,amount,currency). The TCBPayApplePay.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.

Parameter 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

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

                                    TCBPayApplePay.paymentRequest(app_key,business_name,amount,currency);
                                }

                                TCBPayApplePay.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 Apple Sale API.

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 Email ID of the cardholder Y test@test.com
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

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/apple_sale.php" method="post">
                                  <input type="text" name="username" value="tcbpayusername"/>
                                  <input type="text" name="api_key" value="tcbpayapikey"/>
                                  <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="TCB Pay"/>
                                  <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/>
                                  <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";

                                        TCBPayApplePay.paymentRequest(app_key,business_name,amount,currency);
                                    }

                                    TCBPayApplePay.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, 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}}

Report API:

This API is responsible for generating transaction reports.

URL To Call: https://gateway2.tcbpay.com/apis/report.php
Method of Form Submission: POST
This table describes the request parameters for Report API.
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

Example :

                                  
                                  <form name="" action="https://gateway2.tcbpay.com/apis/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="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",
                "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": "tanumondal@gmail.com",
                "phone_no": "",
                "subscription_id": "",
                "is_risk_hold": "NO",
                "IP": "192.168.0.93"
            }
        ]
    }
}

Response Codes:

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

Settlement API:

This API is responsible for generating settlement reports.

URL To Call: https://gateway2.tcbpay.com/apis/settlement_report.php
Method of Form Submission: POST
This table describes the request parameters for Settlement API.
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 settlement date Y YYYY-MM-DD
end_date To settlement date N YYYY-MM-DD
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

Example :

                                  
                                  <html lang="en">
                                  <head>
                                  <meta charset="UTF-8">
                                  </head>
                                  <body>
                                  <form name="" action="https://gateway2.tcbpay.com/apis/settlement_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="2023-02-01"/>
                                  <input type="text" name="end_date" value="2023-06-21"/>
                                  <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 Success elements are : code, description, no_of_settlements, total_pages, current_page and array of settlement details. The response code is always 00 for a successful API call.


Sample Response :

                                    
                                    

{
    "response": {
        "code": "00",
        "description": "success",
        "no_of_settlements": 1,
        "total_pages": 1,
        "current_page": 1,
        "settlements": [
            {
                "settlement_date": "2023-06-18",
                "billing_type": "Monthly",
                "status": "Completed",
                "currency": "USD",
                "no_of_sale": "1",
                "sale_amount": "2.50",
                "no_of_capture": "0",
                "capture_amount": "0.00",
                "no_of_release_transaction": "0",
                "risk_release_amount": "0.00",
                "no_of_refund": "0",
                "refund_amount": "0.00",
                "no_of_credit": "0",
                "credit_amount": "0.00",
                "no_of_chargeback": "0",
                "chargeback_amount": "0.00",
                "fees": {
                    "setup_fee": "0.00",
                    "monthly_fee": "0.00",
                    "surcharge": "0.00",
                    "transaction_fee": "0.01",
                    "discount": "0.00",
                    "refund_fee": "0.00",
                    "chargeback_fee": "0.00",
                    "pci_fee": "0.00",
                    "statement_fee": "0.00",
                    "other_fees": "0.00"
                }
            }
        ]
    }
}

Response Codes:

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
A1 Transaction entry failed
A2 Transaction update failed
P1 Invalid page number
UN Unknown error, please contact an administrator
F Your transaction is declined
AVS Cardholder name, address, and ZIP do not match
3DSF Your transaction is declined due to 3D secure Authentication failure
00 Transaction entry is successful

Sandbox:

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}
Example: https://gateway2-stg.tcbpay.com/apis/sale.php

Test Credit Card Details:

For Apple Pay, card details(except discover) can be found here.

Card Number Type of use CVV
4005510000000013 Regular 123
4111111111111111 Regular 111
4012001037141112 Regular 083
5111111111111111 Regular 123
4018810000190011 (success OTP: 0101 , fail OTP: 3333) 3DS 123
5204730000001011 (success OTP: 4445 , fail OTP: 9999) 3DS 123

Vault

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}

Example: https://gateway2-stg.tcbpay.com/apis/sale.php

Production endpoint URL: https://gateway2.tcbpay.com/apis/{method}

Add Card API

This API is responsible to store Card information inside TCB Pay Vault

URL To Call: https://gateway2.tcbpay.com/apis/add-card-vault.php
Method of Form Submission: POST

Proxynization APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/proxynization_api.js
  • Production: https://gateway2.tcbpay.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 tcbpayClientCallback(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="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                
                              

This table describes the request parameters for Add Card API.

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 Y 4111111111111111
expiry_month Expiry Month of the Credit Card Y 06
expiry_year Expiry Year of the Credit Card Y 2025
card_holder_name Card holder's name of the Credit Card Y Roberto Diaz

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/add-card-vault.php" method="post">
                                  <input type="text" name="username" value=" tcbpayusername"/>
                                  <input type="text" name="api_key" value=" tcbpayapikey"/>
                                  <input type="text" name="creditcard_number" id="creditcard_number" value="4111111111111111"/>
                                  <input type="text" name="expiry_month" value="06"/>
                                  <input type="text" name="expiry_year" value="2025"/>
                                  <input type="text" name="card_holder_name" value="Roberto Diaz"/>
                                  <br/>
                                  <input type="button" value="submit" onClick="TCBPayProxynizationAPI.process('#creditcard_number','tcbpayClientCallback');" />
                                  </form>
                                  <script type="text/javascript" >
                                  function tcbpayClientCallback(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 token. The response code is always 00 for a successful API call.


Sample Response :

{"response":{"code":"00","description":"Card is successfully added to vault","token":XXXXXXXXXXXXXXXXXXXXXXXXX}}

Card Details API:

This API is responsible to retrieve card details from Vault.

URL To Call: https://gateway2.tcbpay.com/apis/ get-card-details.php
Method of Form Submission: POST
This table describes the request parameters for Card Details API.
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
token Unique token number, get it during creating a new card vault Y XXXXXXXXXXXXXXXXXXXXXXXXX

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/get-card-details.php" method="post">
                                    <input type="text" name="username" value=" tcbpayusername"/>
                                    <input type="text" name="api_key" value=" tcbpayapikey"/>
                                    <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 API:

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

URL To Call: https://gateway2.tcbpay.com/apis/ delete-card-vault.php
Method of Form Submission: POST
This table describes the request parameters for Delete Card API.
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
token Unique token number, get it during creating a new card vault Y XXXXXXXXXXXXXXXXXXXXXXXXX

Example:

                                  
                                  <form name="" action="https://gateway2.tcbpay.com/apis/delete-card-vault.php" method="post">
                                  <input type="text" name="username" value=" tcbpayusername"/>
                                  <input type="text" name="api_key" value=" tcbpayapikey"/>
                                  <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 API

This API is responsible for creating new payment transactions.

URL To Call: https://gateway2.tcbpay.com/apis/sale.php
Method of Form Submission: POST

This table describes the request parameters for Sale API.

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. Y XXXXXXXXXXXXXXXXXXXXXXXXX
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 customer N -
first_name First name of Account Holder Y Roberto
last_name Last name of Account Holder Y Diaz
address Address of the customer N 4446 Green Avenue, Suite 56
city City of the customer N Los Angeles
state State of the customer N CA
country_code Country of the customer(ISO alpha-2) Y US, CN
zip_code Zip code of the customer Y 94085
phone_number Phone Number of the customer N 408-345-2323
email Email ID of the customer Y test@test.com
email_receipt Send transaction details to a specified 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
source C source=SHOPIFY if using Shopify otherwise it is not required

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/sale.php" method="post">
                                    <input type="text" name="username" value=" tcbpayusername"/>
                                    <input type="text" name="api_key" value=" tcbpayapikey"/>
                                    <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="TCB Pay"/>
                                    <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="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, total_amount, and convenience_fee. 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}}

Authorize API:

This API is responsible to perform pre-authorization payment

URL To Call: https://gateway2.tcbpay.com/apis/ authorize.php
Method of Form Submission: POST
This table describes the request parameters for Authorize API.
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. C XXXXXXXXXXXXXXXXXXXXXXXXX
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 customer N -
first_name First name of Account Holder Y Roberto
last_name Last name of Account Holder Y Diaz
address Address of the customer N 4446 Green Avenue, Suite 56
city City of the customer N Los Angeles
state State of the customer N CA
country_code Country of the customer(ISO alpha-2) Y US, CN
zip_code Zip code of the customer Y 94085
phone_number Phone Number of the customer N 408-345-2323
e-mail Email ID of the customer Y test@test.com
e-mail receipt Send transaction details to a specified email N Y or N (default value N)
Y- Send email
N- Not send
client_ip Client IP address N 127.0.0.1

Example:

                                  
                                  <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/authorize.php" method="post">
                                    <input type="text" name="username" value=" tcbpayusername"/>
                                    <input type="text" name="api_key" value=" tcbpayapikey"/>
                                    <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="TCB Pay"/>
                                    <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="abcdef@mail.com"/>
                                    <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:

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

Sandbox:

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}
Example: https://gateway2-stg.tcbpay.com/apis/add-card-vault.php

Test Credit Card Details:

Card Number CVV
4005510000000013 123
4111111111111111 111
4012001037141112 083
5111111111111111 123

ACH

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}

Example: https://gateway2-stg.tcbpay.com/apis/sale.php

Production endpoint URL: https://gateway2.tcbpay.com/apis/{method}

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.tcbpay.com/apis/ach_sale.php
Method of Form Submission: POST
This table describes the request parameters for Sale API.
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
currency Currency of Transaction Y USD
account_number Account Number of the customer Y 201534353553
routing_number Routing Number of the customer Y 124343435
amount Amount of the check Y 133.24
account_type Account Type of the customer Y CHECKING, SAVINGS
first_name First name of Account Holder N Roberto
last_name Last name of Account Holder N Diaz
address Address of the customer N 4446 Green Avenue, Suite 56
city City of the customer N Los Angeles
state State of the customer N CA
country_code Country of the customer N US,CA (Follow Country List below)
zip_code Zip code of the customer N 94085
phone_number Phone Number of the customer N 408-345-2323
e-mail Email ID of the customer N test@test.com
custom_field_1 Custom value 1 N -
custom_filed_2 Custom value 2 N -
custom_filed_3 Custom value 3 N -

Example:

                                  
                                  <html lang="en">
                                  <head>
                                  <meta charset="UTF-8">
                                  <title>TCB Pay ACH API Test</title>
                                  </head>
                                  <body>
                                  <form name="" action="https://gateway2.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="currency" value="USD"/>
                                  <input type="text" name="account_number" value="201534"/>
                                  <input type="text" name="routing_number" value="124343435"/>
                                  <input type="text" name="amount" value="133.24"/>
                                  <input type="text" name="account_type" value="personal"/>
                                  <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="zip_code" value="94085"/>
                                  <input type="text" name="country_code" value="209"/>
                                  <input type="text" name="email" value="test@test.com"/>
                                  <input type="text" name="phone_number" value="408-345-2323"/>
                                  <br/>
                                  <input type="submit" value="submit"/>
                                  </form>
                                  </body>
                                  </html>
                                  
                                

Response:

The response Type of the API Call is a JSON array. For Error, Elements are error_code and error_ description, and for Successful transactions, Two Elements are returned. success_code, success_description. success_code is always 00.


Sample Response :

{"response":{"code":"03","description":"Account Number is Missing or Invalid"}}

Report API:

This API is responsible for generating transaction reports.

URL To Call: https://gateway2.tcbpay.com/apis/ach_report.php
Method of Form Submission: POST
This table describes the request parameters for Report API.
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 date Y YYYY-MM-DD
end_date To date Y YYYY-MM-DD
transaction_id TCBPay ID of the transaction, If we need to know the details of a specific transaction N 7518
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

Example :

                                  
                                  <html lang="en">
                                  <head>
                                  <meta charset="UTF-8">
                                  <title>TCB Pay 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 Type of the API Call is a JSON array. For Error, Elements are code and description, and for Successful transactions, Two Elements are returned. success_code, transaction array. code is always 00.


Sample Response :

                                    
{
    "response": {
        "code": "00",
        "no_of_transactions": "330",
        "total_pages": 4,
        "current_page": "1",
        "transaction": {
            "id": {
                "7518": {
                    "first_name": "john",
                    "last_name": "Doe",
                    "country": "United States",
                    "address": "777 Brockton Avenue",
                    "city": "Abington",
                    "state": "MA",
                    "zip": "02351",
                    "phone_number": "055 5555 6666",
                    "account_number": "XXXXXXX1234",
                    "routing_number": "XXXXXXX1234",
                    "check_number": "",
                    "bank_name": "",
                    "account_type": "CHECKING",
                    "amount": "5",
                    "currency": "USD",
                    "custom_field_1": "",
                    "custom_field_2": "",
                    "custom_field_3": "",
                    "transaction_date": "2022-12-30 07:42:13",
                    "status": "Decline",
                    "decline_reason_code": "",
                    "client_ip": "103.94.84.164",
                    "initiated_by": "System User"
                }
            }
        }
    }
}

Error Codes:

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

Country List:

Country Code Country Name
US United States
CA Canada

Currency List:

Currency Code Currency Name
USD United States Dollar

Response Codes:

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

Alternative Payment

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}

Example: https://gateway2-stg.tcbpay.com/apis/banktransactions.php

Production endpoint URL: https://gateway2.tcbpay.com/apis/{method}

Payment API

This API is responsible for a payment request to generate a request token.

URL To Call: https://gateway2.tcbpay.com/apis/banktransactions.php
Method of Form Submission: POST
This table describes the request parameters for Payment API.
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
currency Currency of Transaction Y USD
amount Amount of the check Y 4.00
first_name First name of Account Holder N Roberto
last_name Last name of Account Holder N Diaz
address Address of the customer N 4446 Green Avenue, Suite 56
phone_number Phone Number of the customer N 408-345-2323
email Email ID of the customer N test@test.com
order_id Order ID of the customer N 1234
return_url After the payment transaction user is redirected to this URL Y URL
callback_url URL to receive transaction details (like code, status, bank_name, transaction_id, order_id). N URL

Example:

                                  
                                  <html lang="en">
                                  <head>
                                  <meta charset="UTF-8">
                                  <title>TCB Pay Alternative Payment API Test</title>
                                  </head>
                                  <body>
                                  <form name="" action="https://gateway2.tcbpay.com/apis/banktransactions.php" method="post">
                                  <input type="text" name="username" value="tcbpayusername"/>
                                  <input type="text" name="api_key" value="tcbpayapikey"/>
                                  <input type="text" name="currency" value="USD"/>
                                  <input type="text" name="amount" value="4.00"/>
                                  <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="phone_number" value="408-345-2323"/>
                                  <input type="text" name="email" value="test@test.com"/>
                                  <input type="text" name="order_id" value="1234"/>
                                  <input type="text" name="return_url" value="https://xyz.com/yourpage"/>
                                  <input type="text" name="callback_url" value="https://abc.com/yourpage"/>
                                  <br/>
                                  <input type="submit" value="submit"/>
                                  </form>
                                  </body>
                                  </html>
                                  
                                

Response:

The response Type of the API Call is a JSON array. For Error, Elements are code and message, and for Successful token creation, Three Elements are returned code, message, redirect_url. code is always 00. We can copy and paste this redirect_url link to another tab or browser for a final payment transaction.


Sample Response :

{"code":"00","message":"SUCCESS","redirect_url":"https://gateway2-stg.tcbpay.com/apis/bank_payment.php?id=xxxxxxxxxxxxxxxxxxxx"}

Payment report API:

This API is responsible to fetch payment details.

URL To Call: https://gateway2.tcbpay.com/apis/bankaccount_report.php
Method of Form Submission: POST
This table describes the request parameters for the Payment report API
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 Start Date of the transaction (Start Date or End Date or Transaction ID) Y YYYY-MM-DD
end_date End Date of transaction (Start Date aor End Date or Transaction ID) Y YYYY-MM-DD
transaction_id Unique transaction ID generated by the Gateway (Start Date or End Date or Transaction ID) Y 1234
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

Example :

                                  
                                  <html lang="en">
                                  <head>
                                  <meta charset="UTF-8">
                                  <title>TCB Pay ACH API Report Test</title>
                                  </head>
                                  <body>
                                  <form name="" action="https://gateway2.tcbpay.com/apis/bankaccount_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 Type of the API Call is a JSON array. For Error, Elements are code and error_description, and for Successful transactions, Three Elements are returned. code, description, transaction array. code is always 00


Sample Response :

                                    
                                      
{
    "response": {
        "code": "00",
        "description": "success",
        "no_of_transactions": "105",
        "total_pages": 2,
        "current_page": "1",
        "transactions": [
            {
                "transaction_id": "191",
                "order_id": "199",
                "transaction_status": "FAIL",
                "transaction_type": "SALE",
                "gmt_time": "2022-12-30 00:13:32",
                "firstname": "john",
                "lastname": "doe",
                "email": "johndoe@testmail.com",
                "phone": null,
                "currency": "USD",
                "amount": "5.25",
                "time_zone": "America/Los_Angeles"
            }
        ]
    }
}

Error Codes:

Error Code Description
01 Username is missing or invalid
09 API Key is missing or invalid
23 Either enter Start Date and End Date or Transaction ID

Sandbox:

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/banktransactions.php

Note:

You will get a redirect URL after calling this API. Then redirect to that URL and continue the payment process.
Bank name: Bank of America
User ID: thansen59
Password and OTP: Any string value

Merchant Onboarding

Sandbox endpoint URL: https://app-dev.tcbpay.com/api/{method}

Example: https://app-dev.tcbpay.com/api/onboarding

Production endpoint URL: https://app.tcbpay.com/api/{method}

Onboarding API

This API is responsible for creating new applications.

URL To Call: https://app.tcbpay.com/api/onboarding
Method of Form Submission: POST

This table describes the request parameters for Onboarding API.

Variable Name Description Required Expected Values
username Merchant App Username Y Merchant App Username
password Merchant App Password Y Merchant App Password
first_gurrantor_name Principal #1 Y John Paul
first_gurrantor_title Principal Title #1 Y

1 : Owner, 2 : Co-owner, 3 : President, 4 : Chairman, 5 : Comptroller, 6 : Partner, 7 : General Manager, 8 : Treasurer, 9 : Vice President, 10 : Director, 11 : CEO, 12 : Controller, 14 : CFO, 15 : Office Manager

first_gurrantor_date Date #1 Y YYYY-MM-DD
second_gurrantor_name Principal #2 N John Paul
second_gurrantor_title Principal Title #2 N CEO
second_gurrantor_date Date #2 N YYYY-MM-DD
mbi_legal_name Business Legal Name Y ABCDEFGH
business_type Type of Business Owning Y 8 : Auto Rental, 9 : E-Commerce, 10 : Lodging, 11 : Moto, 12 : Restaurant, 13 : Retail
started_date Business Start Date Y YYYY-MM-DD
ein_no EIN ID Y 654897123 (Should have 9 digits)
irs_tax_name Irs Tax Name Y IRS Tax Name
state_filling State of Filing Y MA
business_website Business Website Y Website URL of the Business (without http or https)
ownership_type Ownership Type Y "PublicCorporation", "PrivateCorporation", "SECRegulatedCorporation", "Government", "SoleProprietorship", "LLC", "Partnership", "NonProfit", "FinancialInstitution", "Trust"
dba_name DBA Name Y ABCDEFGH
phone Phone Number Y 1234567890
address DBA Address 1 Y 777 Brockton Avenue
address1 DBA Address 2 N Brockton
city City Y Abington
state State Y MA
zip_code Zip Code Y 02351
mail_monthly_merchant_to Mail Monthly merchant to N L-legal,D-dba
routing_no Bank Routing Number Y 546435745
account_no Bank Account Number Y 123456789456123
is_banking_matches Name on account matches? (DBA / Legal) Y use D for DBA or L for Legal
is_split_banking Is split banking Y Y: Yes, N: No
deposit_account_no Deposit account number N required in case split banking having Y value
deposit_routing_no Deposit routing number N required in case split banking having Y value
deposit_is_banking_matches Name on account matches? (DBA / Legal) N required in case split banking having Y value. Use value D for DBA or L for Legal
swipe_per Swipe Percentage Y If a CNP submission as per MCC selection, default swiped to 0
eco_per Eco Percentage Y --
moto_per Moto Percentage Y --
visa_mc_discover_monthly_volume VISA/DISC./MASTERCARD Monthly Volume $ Y 5000
visa_mc_discover_avg_ticket VISA/DISC./MASTERCARD Average Ticket $ Y 5000
visa_mc_discover_high_ticket VISA/DISC./MASTERCARD High Ticket $ Y 10000000
visa_mc_discover_minimum_ticket VISA/DISC./MASTERCARD Minimum Ticket $ N 1000
amex_monthly_volume AMEX Monthly Volume $ Y 5000
amex_avg_ticket AMEX Average Ticket $ Y 100000
amex_high_ticket AMEX High Ticket $ N 1000
amex_minimum_ticket Minimum Ticket $ N 500
card_charge_delay_id How many days until the card holder receives the
product or service from when the card is charged?
Y 1 For Same Day, 2 for 1-5 Days, 3 for 6-15 days, 4 for 16-30 days, 5 for over Over 30 Days
attributes Accepted card attributes C

Discover Attribute 1 (mandatory) name - Acquired value - Yes or No Attribute 2 (Include if and only if Acquired = No) name - AccountNumber value - the account number associated with the card

AmericanExpress Attribute 1 (mandatory) name - AmexProgram values - ESA or OptBlue Attribute 2 (Include if and only if AmexProgram = ESA) name - AccountNumber value - the account number associated with the card Attribute 3 (Optionally included if AmexProgram = OptBlue. Defaults to No.) name - ReceiveOptBlueMarketing value - Yes or No

type Owner Type C

If the ownership type is sole proprietorship:

1. Beneficial Owner1 with firstName, lastName, addressLine1, city, state, country, postalCode, and DOB are mandatory.

2. Other owner attributes are optional. (NOTE: We need to collect dob and SSN (as FederalTaxId) for underwriting the sub-merchant, even though sole proprietorship is exempt.)

3. No other ownership type can be added.

4. A sole proprietorship's sole owner cannot be deleted.


or If the ownership type is LLC or Partnership or PrivateCorporation or NonProfit:

1. Control Owner information is Required

2. Beneficial Owner information is Required. When provided, firstName, lastName, addressLine1, city, state, country, and postalCode are mandatory.

2. Beneficial Owner SSN, DOB, and other attributes are optional.

3. They can add up to 10 additional Beneficial Owners (in addition to Control Owner). When provided, firstName, lastName, addressLine1, city, state, country, and postcalCode are mandatory.

"ControlOwner", "BeneficialOwner1", "BeneficialOwner2", "BeneficialOwner3", "BeneficialOwner4", "BeneficialOwner5", "BeneficialOwner6", "BeneficialOwner7", "BeneficialOwner8", "BeneficialOwner9", "BeneficialOwner10"

or:

1. Control Owner information is optional. When provided, firstName, lastName, addressLine1, city, state, country, and postalCode are mandatory.

2. Control Owner SSN, DOB, and other attributes are optional.

3. They can add up to 10 additional Beneficial Owners (in addition to Control Owner). When provided, firstName, lastName, addressLine1, city, state, country, and postcalCode are mandatory.

"ControlOwner", "BeneficialOwner1", "BeneficialOwner2", "BeneficialOwner3", "BeneficialOwner4", "BeneficialOwner5", "BeneficialOwner6", "BeneficialOwner7", "BeneficialOwner8", "BeneficialOwner9", "BeneficialOwner10"
title Owner Title Y Owner, Co-owner, President, Legal Contact, Secretary/Treasurer, Partner, General Manager, Administrator, Vice President, Director, CEO, Corporate Office Title, Principal, CFO, COO
email Email ID Y 1234@gmail.com
first_name First Name Y John
middle_initial Middle Initial N Doe
last_name Last Name Y Paul
date_of_birth Birth Date Y YYYY-MM-DD
street_number Street Number N 777
address Address Line 1 Y 777 Brockton Avenue
address1 Address Line 2 N Brockton
city City Y Abington
state State Y MA
zip_code Zip Code Y 02351
postal_code_extension Postal Code Extention N
home_telephone Home Telephone Number Y 1234567890
home_telephone_ext Home Telephone Number Extention N 1234567890
fax_number FAX Number N 1234567890
driving_license_no Driver Licence (DL) No. Y 786fg6587g
driving_license_state DL issued state N NV
driving_license_expiration_date DL expiration date N 10-19-2018
driving_license_issued_city DL issued city N Chicago
driving_license_issued_country DL issued country N
driving_license_date_issued DL date issued N 10-19-2018
ssn SSN Number Y ASN1234560
has_significant_managerial_control Has significant managerial control N Yes, No
pci_store_credit_card Is credit card details are stored as per PCI N Y: Yes, N: No
pci_third_party_detail_processor_detail PCI third-party detail processor detail N
pci_third_party_detail_processor_version PCI third-party detail processor version N
payment_terminal Payment Terminal Y stand_alone, mobile_terminal, gateway (value can be any 1 of this)
quantity # of Terminals requested Y if payment_terminal value is stand_alone, mobile_terminal then it is required
billing_duration_id What's the billing duration requested? Y 1 for daily, 2 for monthly
is_next_day_funding_requested Next day funding requested? Y Y: Yes, N: No

Click here to download MCC Table

The table describes the Source.

Source Details Source Code
Friend/ Colleague friend_colleague
Search Engine search_engine
Social Media social_media
Other other

HEADER PARAMETERS:

Content-Type: application/json

REQUEST BODY SCHEMA:

application/json

Example:

                  
                                        
                      {
        "username":"APP_USERNAME",
        "password":"APP_PASSWORD",
        "general": {
            "country_code":"USA",
            "mcc_code":"1711",
            "source_code":"social_media",
            "source_msg":"",
            "promo_code":""
        },
        "bankDisclosure": {
            "principal_name":"John Doe",
            "principal_title":"CEO",
            "bank_disclousure_date":"2021-10-10"
        },
        "disclosure": {
            "first_gurrantor_name":"John Doe",
            "first_gurrantor_title":"MR",
            "first_gurrantor_date":"2021-10-07",
            "second_gurrantor_name":"John Paul",
            "second_gurrantor_title":"MR",
            "second_gurrantor_date":"2021-10-07"
        },
        "businessInfo": {
            "mbi_legal_name":"12th may test",
            "business_type": "8",
            "started_date": "2023-04-05",
            "ein_no": "123445589",
            "irs_tax_name":"test",
            "state_filling":"CA",
            "business_website":"google.com",
            "ownership_type":"Trust"
        },
        "legalAddress": {
            "mbi_address":"kolkata",
            "mbi_address1":"",
            "mbi_city":"aru",
            "mbi_state":"LA",
            "mbi_zip_code":"12345",
            "dba_location_telephone1":"3456781234",
            "mbi_support_line1":"5445456765",
            "mbi_mailing_address":"business@gmail.com",
            "shipping_method":"Y",
            "mbi_contact_full_name":"",
            "mbi_contact_full_title":"",
            "mbi_corporate_telephone1":"",
            "mbi_business_email":"",
            "method_of_contact":[
                "Phone"
            ],
            "contact_hours_from":"Afternoon",
            "time_zone":"CST",
            "commu_opt_out":"Y"
        },
        "dbaInfo": {
            "dba_name":"test dba 18thNov 8",
            "phone":"5555556666",
            "address":"Brockton Avenue",
            "address1":"",
            "city":"Abington",
            "state":"MA",
            "zip_code":"02351",
            "mail_monthly_merchant_to":"L"
        },
        "bankAccount": {
            "account_no":"123456789456123",
            "routing_no":"021000021",
            "is_banking_matches":"D",
            "is_split_banking":"Y",
            "deposit_account_no":"456564564564577",
            "deposit_routing_no":"021000021",
            "deposit_is_banking_matches":"D"
        },
        "owners": [
            {
                "type":"BeneficialOwner1",
                "title":"Owner",
                "ownership_per":"50",
                "has_significant_managerial_control":1,
                "first_name":"Subrata",
                "last_name":"Roy",
                "email":"ownermail@mailserver.com",
                "home_telephone":"5555556666",
                "driving_licence_no":"786fg6587g",
                "driving_licence_state":"MA",
                "driving_licence_expiration_date":"2028-10-19",
                "driving_licence_issued_city":"",
                "driving_licence_issued_country":"",
                "driving_licence_date_issued":"2018-10-19",
                "ssn":"999999999",
                "date_of_birth":"2000-10-19",
                "address":"Brockton Avenue",
                "address1":"",
                "city":"Abington",
                "state":"MA",
                "zip_code":"02351"
            },
            {
                "type":"BeneficialOwner2",
                "title":"Co-Owner",
                "ownership_per":"50",
                "has_significant_managerial_control":1,
                "first_name":"Subrata",
                "last_name":"Roy",
                "email":"sownermail@mailserver.com",
                "home_telephone":"5555556666",
                "driving_licence_no":"786fg6587g",
                "driving_licence_state":"MA",
                "driving_licence_expiration_date":"2028-10-19",
                "driving_licence_issued_city":"",
                "driving_licence_issued_country":"",
                "driving_licence_date_issued":"2018-10-19",
                "ssn":"999999999",
                "date_of_birth":"2000-10-19",
                "address":"Brockton Avenue",
                "address1":"",
                "city":"Abington",
                "state":"MA",
                "zip_code":"02351"
            }
        ],
        "salesProfile": {
            "swipe_per":"60",
            "eco_per":"0",
            "moto_per":"40",
            "visa_mc_discover_monthly_volume":"5000",
            "visa_mc_discover_avg_ticket":"10000",
            "visa_mc_discover_minimum_ticket":"1000",
            "visa_mc_discover_high_ticket":"10000000",
            "amex_monthly_volume":"5000",
            "amex_avg_ticket":"10000",
            "amex_minimum_ticket":"1000",
            "amex_high_ticket":"1000",
            "card_charge_delay_id":"100",
            "acceptedCard": [
                {
                    "type": "MasterCard"
                },
                {
                    "type": "Visa"
                },
                {
                    "type": "Discover",
                    "attributes": [
                        {
                            "name": "Acquired",
                            "value": "Yes"
                        }
                    ]
                },
                {
                    "type": "AmericanExpress",
                    "attributes": [
                        {
                            "name": "AmexProgram",
                            "value": "ESA"
                        },
                        {
                            "name": "AccountNumber",
                            "value": "123456789"
                        }
                    ]
                }
            ]
        },
        "paymentsApplicationCompliance": {
            "pci_store_credit_card":"Y",
            "pci_third_party_detail_processor_detail":"",
            "pci_third_party_detail_processor_version":""
        },
        "paymentTerminal": [
            {
                "payment_terminal":"stand_alone",
                "quantity":"2",
                "price":"rent"
            },
            {
                "payment_terminal":"mobile_terminal",
                "quantity":"2",
                "price":"purchase"
            },
            {
                "payment_terminal":"gateway"
            }
        ],
        "schedulea": {
            "billing_duration_id":"2",
            "is_next_day_funding_requested":"Y"
        }
    }                                                                          
                  
                

Response:

The response of the API Call is a JSON array. For Error, Two elements are returned. They are code and msg. For Successful transactions, three elements are returned. They are code, msg, and application_id. The response code is always 00 for a successful API call.


Sample Response :

{"response":{ "application_id": "XXXXXXXXXXXXXXXX", "msg": "Successfull", "code": "00" }


Success Code: 00
Success Message: Successfull

File Upload

This API will Upload Files.

URL To Call: https://app.tcbpay.com/api/onboardingFileUpload
Method of Form Submission: POST

This table describes the request parameters for File Upload.

Variable Name Description Required Expected Values
username Merchant App Username Y Merchant App Username
password Merchant App Password Y Merchant App Password
application_id The Application ID from Onboarding Y XXXXXXXXXXXXXX
document_file The uploaded document file Y File extension must be jpg/jpeg/gif/png/pdf
document_type The type of document needs to upload Y Drivers License or Other Documents

Example:

                  
                    <form action="https://app.tcbpay.com/api/onboardingFileUpload" method="post" enctype="multipart/form-data">
                      <input type="text" name="username" value="merchant username"/>
                      <input type="text" name="password" value="merchant password"/>
                      <input type="text" name="application_id" value="XXXXXXXXXX"/>
                      <input type="file" name="document_file" />
                      <input type="text" name="document_type" value="Drivers License"/>
                      
                      <input type="submit" value="submit" />
                    </form>          
                             
                  
                

Sample Response :

{"response":{ "msg": "success", "code": "00" }


Success Code: 00
Success Message: success

Submit Application

This API will Submit The Application.

URL To Call: https://app.tcbpay.com/api/onboardingSubmit
Method of Form Submission: POST

The table describes the request parameters to perform this API.

Variable Name Description Required Expected Values
username Merchant App Username Y Merchant App Username
password Merchant App Password Y Merchant App Password
application_id The Application ID from Onboarding Y XXXXXXXXXXXXXX

Example:

                  
                     <form action="https://app.tcbpay.com/api/onboardingSubmit" method="post" >
                      <input type="text" name="username" value="merchant username"/>
                      <input type="text" name="password" value="merchant password"/>
                      <input type="text" name="application_id" value="XXXXXXXXXX"/>
                      
                      <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "msg": "Application Submitted successfully", "code": "00" }


Success Code: 00
Success Message: Application Submitted successfully

Status of Application

This API is resposible to provide the status of one or more applications.

URL To Call: https://app.tcbpay.com/api/onboardingStatus
Method of Form Submission: POST

This table describes the request parameters for this API.

Variable Name Description Required Expected Values
username Merchant App Username Y Merchant App Username
password Merchant App Password Y Merchant App Password
application_id The Application ID from Onboarding N XXXXXXXXXXXXXX

REQUEST BODY SCHEMA:

Example:

                  
                    <form action="https://app.tcbpay.com/api/onboardingStatus" method="post">
                      <input type="text" name="username" value="merchant username"/>
                      <input type="text" name="password" value="merchant password"/>
                      <input type="text" name="application_id" value="XXXXXXXXXX"/>
                      
                      <input type="submit" value="submit" />
                    </form>                           
                  
                

Sample Response :

                  
  {
    "msg": "Success",
    "code": "00",
    "applications": [
        {
            "Application_id": "XXXXXXXXXX",
            "Submit_date": "2018-07-09 10:20:00",
            "status_of_the_application": "Declined",
            "IP_of_the_submitter": "122.176.66.142",
            "custom_field_1": "",
            "custom_field_2": "",
            "custom_field_3": "",
            "Reviewer_comments": null
        },
        {
            "Application_id": "YYYYYYYYYY",
            "Submit_date": "2018-07-12 14:02:18",
            "status_of_the_application": "Application Sent for Review",
            "IP_of_the_submitter": "202.142.96.243",
            "custom_field_1": "",
            "custom_field_2": "",
            "custom_field_3": "",
            "Reviewer_comments": null
        }
    ]
  }
              

Response Codes:

Code Description
00 Success
01 Username or password is missing or invalid
02 Application ID is invalid

Subscriptions

Sandbox endpoint URL: https://gateway2-stg.tcbpay.com/apis/{method}

Example: https://gateway2-stg.tcbpay.com/apis/add_plan.php

Production endpoint URL: https://gateway2.tcbpay.com/apis/{method}

Add Plan API:

This API is responsible for creating new plan.

URL To Call: https://gateway2.tcbpay.com/apis/add_plan.php
Method of Form Submission: POST

The table describes the request parameters for Add Plan API.

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
plan_name The Plan Name Y Plan Name
period_type Period Type Y WEEKLY, FORTNIGHTLY, MONTHLY, QUARTERLY, YEARLY
amount Amount to be charged Y 115.45
currency Currency of Transaction (allowed currencies will be determined during the time of merchant onboarding). Y USD, EUR, GBP, CAD, AUD, NZD, AED, DKK, MXN, SEK, CHF
no_of_charge No of times to charge Y No of charge should be greater than 0

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/add_plan.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_name" value="planname"/>
                        <input type="text" name="period_type" value="WEEKLY"/>
                        <input type="text" name="amount" value="115.45"/>
                        <input type="text" name="currency" value="USD"/>
                        <input type="text" name="no_of_charge" value="2"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "description": "Plan is successfully created", "code": "00" }

Update Plan API:

This API is responsible to update existing subscription plan.

URL To Call: https://gateway2.tcbpay.com/apis/update_plan.php
Method of Form Submission: POST

The table describes the request parameters for Update Plan API.

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
plan_id Plan ID Y Existing Plan ID
plan_name Plan Name Y Plan Name
amount Amount to be charged Y 115.45
currency Currency of Transaction (allowed currencies will be determined during the time of merchant onboarding). Y USD, EUR, GBP, CAD, AUD, NZD, AED, DKK, MXN, SEK, CHF
no_of_charge No of times to charge Y No of charge should be greater than 0

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/update_plan.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_id" value="existingplanid"/>
                        <input type="text" name="plan_name" value="plan name"/>
                        <input type="text" name="amount" value="115.45"/>
                        <input type="text" name="currency" value="USD"/>
                        <input type="text" name="no_of_charge" value="2"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "description": "Plan is successfully Updated", "code": "00" }

Plan List API:

This API is responsible for show plan details.

URL To Call: https://gateway2.tcbpay.com/apis/list_plan.php
Method of Form Submission: POST

The table describes the request parameters for List Plan API.

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
plan_id Plan ID N Specify an existing plan id, to view specific plan details

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/list_plan.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_id" value=""/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{"code":"00","description":"Success","list":[{"plan_id":47,"plan_name":"SMTEST12","period_type":"FORTNIGHTLY","amount":"6.18","currency":"USD","no_of_charge":0}]}}

Delete Plan API:

This API is responsible for to delete a subscription plan.

URL To Call: https://gateway2.tcbpay.com/apis/delete_plan.php
Method of Form Submission: POST

The table describes the request parameters for Delete Plan API.

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
plan_id Plan ID Y Existing plan id

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/delete_plan.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_id" value="existingplanid"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "description": "Plan is successfully deleted", "code": "00" }

Add Subscription API:

This API is responsible to add subscription.

URL To Call: https://gateway2.tcbpay.com/apis/add_subscription.php
Method of Form Submission: POST

The table describes the request parameters for Add Subscription API.

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
plan_id Plan ID Y Existing Plan ID
creditcard_number Credit Card number that will be used to complete the transaction. Y 4111111111111111
expire_month Expiry Month of the Credit Card. Y 06
expire_year Expiry Year of the Credit Card. Y 2025
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
zip_code Zip code of the cardholder Y 94085
country_code Country of the cardholder(ISO alpha-2) Y US, CN
email Email ID of the cardholder Y test@test.com
start_date Start Date Y Subscription Start Date
memo Memo of the transaction N

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/add_subscription.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_id" value="existingplanid"/>
                        <input type="text" name="creditcard_number" value="4111111111111111"/>
                        <input type="text" name="expire_month" value="06"/>
                        <input type="text" name="expire_year" value="2025"/>
                        <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="zip_code" value="94085"/>
                        <input type="text" name="country_code" value="US, CN"/>
                        <input type="text" name="email" value="test@test.com"/>
                        <input type="text" name="start_date" value="Subscription Start Date"/>
                        <input type="text" name="memo" value="memoofthetransaction"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "description": "Subscription is successfully created", "code": "00" }

Apple Pay Subscription API:

This API is responsible to add subscription using Apple Pay.

URL To Call: https://gateway2.tcbpay.com/apis/apple_subscription.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 reponse to processing API. All the steps are described below.
Apple Pay APIs:

  • Sandbox: https://gateway2-stg.tcbpay.com/services/applePaySandbox.js
  • Production: https://gateway2.tcbpay.com/services/applePay.js
TCB Pay 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://gateway2.tcbpay.com/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 TCBPayApplePay.paymentRequestRecurring function will be called when click on Apple Pay Button. This function accepts 4 parameters (app_key,business_name,plan_details,start_date). The TCBPayApplePay.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_subscription.php API. Value of responseStatus is S for success.

This table describes the request parameters for Apple pay js.

Parameter 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
plan_details Get paln details using list_plan.php API Y {"plan_id":XX,"plan_name":"Test plan","period_type":"WEEKLY","amount":"1.30","currency":"USD","no_of_charge":2}
start_date Subscription Start Date Y YYYY-MM-DD

Example:

			
			<script type="text/javascript" >
			function callPayment()
			{
				var app_key="b0cf87c7e314af8638ce34732f1f7d24";
				var business_name="Test shop";
				var plan_details='{"plan_id":XX,"plan_name":"Test plan","period_type":"WEEKLY","amount":"1.30","currency":"USD","no_of_charge":2}';

				TCBPayApplePay.paymentRequestRecurring(app_key,business_name,plan_details,start_date);
			}

			TCBPayApplePay.paymentResponse=function(responseStatus,responseText){
				if(responseStatus=="S")
				{
					document.getElementById('signature_token').value = responseText;
					document.getElementById("formID").submit();
				}else{
					alert(responseText);
				}
			}

			</script>
			
		  

The table describes the request parameters for Apple Pay Subscription API.

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"}
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
zip_code Zip code of the cardholder Y 94085
country_code Country of the cardholder(ISO alpha-2) Y US, CN
email Email ID of the cardholder Y test@test.com
memo Memo of the transaction N

Example:

                  
					 <form name="" id="formID" action="https://gateway2.tcbpay.com/apis/apple_subscription.php" method="post">
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="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="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="zip_code" value="94085"/>
                        <input type="text" name="country_code" value="US, CN"/>
                        <input type="text" name="email" value="test@test.com"/>
                        <input type="text" name="memo" value="memoofthetransaction"/>
                      <br/>
					  <button type="button" id="applePay" onclick="callPayment()"></button> 
					  </form>
					  <script type="text/javascript" >
						function callPayment()
						{
							var app_key="b0cf87c7e314af8638ce34732f1f7d24";
							var business_name="Test shop";
							var plan_details='{"plan_id":XX,"plan_name":"Test plan","period_type":"WEEKLY","amount":"1.30","currency":"USD","no_of_charge":2}';

							TCBPayApplePay.paymentRequestRecurring(app_key,business_name,plan_details,start_date);
						}

						TCBPayApplePay.paymentResponse=function(responseStatus,responseText){
							if(responseStatus=="S")
							{
								document.getElementById('signature_token').value = responseText;
								document.getElementById("formID").submit();
							}else{
								alert(responseText);
							}
						}
					  </script>
                            
                  
                

Sample Response :

{"response":{ "description": "Subscription is successfully created", "code": "00" }

Subscription List API:

This API is responsible to fetch details of subscriptions.

URL To Call: https://gateway2.tcbpay.com/apis/list_subscription.php
Method of Form Submission: POST

The table describes the request parameters for Subscription List API.

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
plan_id Plan ID N Existing Plan ID
card_type Card Type N AMEX, DISCOVER, MASTERCARD, VISA
start_date Start Date N Start Date
end_date End Date N End Date

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/list_subscription.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="plan_id" value="existingplanid"/>
                        <input type="text" name="card_type" value="VISA"/>
                        <input type="text" name="start_date" value="startdate"/>
                        <input type="text" name="end_date" value="enddate"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{"code":"00","description":"Success","list":[{"subscription_id":59,"plan_id":30,"plan_name":"Plan test fortnightly","credit_card_number":"**** **** **** 0007 ","amount":7,"currency":"USD","period_type":"FORTNIGHTLY","first_name":"Tanmoy","last_name":"Mondal","address":"802 E Frierson Ave","address_cont":"","city":"TAMPA","state":"FL","zip":"33606","country_id":209,"country_name":"United States","bill_email":"tanumondal@gmail.com","start_date":"2023-05-25"},{"subscription_id":56,"plan_id":30,"plan_name":"Plan test fortnightly","credit_card_number":"**** **** **** 0007 ","amount":7,"currency":"USD","period_type":"FORTNIGHTLY","first_name":"Tanmoy","last_name":"Mondal","address":"802 E Frierson Ave","address_cont":"","city":"TAMPA","state":"FL","zip":"33606","country_id":209,"country_name":"United States","bill_email":"tanumondal@gmail.com","start_date":"2023-05-22"}]}}

Delete Subscription API:

This API is responsible for removing existing subscription.

URL To Call: https://gateway2.tcbpay.com/apis/delete_subscription.php
Method of Form Submission: POST

The table describes the request parameters for Delete Subscription API.

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
subscription_id Subscription ID Y Existing Subscription ID

Example:

                  
                     <form action="https://gateway2.tcbpay.com/apis/delete_subscription.php" method="post" >
                        <input type="text" name="username" value="tcbpayusername"/>
                        <input type="text" name="api_key" value="tcbpayapikey"/>
                        <input type="text" name="subscription_id" value="existingsubscriptionid"/>
                      
                        <input type="submit" value="submit" />
                    </form>   
                            
                  
                

Sample Response :

{"response":{ "description": "Subscription is successfully deleted", "code": "00" }

Response Codes:

Code Description
01 Username is missing or invalid
02 Credit Card is missing or invalid
03 Expire month is missing or invalid
04 First name is missing or invalid
05 Country code is missing or invalid
06 Email is missing or invalid
07 Address is missing
08 City is missing
09 API Key is missing or invalid
10 Zipcode is missing
11 Start date is missing
12 Plan id is missing or invalid
13 State is missing
14 Plan Name is missing
15 Period Type is missing or invalid
16 No of Charge is missing
17 Amount is missing or invalid
18 Currency is missing
19 Same Plan already exists
20 Currency is not assigned to this account
21 Message contains words that have been identified as profanity and this message has been blocked due to company policy. Please try again.
22 No of charge should be greater than 0
23 CVV is missing or invalid
24 Invalid card
UN Unknown error, Please contact Administrator

WooCommerce Plugin

Version 1.0

Requires WordPress Version: 5.0 or higher
Compatible up to: 5.2.3
Woocommerce plugin version: 3.6.3 higher
Compatible up to: 3.7.0

This plugin allows you to use the TCB Payment gateway for your Woo-commerce site, as an additional payment option.

Installation:

There are two methods of it.
A. Place the unzipped plugin into the wp-content/plugins folder inside your WordPress site
B. from WordPress admin go to Plugins – Add New. Click on Upload Plugin, and browse the zip version of the TCB Pay plugin folder.

Manage:

After successful installation of the plugin, you have to activate the TCBPay plugin from Plugins Installed Plugins.

Once the TCBPay plugin is activated, you can manage the plugin settings from Woo-commerce Settings Payments TCBPay.

Click on Manage. On the manage screen, you can set the following values

Title: Name what you wish to appear on your cart page as a payment option.
Description: If you wish to specify any notes for the plugins for your customers.
Username: This is the username provided by TCBPay when you signed up for an account.
API Key: This is the API Key provided by TCBPay when you signed up for an account.

Keep the Enable test mode checked, if you want to run the Plugin in a test environment.

ss ss

Download the wordpress plugin package as a zip.   Click here

PrestaShop Module

Version 1.0

Prestashop Version: 1.7.0 or higher
Compatible up to: 1.7.5

This plugin allows you to use TCB Pay payment gateway for your PrestaShop.

Installation:

Navigate to the Modules menu and click on the Module Manager button. You would be redirected to the Modules management screen. Click on the Upload a Module button to proceed with the installation. A new pop-up would appear. You may either drop the module's .zip file in that pop-up or use the select file link to browse for that module.

Manage:

A new pop-up with Module Installed! A message would appear and that's it! Your module is installed now. You may click on the Configure button to edit the newly installed module's options

In the configure screen you can set the following values

Enabled: If Yes then this payment method appears on your cart page as a payment option.
Test Mode: If Yes account turned into debug mode
Merchant Username: This is the username provided by Tcb pay when you signed up for an account.
API Key: This is the API Key provided by Tcb Pay when you signed up for an account.
Credit Card Type: Choose card type from the dropdown
Use CVV: Choose Yes to use CVV

magento magento

Download the PrestaShop extension package as a zip.   Click here

Shopify Module

  1. Click here for instructions on how to set up Shopify and TCB Pay.
  2. Click here for instructions on how to integrate Shopify with your business.

Magento Module

Version 1.0

Magento Version: 2.0 or higher
Compatible up to: 2.1.*

This plugin allows you to use the TCBPay payment gateway for your Magento, as an additional payment option.

Installation:

Create a folder name code under the Magento root directory/app. Place the unzipped module folder under this newly created code folder. Now run the following command from the Magento root directory :

  • php bin/magento setup:upgrade
  • php bin/magento setup:static-content:deploy if store is in production mode
  • php bin/magento cache:clean

Manage:

After successful installation of the plugin, you have to enable and manage to set the TCBPay payment gateway from
STORESCONFIGURATIONSALESPayment MethodsTCBPay Payment Gateway


In the manage screen, you can set the following values

Enabled: If Yes then this payment method appears on your cart page as a payment option.
Title: Name what you wish to appear on your cart page as a payment option.
Merchant Username: This is the username provided by Tcbpay when you signed up for an account.
API Key: This is the API Key provided by Tcbpay when you signed up for an account.

magento

Download the magento extension package as a zip.   Click here

Opencart Module

Version 1.0.0

Opencart Version: 3.0 or higher
Compatible up to: 3.1.*

This plugin allows you to use the TCBPay payment gateway for your Opencart, as an additional payment option.

Installation:

There are two methods of it.
A. Unzip the opencart plug-in folder there will be 3 folders admin, catalog, and the system then upload 3 folders inside the opencart project folder.
B. Login into opencart admin module then go to the Extension Installer option – select the plug-in zip and upload it then go to the Extensions option and select a payment option from the extension type we will find we will find TCB Pay and then install by clicking the install button.

Manage:

After successful installation of the plugin, you have to enable and manage to set the TCBPay payment gateway from
Extensions ExtensionsPayment MethodsTCBPay Payment GatewayClick on Edit.


In the manage screen, you can set the following values

Merchant Username: This is the username provided by Tcbpay when you signed up for an account.
API Key: This is the API Key provided by Tcbpay when you signed up for an account.
Credit Card Types: Select your accepted card.
Test Mode: If we select yes then we get sandbox if not then production.
Status: We must set it to enable.

magento
magento

Download the opencart extension package as a zip.   Click here

osCommerce Module

Version 1.0.0

Opencart Version: 2.3 or higher
Compatible up to: 2.3.*

This plugin allows you to use the TCBPay payment gateway for your Opencart, as an additional payment option.

Installation:


1. Copy all new files with your catalog. It won't rewrite any of your files. Just copy & paste on top.
2. In the admin side of your website go to Modules - Payment and install the new TCB Pay payment. Edit the payment put in credentials and set up your settings.
3. Modify the following files as per the following instructions.
1. Installation Instructions:

A:

                
                  Find around line 139 in catalog/checkout_process.php file   
                  $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';
                  
Add Bellow Code above this "$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';" line: $order_comment = $order->info['comments']; if ($tcbpay_transaction_id) { $order_comment .= "\nTransaction Id: $tcbpay_transaction_id"; }

B:

                
                Find bellow code around line 144 :  
                'comments' => $order->info['comments']
                Replace With
                'comments' => $order_comment
                
              

C:

                
                Find  around line 36 in admin/modules.php:
                while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
                Add The code bellow the line:
                if (is_array($value)) $value = implode(',', $value);
                
              


D:

                
                    add the following code at end of the admin/includes/functions/general.php file.

                    
                   function tep_cfg_pull_down_tcbpay_cctypes($cctypes, $key = '') {
                    $name = 'configuration[' . $key . '][]';

                    $cctypes_array = array(
                      array(
                        'id' => 'AE',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_AMERICAN_EXPRESS
                      ), array(
                        'id' => 'VI',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_VISA
                      ),  array(
                        'id' => 'MC',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_MASTERCARD
                      ), array(
                        'id' => 'DI',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_DISCOVER
                      ), array(
                        'id' => 'JCB',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_JCB
                      ), array(
                        'id' => 'OT',
                        'text' => MODULE_PAYMENT_TCBPAY_TEXT_OTHER
                      )
                    );

                    return tep_draw_multi_select_menu($name, $cctypes_array, $cctypes);
                  }
                
              

E:

                
                 
                  add the following code at end of the admin/includes/functions/general.php file.
                  function tep_draw_multi_select_menu($name, $values, $default = array(), $parameters = '', $required = false) {
                  global $HTTP_GET_VARS, $HTTP_POST_VARS;

                  $field = <select multiple name="' . tep_output_string($name) . '"';

                    if (tep_not_null($parameters)) $field .= ' ' . $parameters;

                    $field .= >
                    if (empty($default) && (isset($HTTP_GET_VARS[$name]) || isset($HTTP_POST_VARS[$name]))) {
                        if (isset($HTTP_GET_VARS[$name])) {
                        $default = $HTTP_GET_VARS[$name];
                     } elseif (isset($HTTP_POST_VARS[$name])) {
                     $default = $HTTP_POST_VARS[$name];
                      }
                    }
                    if (!is_array($default)) $default = explode(',', $default);

                    for ($i=0, $n=sizeof($values); $i<$n; $i++) {
                  $field .= <option value="' . tep_output_string($values[$i]['id']) . '"';
                  if (in_array($values[$i]['id'], $default)) {
                    $field .= ' selected="selected"';
                  }
                  $field .= > . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . <option>;
                 }
                  $field .= <select>;
                  if ($required == true) $field .= TEXT_FIELD_REQUIRED;

                  return $field;

           

                
              

Manage:

In the manage screen, you can set the following values

Username: This is the username provided by Tcbpay when you signed up for an account.
API Key: This is the API Key provided by Tcbpay when you signed up for an account.
Credit Card Types: Select your accepted card.
Test Mode: If true TCB Test Pay is enabled If false TCB test Pay is disabled.

magento

Download the osCommerce extension package as a zip.   Click here

Zen Cart Module

Version 1.0.0

Zen Cart Version: 1.5 or higher
Compatible up to: 1.5.*

This plugin allows you to use the TCBPay payment gateway for your Zen Cart, as an additional payment option.

Installation:


1. Copy all new files within your catalog. It won't rewrite any of your files. Just copy & paste on top.
2. Modify the following files as per the following instructions.
1. Installation Instructions:

A:

                
                Find admin/includes/functions/general.php file 
                
Add Bellow Code At The End function zen_cfg_pull_down_tcbpay_cctypes($cctypes, $key = '') { $name = 'configuration[' . $key . '][]'; $cctypes_array = array( array( 'id' => 'AE', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_AMERICAN_EXPRESS ), array( 'id' => 'VI', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_VISA ), array( 'id' => 'MC', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_MASTERCARD ), array( 'id' => 'DI', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_DISCOVER ), array( 'id' => 'JCB', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_JCB ), array( 'id' => 'OT', 'text' => MODULE_PAYMENT_TCBPAY_TEXT_OTHER ) ); return zen_draw_multi_select_menu($name, $cctypes_array, $cctypes); }

B:

                
                Find admin/includes/functions/html_output.php file 
                
Add Bellow Code At The End function zen_draw_multi_select_menu($name, $values, $default = array(), $parameters = '', $required = false) { $field = '<select multiple rel="dropdown" name="'.zen_output_string($name).'"'; if (zen_not_null($parameters)) { $field .= ' ' . $parameters; } $field .= '>' . "\n"; if (empty($default) && isset($GLOBALS[$name])) { $default = $GLOBALS[$name]; } if (!is_array($default)) $default = explode(',', $default); foreach($default as $dval) { $default[] = trim($dval); } foreach ($values as $value) { $field .= '<option value="' . zen_output_string($value['id']) . '"'; if (in_array($value['id'], $default)) { $field .= ' selected="selected"'; } $field .= '>' . zen_output_string($value['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . 'option>' . "\n"; } $field .= 'select>' . "\n"; if ($required == true) { $field .= TEXT_FIELD_REQUIRED; } return $field; }

3. In the admin side of your website go to Modules - Payment and install the new TCB Pay payment. Edit the payment put in credentials and set up your settings.

Manage:

In the manage screen, you can set the following values

Username: This is the username provided by Tcbpay when you signed up for an account.
API Key: This is the API Key provided by Tcbpay when you signed up for an account.
Credit Card Types: Select your accepted card.
Test Mode: If true TCB Test Pay is enabled If false TCB test Pay is disabled.

magento

Download the Zen Cart extension package as a zip.   Click here

X-Cart Module

Version 1.0.0

X-Cart Version: 5.4.1.31 or higher
Compatible up to: 5.4.*

This plugin allows you to use the TCBPay payment gateway for your X-Cart, as an additional payment option.

Installation:


1. Open the X-Cart admin panel And log in with the correct credential.
2. Please Click on Apps and then click on My Apps from the left side menu.
3. Then click on Upload Addon from the top right corner and then upload the TCBPay module zip.
4. After successful upload click on Store Setup and then Payment Method from the left side menu.
5. Put credentials and setup with your settings

Manage:

In the manage screen, you can set the following values

Merchant Username: This is the username provided by Tcbpay when you signed up for an account.
API Key: This is the API Key provided by Tcbpay when you signed up for an account.
Credit Card Types: Select your accepted card.
Test Mode: If true TCB Test Pay is enabled If false TCB test Pay is disabled.
Use CVV: If true CVV should Enable If false TCB Pay CVV disable.

X-Cart

Download the X-Cart extension package as tgz.   Click here

Android

Version 2.4.0

TCB Pay is a secure and simple way to process credit card transactions from your Android phone. Just sign in with your gateway credentials and you can be processing payments in seconds.

iOS

Version 3.0.0

TCB Pay is a secure and simple way to process credit card transactions from your Android phone. Just sign in with your gateway credentials and you can be processing payments in seconds.