Introduction
FASBATECH API makes using RewardPlus a lot easier. Our platform simplifies using RewardPlus by focusing on Voucher Codes.
Voucher Codes
The power of the voucher is that merchants can transact even without internet and at the same time he / she can build organization even when busy.
How to create or generate vouchers
Your first API call
You now have access to all documented API endpoints once you have your API Secret Key ready. You can re-generate your API Secret Key by changing your Account password.
API Endpoint
https://fasbatech.com/webapp/RewardPlusAPI
Required Parameters
Account_Number = "Your Account Number"
API_Secret_Key = "Your API Secret Key"
Points = "Your Community Share"
70% allotted for CAR & CGR, and 30% allotted for MRR & MCRP (minimum of 8 Points or Community Share)
Sample PHP Code
<?php
$postData = array('Account_Number'=> 11235813, 'API_Secret_Key'=>'123ksdfjflldkdjdfkdls', 'Points'=>100); //Required Parameters
$jsonData = json_encode($postData);
$curlObj = curl_init();
curl_setopt($curlObj, CURLOPT_URL, 'https://fasbatech.com/webapp/RewardPlusAPI'); //API Endpoint
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlObj, CURLOPT_HEADER, 0);
curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));
curl_setopt($curlObj, CURLOPT_POST, 1);
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);
$response = curl_exec($curlObj);
curl_close($curlObj);
print_r($response); //display all response data
$json_out = json_decode($response);
$voucher = $json_out->messages[0]->voucher; //display voucher only
?>
Sample JSON response
{
"messages":[
{
"voucher":"URV0UCH3R",
"balance":"144,000.50",
"currency":"PHP",
"response":200,
"status":"Success"
}
]
}
Response Codes
200 'Success'
130 'Account balance not enough'
800 'Invalid Points or Community Share'
500 'Invalid API Secret Key'
300 'Account Number not found'
7 Comments
Oh my, i cant fully understand how
ReplyDeleteHello po! Ask ko lang po if system developer kayo? Salamat!
DeletePlease help. make it step by step
ReplyDeleteHello po! Ask ko lang po if system developer kayo? Salamat!
Deletevery much excited !!!!
ReplyDeleteI can not fully relate but I am so interested to learn
ReplyDeleteFirst you need to get your API Secret Key inside FASBATECH platform (Services Menu > More > API) then copy sample code above to explore using curl
Delete