Loading...
eBPALogo
Flexible API for Secure Payments

Getting Started with the API

BancHUB's API enables banking and card payments, at scale, for custom business solutions as well as for third-party app integrations. Check out our API documentation below, and sign up for an account when you are ready.

Card Payment

BancHUB Card payment service enables merchant accounts to accept online payment. Our payment processing services enable merchants to process both traditional card-present, or "swipe" transactions, and "card-not-present" transactions.

Card Tokenization

BancHUB's API enables for the banking and card payments at scale for custom business solutions as well as for third - party app integrations. Check out our API documentation below, and sign up for an account when you are ready.

Bank Account Payment

The BancHUB ACH Payment Service enables you to process payments through the ACH network, allowing you to request a credit or debit from a customer’s checking or savings account at a low transaction cost.

Bank Account Tokenization

BancHUB's API enables for the banking and card payments at scale for custom business solutions as well as for third - party app integrations. Check out our API documentation below, and sign up for an account when you are ready.

Registration

To begin using BancHUB's API, you must first register with merchant business details. After registration, you'll be given a client_id and API token which may be used to generate access tokens for API authentication. For registration, you can Sign up here

Authentication

BancHUB's API uses a special authentication model to authenticate registered users. The authentication process is the first step to access the payment methods.

Access Tokens

After requesting authentication, BancHUB's secure system will provide access token/session token (session_token) to access real-time payment APIs. The session_token will be set up with a certain expiration period for tracking purposes.

Common Error Codes

BancHUB provides common error codes to indicate the exception details as standard HTTP response codes:

HTTP Status Error Code Description
400 BadRequest The request body contains bad syntax or is incomplete.
400 ValidationError Validation error(s) present.
403 Forbidden The supplied credentials are not authorized for this resource.
403 InvalidResourceState Resource cannot be modified.
404 NotFound The requested resource was not found.
405 MethodNotAllowed (varies)
500 ServerError A server error occurred.
500 RequestTimeout The request timed out.
200 Success The request processed successfully.
Global Reference

BancHUB adheres to global standard codes like currency, country, date etc. Please refer to the below links for more details:

Name Standard Reference
Currency ISO ISO Currency codes, IBAN Currency codes
Country ISO ISO Country codes, IBAN Country codes
US Banking ACH About ACH & SEC Codes
Card Request

Provide a payment object for request.

name type length description
username string M Merchant register user name.
token string M Merchant register user name.
object M User card details.
payment_intent enum Optional Must be set to the sale for immediate payment, authorize payment for capture later, or order to create an order. Allowed Values: sale = 0 , authorize= 1 , order= 2 .
card_present enum Optional Must be set to YES if card present, NO if card not present. Allowed Values: Yes= 0, No= 1.
iscreditcard enum Optional Must be set to YES if merchant card is credit card, NO if merchant card is a debit card. Allowed Values:Yes= 0, No= 1.
cardholder_name string Mandatory Cardholder's name.
card_number string Mandatory Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type.
card_type string Optional Credit card type like Visa, Master, etc.
expire_month int M Expiration month with no leading zero. Acceptable values are 1 through 12.
expire_year int M 4-digit expiration year.
cvv2 string Optional 3-4 digit card validation code.
object<> M Trasnaction details includes amount and currency.
total_amount Decimal Mandatory The total amount charged from the payer to the payee. 10 characters max with support for 2 decimal places.
client_referid string Optional Identifier to the purchase or transaction.
transaction_date string Mandatory Transaction initiated date.
currency string Mandatory 3 letter currency code as defined by ISO..
purchase_level enum Mandatory Card transaction level.L1-Limited transaction details, L2- L1& Purchase details give as tax and consumer code, L3- Line item level detail of transaction.
object Optional Tax details of the item.
tax_amount decimal Optional Tax amount for the purchase.
po_number string Optional The purchase order for the transaction.
merchant_zipcode string Optional Zip code of merchant country.
object Optional The purchase order for the transaction.
order_id string Optional Order number of the transaction to track.
shipping_postal string Optional Postal code for the shipping address.
ship_from_postal string Optional Postal code for the address from which the goods are shipped.
invoice_number string Optional Field to support an invoice number for a transaction.
item_product_code string Optional Type of product.
item_commodity_code string Optional Commodity code used to classify the item.
item_description string Optional Text description of the item.
item_quantity int Optional Quantity/Number of a particular item.
item_unit_of_measure string Optional Unit in which the value is represented.
item_extended_amount decimal Optional Extended Item level Amount.
item_netorgross_indicator string Optional Flag that indicates whether the tax amount is included in the Line Item Total. YES: item the amount includes tax amount, NO: item amount does not include tax amount
item_taxamount decimal Optional Tax amount of line item in payment.
item_discount_amount decimal Optional Discount applied to the item.
freight_amount decimal Optional Total freight or shipping and handling charges for the order in payment.
duty_amount decimal Optional Total charges for any import or export .duties included in the order.
alternat_tax_amount decimal Optional The total amount of alternate tax for the order in payment.
shipping_country string Optional 2-letter country code of the shipping address in payment.
item_total_amount decimal Optional Cost of total items in payment.
object M User billing address details.
billing_username string Optional Payer's user name in the payment.
user_address1 string Optional Payer's Address1 in the payment
user_address2 string Optional Payer's Address2 in the payment
description2 string Optional Additional information description on payment
user_city string Optional Payer's City name.
user_state string Optional Payer's 2-letter code of states in payment.
user_zip string Optional Payer's zip code.
user_contact string Optional Payer’s contact number.
user_email string Optional Payer’s email address.
country_code string Optional Two-letter registered country code of the payer to identify the buyer country.
description string Optional Description of what is being paid for.
Card Response

