Credit Card API

Credit Card Acceptance

In order to accept credit cards on your site that process to your WiPay account, you need to have your WiPay account setup and configured.  You can follow the instructions in Step 1 to begin. 

Step 1

Step 1: Sign Up for a WiPay Account 

If you already have an account setup you can skip to  Step 3: Update Merchant(Business) Key, otherwise you need to signup for a WiPay account. You can signup here 

 

Step 2: Update Bank Info

You need to update your banking info so that when people pay via credit card, the money goes to your linked back account. 

We wire transfer within 3 working days to the following banks

  • FirstCaribbean Int’L
  • First Citizens Bank
  • Scotia Bank Trinidad
  • Republic Bank LTD
  • JMMB Bank
  • RBC Royal Bank Trinidad and Tobago
  • Citibank
  • Bank of Baroda

Step 3: Update Merchant Key

The merchant_key will be used to verify each transaction. Every transaction produces a unique hash. The developer should verify this hash using their merchant_key.

Using our test acount

You can use our test business account. You will need the following info in the following sections when testing:

Email: creditcardtest@mail.com

Merchant Key: e3gsulc0z7cae

Step 2: Initiate Transaction

Configuration

The configuration for the Voucher API calls can be seen below.

All reporting features are disabled in the sandbox url.

Upon form submission, your customers will be redirected to a secure hosted checkout page where they would enter their credit card information

NOTE: When testing, please use the SANDBOX API URL. Testing on the live platform is strictly prohibited and Account will be banned

API URL (Live) https://wipayfinancial.com/v1/gateway_live
API URL (Sandbox) https://sandbox.wipayfinancial.com/v1/gateway
HTTP Method POST
Body Content-Type  
API Response-Type  

 

Parameters

Parameter Description  Notes  Required
total Total that customeris going to pay Yes
phone Cumstomer’s phone number Yes
email Email address of customer Yes
name Customer’s name Yes
order_id Id of the order being referred to Yes
return_url Upon submitting credit card info, the page where the customer will be redirected to Yes
developer_id Your developer_id/mercant_key Yes

Here’s an example form you can implement on your website

<form action="https://wipayfinancial.com/v1/gateway" method="post">
<input name="total" type="hidden" value="10"/>
<input name="phone" type="hidden" value="6890677"/>
<input name="email" type="hidden" value="customer@gmail.com"/>
<input name="name" type="hidden" value="John Doe"/>
<input name="order_id" type="hidden" value="4398"/>
<input name="return_url" type="hidden" value="http://example.com"/>
<input name="developer_id" type="hidden" value="1"/>
<button type="submit">Pay</button>
</form>

Upon form submission, your customers will be redirected to the following secure checkout page.

 

 

Sandbox test card numbers(Any expiry and CVV2)

 

 

Step 3: Process/Verify Transaction

When the transaction is complete,the user will be redirected to the specified return_url. From the url, you can pull off all relevant info and validate to see if the transaction was a success or fail.

Status Success

http://your_return_url/?status=success
&name=John%20Doe
&email=customer@gmail.com
&hash=129c8b887ed83ec36523843afcd51caa
&order_id=4398
&transaction_id=100-1-4398-20170108100202
&reasonCode=1
&reasonDescription=Transaction%20is%20approved.
&responseCode=1
&total=10
&D=TT
&date=10%3A02%3A17pm


Status Fail

http://your_return_url/?status=failed
&name=John%20Doe
&email=customer@gmail.com
&hash=129c8b887ed83ec36523843afcd51caa

&order_id=4398
&transaction_id=100-1-4398-20170108100202

&reasonCode=2
&reasonDescription=Transaction%20Declined.
&responseCode=2

&total=10
&D=TT
&date=10%3A02%3A17pm

The GET params can be easily retrieved using various languages (eg. PHP)

GET Params

$status=$_GET['status'];
$OrderID=$_GET['order_id'];
//ETC

It is strongly recommended for each transaction to verify the hash. The hash can be computed as seen below:

Verifying Hash

$merchant_key=//pull from your server
$hash=md5($_GET['order_id'].$_GET['total'].$merchant_key);
if($hash == $_GET['hash']) {
    //Hash matched
}

 

Our Rates

3% + 5TT per transaction. These rates are automatically deducted in the dashboard.

 

How do you get the money to your bank?

Simply go to the Withdraw Tab and enter an amount to withdraw (the minimum that you can withdraw is 100 TT).