Section | Description |
---|---|
1 |
Introduction
|
2 |
Getting Started
|
3 |
API Overview
|
4 |
API Authentication
|
5 |
API Endpoints
|
6 |
Request and Response Formats
|
7 |
Integration Guides
|
8 |
Testing and Sandbox Environment
|
9 |
Security
|
10 |
Error Handling and Troubleshooting
|
11 |
Support and Contact Information
|
12 |
Terms of Service and Usage Policies
|
FrillPay is a leading payment gateway provider that offers secure and fast online payment solutions to customers. Our payment gateway allows customers to make seamless transactions on various websites, ensuring a smooth and hassle-free payment experience. In addition to providing payment services to end customers, FrillPay offers a comprehensive payment gateway API for businesses and organizations. By integrating with our API, companies can enable their customers to make payments directly on their websites using our secure payment infrastructure.
To utilize FrillPay's payment gateway API, businesses are required to fulfill certain prerequisites:
Before integrating with FrillPay's payment gateway API, you need to complete the following steps:
In order to explore the full functionality of FrillPay's payment gateway API, you are required to open a merchant account with FrillPay. This account will provide you with access to the necessary tools and resources to process payments securely. The onboarding process involves:
Upon successful registration and verification of your merchant account with FrillPay, you will be provided with API access credentials. These credentials are necessary for authenticating your requests and accessing the payment gateway API.
The access credentials may include:
Please ensure that you securely store and protect these credentials. Treat them as sensitive information, as they provide access to your payment gateway integration. Do not share them with unauthorized individuals or store them in a publicly accessible location.
With above access credentials in hand, you can begin integrating FrillPay's payment gateway API into your website or application to enable secure and seamless online payments for your customers.
FrillPay's payment gateway API provides businesses with a robust set of functionalities to seamlessly process online payments. With our API, you can securely handle payment requests, manage transactions, and retrieve valuable payment-related information.
Integrating with FrillPay's API allows you to:
By leveraging our API, you can enhance your website or application's functionality and streamline your payment processes, providing a seamless payment experience for your customers.
FrillPay currently supports transactions in USD (United States Dollar) only. All payment amounts and currency conversions should be handled accordingly to ensure accurate transaction processing.
If you have specific currency requirements or would like to inquire about supporting additional currencies, please contact our API support team for further assistance at [email protected].
Here's an example of how you can handle payment requests using FrillPay's API:
// Preparing data to send to the Payment Gateway (FrillPay)
$data = array(
'apiKey' => encryptData($apiKey, $token),
'reqestedId' => encryptData($requestedId, $token),
'fName' => encryptData("John", $token),
'lName' => encryptData("Doe", $token),
'email' => encryptData("[email protected]", $token),
'amount' => encryptData(100.00, $token),
'currency' => encryptData(USD, $token),
'accountno' => encryptData(00000, $token),
);
In this example, you would assign your 'Token Key' on $token Variable
obtained from FrillPay. The payment request includes the apiKey
, reqestedId
, fName
, lName
, email
, amount
, currency
and accountno
parameters.
Where reqestedId
is your own 'Transaction ID' for your reference.
Upon receiving the payment request, FrillPay's API will process the transaction and provide a response indicating the status of the payment. You can then handle the response accordingly in your integration code.
FrillPay's API authentication ensures secure and authorized access to the payment gateway API. To authenticate API requests, you need to include the necessary authentication credentials in your API requests. FrillPay currently supports the following authentication methods:
//Arranging necessory parameters
$apiKey = [YOUR-API-KEY-HERE]; // Replace with your actual API Key
$token = [YOUR-TOKEN-KEY-HERE]; // Replace with your actual Token Key
Please note that it's crucial to keep your authentication credentials secure and confidential. Do not share your API key or access tokens with unauthorized individuals or expose them in public repositories.
FrillPay's API provides a endpoint that allow you to perform payment operation.
Description: Initiates a payment transaction.
// Preparing data to send to the Payment Gateway (FrillPay)
$data = array(
'apiKey' => encryptData($apiKey, $token),
'reqestedId' => encryptData($requestedId, $token),
'fName' => encryptData("John", $token),
'lName' => encryptData("Doe", $token),
'email' => encryptData("[email protected]", $token),
'amount' => encryptData(100.00, $token),
'currency' => encryptData(USD, $token),
'accountno' => encryptData(00000, $token),
);
Parameters:
apiKey
(string): Your unique API Key.reqestedId
(string): You will receive response with this ID.fName
(string): The customer's first name.lName
(string): The customer's last name.email
(string): The email address of the customer initiating the payment.amount
(number): The amount to be charged.currency
(string): Enter supported currency (USD).accountno
(string): The unique identifier of your customer.Fetching of Response Example:
// Function to decrypt data using AES decryption
function decryptData($data, "YOUR-TOKEN-KEY-HERE") {
$data = base64_decode($data);
$ivSize = openssl_cipher_iv_length('aes-256-cbc');
$iv = substr($data, 0, $ivSize);
$encryptedData = substr($data, $ivSize);
$decrypted = openssl_decrypt($encryptedData, 'aes-256-cbc', "YOUR-TOKEN-KEY-HERE", OPENSSL_RAW_DATA, $iv);
return $decrypted;
}
// GETTING RESPONSE BACK FROM PAYMENT GATEWAY
if(isset($_GET['status']) && isset($_GET['message']))
{
echo $status = decryptData($_GET['status'],"YOUR-TOKEN-KEY-HERE");
echo $message = decryptData($_GET['message'],"YOUR-TOKEN-KEY-HERE");
echo $reqestedId = decryptData($_GET['reqestedId'],"YOUR-TOKEN-KEY-HERE");
echo $trId = decryptData($_GET['transaction_id'],"YOUR-TOKEN-KEY-HERE");
echo $amount = decryptData($_GET['amount'],"YOUR-TOKEN-KEY-HERE");
echo $receivableAmount = decryptData($_GET['receivableAmount'],"YOUR-TOKEN-KEY-HERE");
}
else
{
echo "No response";
}
Response Example:
'status' => 200,
'message' => "Payment processed successfully.",
'transaction_id' => "FP-509247",
'reqestedId' => "Abc123321",
'amount' => 10.00,
'receivableAmount' => 9.80
Response Codes:
200 OK
: The request was successful, and the payment was processed.400 Bad Request
: The request parameters were invalid or incomplete.401 Unauthorized
: The authentication credentials provided were invalid or missing.403 Forbidden
: The server understood the request, but the server refuses to authorize it.404 Not Found
: The requested resource could not be found on the server.500 Internal Server Error
: An error occurred on the server-side.Error Handling:
If an error occurs during the API request, FrillPay will return an appropriate error response along with an error code and a descriptive message. It is recommended to handle errors gracefully and provide meaningful feedback to users.
FrillPay API supports the use of redirect method with ecryption for requests and to get responses. This provides a lightweight and easy-to-parse structure for exchanging data.
The request should be formatted like below, containing the necessary parameters for the API endpoint being called. An example request is shown below:
// Preparing data to send to the Payment Gateway (FrillPay)
$data = array(
'apiKey' => encryptData($apiKey, $token),
'reqestedId' => encryptData($requestedId, $token),
'fName' => encryptData("John", $token),
'lName' => encryptData("Doe", $token),
'email' => encryptData("[email protected]", $token),
'amount' => encryptData(100.00, $token),
'currency' => encryptData(USD, $token),
'accountno' => encryptData(00000, $token),
);
An example response from FrillPay is shown below:
Response Example:
'status' => 200,
'message' => "Payment processed successfully.",
'transaction_id' => "FP-509247",
'reqestedId' => "Abc123321",
'amount' => 10.00,
'receivableAmount' => 9.80
The following are the data structures and field descriptions used in the request and response:
apiKey
(string): Your unique API Key.reqestedId
(string): You will receive response with this ID.fName
(string): The customer's first name.lName
(string): The customer's last name.email
(string): The email address of the customer initiating the payment.amount
(number): The amount to be charged in the specified currency.currency
(string): Enter supported currency (USD).accountno
(string): The unique identifier of your customer.FrillPay provides integration guide to assist businesses in integrating the payment gateway API. Below is a step-by-step guide and code example for popular integration scenario:
Follow these steps to integrate FrillPay API into your PHP application:
<?php
//Arranging necessory parameters
$apiKey = [YOUR-API-KEY-HERE]; // Replace with your actual API Key
$token = [YOUR-TOKEN-KEY-HERE]; // Replace with your actual Token Key
// Collect form data
$reqestedId = "Abc123321";
$fName = "John"
$lName = "Doe"
$email = "[email protected]"
$amount = 100;
$currency = "USD";
$accountno = "000000";
$websiteURL = "[MERCHANT_CALL_BACK_URL_FOR_DEPOSIT]"; // Where to redirect after a Deposit?
// Preparing the data to be sent to the payment gateway (FrillPay)
$data = array(
'apiKey' => encryptData($apiKey, $token),
'reqestedId' => encryptData($reqestedId, $token),
'fName' => encryptData($fName, $token),
'lName' => encryptData($lName, $token),
'email' => encryptData("$email", $token),
'amount' => encryptData($amount, $token),
'currency' => encryptData($currency, $token),
'accountno' => encryptData($accountno, $token),
'websiteURL' => encryptData($websiteURL, $token),
);
// Sending the data to the FrillPay
$queryString = http_build_query(array_merge($data, ['token' => $token]));
// URL to hit for Deposit
$redirectUrl = 'https://frillpay.com/merchant-dashboard/fp-payment.php?' . $queryString;
// Redirect to the URL
redirect($redirectUrl);
exit();
?>
<?php
//Arranging necessory parameters
$apiKey = [YOUR-API-KEY-HERE]; // Replace with your actual API Key
$token = [YOUR-TOKEN-KEY-HERE]; // Replace with your actual Token Key
// Collect form data
$reqestedId = "Abc123321";
$name = "John Doe";
$email = "[email protected]";
$amount = 100;
$websiteURL = "[MERCHANT_CALL_BACK_URL_FOR_DEPOSIT]"; // Where to redirect after a Withdrawal?
$data = array(
'apiKey' => encryptData($apiKey, $token),
'reqestedId' => encryptData($reqestedId, $token),
'name' => encryptData($name, $token),
'email' => encryptData($email, $token),
'amount' => encryptData($amount, $token),
'websiteURL' => encryptData($websiteURL, $token),
);
$queryString = http_build_query(array_merge($data, ['token' => $token]));
// URL to hit for Withdraw
$redirectUrl = 'https://frillpay.com/mrc-wdrw-fr-usr?' . $queryString;
// Redirect to the URL
redirect($redirectUrl);
exit();
?>
These integration guides aim to provide a clear understanding of how to integrate the FrillPay API seamlessly into your platform on PHP programming language. By following the step-by-step guides and implementing best practices, you can ensure a smooth integration experience.
FrillPay offers a dedicated sandbox environment for businesses to test their integration and ensure smooth functionality before going live. Follow the instructions below to access the sandbox environment:
It is recommended to perform extensive testing in the sandbox environment using dummy data to simulate various scenarios. FrillPay provides a dummy FrillPay wallet account details for testing purposes right after the completion of on-boarding processes.
By using the sandbox environment and the provided dummy FrillPay wallet account, businesses can thoroughly test their integration, validate payment flows, and ensure seamless functionality before moving to the production environment.
Please be noted: If you've enabled the 'Sandbox Testing' from your Merchant Dashboard, no more new transactions will be functional as it's just for the testing purposes, furthermore upon using of a dummy account, the payment would be deducted from the 'Testing FrillPay's Wallet' and upon using of any of the real FrillPay wallet the payment wouldn't be deducted from the FrillPay's real wallet.
At FrillPay, we prioritize the security and integrity of our payment gateway and API services. We have implemented robust security measures to safeguard sensitive data and ensure a secure environment for all transactions. Some of the security measures we have in place include:
To ensure the security of your integration with our API, we recommend following these best practices:
By adhering to these security practices and partnering with FrillPay, you can trust that your payment gateway integration is secure, compliant, and built with the highest standards of security in mind.
While integrating with FrillPay's payment gateway API, it's important to be familiar with common error codes and their meanings. This will help you handle errors effectively and provide a better user experience. Below are some of the common error codes you may encounter:
Error Code | Meaning |
---|---|
400 | Bad Request - The request was invalid or missing required parameters. |
401 | Unauthorized - Authentication credentials are missing or invalid. |
403 | Forbidden - The requested operation is not allowed. |
404 | Not Found - The requested resource could not be found. |
500 | Internal Server Error - An unexpected error occurred on the server. |
When handling errors, it's important to provide meaningful error messages to your users. You can include additional information in the error response to help users understand the issue and take appropriate actions. Here are some guidelines for handling errors and troubleshooting common issues:
By following these guidelines, you can effectively handle errors, minimize user frustration, and ensure a smooth payment experience for your customers.
If you require any assistance or have questions regarding the integration of FrillPay's payment gateway API, our support team is here to help. Please don't hesitate to reach out to us using the contact information provided below:
API Support Email: [email protected]
We strive to provide timely and comprehensive support to ensure a smooth integration experience for our partners. Don't hesitate to reach out to us whenever you need assistance or have inquiries.
Before integrating and using FrillPay's payment gateway API, it's important to familiarize yourself with our terms of service and usage policies. These guidelines ensure a fair and secure environment for all users. Please carefully review the following terms:
These terms of service ("Agreement") constitute a legal agreement between FrillPay ("Provider") and your company ("Client") regarding the use of FrillPay's payment gateway API ("API"). By accessing or using the API, you agree to be bound by the terms and conditions outlined in this Agreement.
1.1 Access: Provider grants Client a non-exclusive, non-transferable right to access and use the API solely for the purpose of processing payments on Client's website or application.
1.2 Usage Restrictions: Client shall not use the API in a manner that violates any applicable laws or regulations. Client shall not sublicense, resell, or distribute the API or any data obtained through the API without prior written consent from Provider.
2.1 Ownership: Provider retains all rights, title, and interest in the API, including any intellectual property rights associated with it. Client acknowledges that no ownership rights are transferred to them through this Agreement.
2.2 Client Materials: Client grants Provider a limited, non-exclusive license to use any Client materials provided to Provider for the purpose of performing its obligations under this Agreement.
3.1 Limitation of Liability: Provider shall not be liable for any direct, indirect, incidental, consequential, or special damages arising out of or in connection with the API or this Agreement, even if Provider has been advised of the possibility of such damages.
3.2 Indemnification: Client agrees to indemnify, defend, and hold Provider harmless from any claims, losses, damages, liabilities, and expenses arising out of or in connection with Client's use of the API or any violation of this Agreement.
4.1 Termination: Provider may terminate this Agreement and suspend Client's access to the API at any time for any reason without prior notice.
4.2 Effect of Termination: Upon termination, Client shall immediately cease all use of the API and return or destroy any confidential information or materials provided by Provider.
By using the API, Client acknowledges that they have read, understood, and agreed to the terms and conditions outlined in this Agreement.
If you have any questions or concerns regarding our terms of service, please contact our support team for further clarification.
At FrillPay, we strive to maintain a secure and reliable payment gateway service. To ensure a safe and fair environment for all users, we have established the following usage policies:
By integrating and utilizing our payment gateway API, you acknowledge and agree to abide by these terms and policies. It's essential to ensure compliance to maintain a positive working relationship with FrillPay and to protect the interests of all parties involved.
If you have any questions or require clarification regarding our terms of service or usage policies, please contact our support team for further assistance.