Returns a payment object along with the state of the card payment. The response includes a transaction ID that uniquely identifies the transaction...

Name Type Length Description
transaction_id string O Transaction reference number.
Status transactionStatus M Status of the transaction.
error_desc string O Error reason/description of transaction if failed.
Get Card Token

BancHUB Card Token service enables merchant account to accept online payment securely.

Sample Code

The below sample code illustrate the how to make card payment. To test requests using your account, replace the sample API key with your actual API key and username.

Step 1:

"userdetails": { "apikey": "0849b836-bc20-4a83-e50f8c956c4" , "username": "Test" {

Result:

"AurthorizeResult": { "apikey": "0849b836-bc20-4a83-e50f8c956c4" , "username": "Test" {
Request

Provide a payment object for request.

name type length description
token string M Merchant security token: used to identify the merchant and validates the transaction.
username string M Merchant register user name.
object M card details.
cardholder_name string Mandatory Cardholder's name.
card_number string Mandatory Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type.
card_type string Optional Credit card type like Visa, Master, etc.
expire_month int Mandatory Expiration month with no leading zero. Acceptable values are 1 through 12.
expire_year int Mandatory 4-digit expiration year.
cvv2 string Optional 3-4 digit card validation code.
Response

Returns a payment object along with the state of the card payment. The response includes a transaction ID that uniquely identifies the transaction...

Name Type Length Description
transaction_id string Optional Transaction reference number.
Status transactionStatus M Status of the transaction.
error_desc string Optional Error reason/description of transaction if failed.
ACH Request

Provide a payment object for ACH request.

name type length description
token string M Merchant security token: used to identify the Merchant security token: used to identify the .
username string M Merchant register user name.
string M Bank account details.
account_name string M A customer designated name.
account_number string M Account number in either IBAN (max length 34) or BBAN (max length 17) format.
routing_number string M Routing transit number of the bank Type of the bank account number.
account_type enum M Allowed Values: Checking, Saving Type of the transaction.
transaction_type enum M Allowed Values: Debit, Credit, Prenote Purpose of the transaction.
payment_intent enum M Allowed Values: Personal, Business How the check was obtained from the customer, if the check was the source of the information provided.
ach_type enum M Allowed Values: CCD, TEL, WEB, ARC, POP
transaction_amount decimal M Payment amount to be credit/debit. 3 letter currency code as defined by ISO.
receiver_identification string Optional Receiver identification value. The transaction will be R for recurring and S for single.
payment_type enum M Allowed Values: R, S
terminal_city string C Terminal city(Point of purchase).
terminal_state string C Terminal state(Point of purchase).
client_referid string Optional Reference Id to track the transaction.
transaction_effectivedate string Optional Transaction effective date.
transaction_description string Optional Description of what is being paid for.
addenda_info List<> Optional Additional information on payment.
List<> Optional Additional information on payment.
information1 string Optional Additional information on payment.
description1 string Optional Additional information description on payment.
information2 string Optional Additional information on payment.
description2 string Optional Additional information description on payment
information3 string Optional Additional information on payment.
description3 string Optional Additional information description on payment
information4 string Optional Additional information on payment.
description4 string Optional Additional information description on payment
information5 string Optional Additional information on payment.
description5 string Optional Additional information description on payment
object M User billing address details.
billing_username string Optional Payer's user name in the payment.
user_address1 string Optional Payer's Address1 in the payment
user_address2 string Optional Payer's Address2 in the payment
description2 string Optional Additional information description on payment
user_city string Optional Payer's City name.
user_state string Optional Payer's 2-letter code of states in payment.
user_zip string Optional Payer's zip code.
user_contact string Optional Payer’s contact number.
user_email string Optional Payer’s email address.
country_code string Optional Two-letter registered country code of the payer to identify the buyer country.
description string Optional Description of what is being paid for.
ACH Response

Returns a payment object along with the state of the card payment. The response includes a transaction ID that uniquely identifies the transaction.

Name Type Length Description
transaction_id string M Transaction reference number.
Status transactionStatus Optional Status of the transaction.
error_desc string Optional Error reason/description of transaction if failed.
Request

To begin using BancHUB's API, you must first register with merchant business details. After registration, you'll be given a client_id and api token which may be used to generate access tokens for API authentication. For registration, you can Sign up here

Response

After requesting for authentication, BancHUB secure system will provide access token/session token (sessiontoken) to access real time payment APls, The session_token will be set up with certian expirat ion period and tracking purpose.