### Query Documentation Example Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-widget-initialization.md Demonstrates how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. This is useful for retrieving specific information or clarifications not explicitly present on the page. ```http GET https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-widget-initialization.md?ask= ``` -------------------------------- ### Install react-foloosi-widget Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-2/payment-widget-initialization.md Install the react-foloosi-widget package using npm. ```bash npm install --save react-foloosi-widget ``` -------------------------------- ### Setup Extension and Refresh Cache Source: https://docs.foloosi.com/ecommerce-integrations/magento.md Run these Magento commands to upgrade the setup, flush the cache, compile dependency injection, and deploy static content. ```bash bin/magento setup:upgrade bin/magento cache:flush bin/magento setup:di:compile bin/magento setup:static-content:deploy ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.foloosi.com/ecommerce-integrations/cs-cart.md This example shows how to query the CS Cart documentation dynamically using an HTTP GET request with the 'ask' query parameter. ```http GET https://docs.foloosi.com/ecommerce-integrations/cs-cart.md?ask= ``` -------------------------------- ### Initialize Setup for Payment Source: https://docs.foloosi.com/mobile-sdk-integrations/flutter/make-payment.md Use this POST request to initialize the payment setup and obtain a reference token. Ensure you include the required headers and request body parameters. ```javascript { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } ``` ```javascript { "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" } ``` ```javascript { "message": "Invalid secret key" } ``` ```javascript { "message": "No routes found" } ``` -------------------------------- ### Initialize Setup for Payment Source: https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk-1/make-payment.md This endpoint is used to initialize the payment setup by providing transaction details and customer information. It returns a reference token required for processing the payment. ```APIDOC ## POST https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Description Initializes the payment setup by providing transaction details and customer information. Returns a reference token required for processing the payment. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Headers - **secret_key** (String) - Required - Your Merchant Key get from Foloosi Panel ### Parameters #### Request Body - **transaction_amount** (Double) - Required - **currency** (String) - Required - **customer_unique_identifier** (String) - Optional - **customer_mobile** (String) - Optional - **customer_email** (String) - Optional - **customer_name** (String) - Optional - **customer_city** (String) - Optional - **customer_address** (String) - Optional - **billing_state** (String) - Optional - **billing_country** (String) - Optional - **billing_postal_code** (String) - Optional - **description** (String) - Optional - Product or order information - **optional1** (String) - Optional - You can pass additional fields - **optional2** (String) - Optional - You can pass additional fields - **optional3** (String) - Optional - You can pass additional fields ### Response #### Success Response (200) - **message** (String) - Application setup successfully - **data** (Object) - **reference_token** (String) #### Response Example { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } #### Error Responses - **401: Unauthorized Invalid Api mode** ```json { "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" } ``` - **401: Unauthorized Invalid Header response** ```json { "message": "Invalid secret key" } ``` - **404: Not Found Invalid request type** ```json { "message": "No routes found" } ``` ``` -------------------------------- ### Initialize API Setup Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-3/create-payment-token.md This endpoint is used to initialize the API setup for creating a payment token. It requires essential transaction details and merchant credentials. ```APIDOC ## POST /aggregatorapi/web/initialize-setup ### Description Initializes the API setup for creating a payment token. This is a prerequisite for processing payments. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Headers - **secret_key** (String) - Required - Your Merchant Key obtained from the Foloosi Panel. ### Parameters #### Request Body - **currency** (String) - Required - The currency for the transaction. - **transaction_amount** (Double) - Required - The amount of the transaction. - **customer_name** (String) - Optional - The name of the customer. - **site_return_url** (String) - Optional - The URL to redirect to after payment completion (mandatory for hosting payment method). - **customer_unique_identifier** (String) - Optional - A unique identifier for the customer (mandatory for saved card payment method). - **billing_country** (String) - Optional - The billing country. - **billing_postal_code** (String) - Optional - The billing postal code. - **billing_state** (String) - Optional - The billing state. - **customer_city** (String) - Optional - The customer's city. - **customer_address** (String) - Optional - The customer's address. - **customer_mobile** (String) - Optional - The customer's mobile number. - **customer_email** (String) - Optional - The customer's email address. - **description** (String) - Optional - Product or order information. - **optional1** (String) - Optional - Additional field for custom data. - **optional2** (String) - Optional - Additional field for custom data. - **optional3** (String) - Optional - Additional field for custom data. - **partner_unique_reference** (String) - Optional - A unique ID for the partner, mandatory for partner flow transactions. ### Request Example ```json { "currency": "INR", "transaction_amount": 100.00, "customer_name": "John Doe", "site_return_url": "https://your-website.com/callback", "customer_unique_identifier": "user123", "billing_country": "India", "billing_postal_code": "400001", "billing_state": "Maharashtra", "customer_city": "Mumbai", "customer_address": "123 Main St", "customer_mobile": "9876543210", "customer_email": "john.doe@example.com", "description": "Order #12345", "optional1": "value1", "optional2": "value2", "optional3": "value3", "partner_unique_reference": "partnerRef789" } ``` ### Response #### Success Response (200) - **message** (String) - Indicates successful application setup. - **data** (Object) - Contains the reference token. - **reference_token** (String) - The generated token for the payment. #### Response Example (200 OK) ```json { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } ``` #### Error Responses - **401: Unauthorized Invalid Header response** - **message** (String) - "Invalid secret key" - **401: Unauthorized Invalid Api mode** - **message** (String) - "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" - **404: Not Found Invalid request type** - **message** (String) - "No routes found" ``` -------------------------------- ### Initialize Payment Setup Source: https://docs.foloosi.com/mobile-sdk-integrations/flutter/make-payment.md This API endpoint is used to initialize the payment setup by providing transaction details. It returns a reference token that can be used for subsequent payment processing. ```APIDOC ## POST https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Description Initializes the payment setup by providing transaction details and returns a reference token for further payment processing. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Headers - **secret_key** (String) - Required - Your Merchant Key get from Foloosi Panel ### Parameters #### Request Body - **source** (String) - Required - For apple pay "ios_sdk" should be passed - **transaction_amount** (Double) - Required - The amount of the transaction. - **currency** (String) - Required - The currency of the transaction. - **customer_mobile** (String) - Required - The customer's mobile number. - **customer_email** (String) - Required - The customer's email address. - **customer_name** (String) - Required - The customer's name. - **customer_city** (String) - Optional - The customer's city. - **customer_address** (String) - Optional - The customer's address. - **billing_state** (String) - Optional - The billing state. - **billing_country** (String) - Optional - The billing country. - **billing_postal_code** (String) - Optional - The billing postal code. - **customer_unique_identifier** (String) - Optional - Unique identifier for the customer, mandatory for saved card payments. - **description** (String) - Optional - Product or order information. - **optional1** (String) - Optional - Additional field. - **optional2** (String) - Optional - Additional field. - **optional3** (String) - Optional - Additional field. ### Response #### Success Response (200) - **message** (String) - Indicates successful application setup. - **data** (Object) - Contains the reference token. - **reference_token** (String) - The token generated for the payment. #### Response Example (200) { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGV3XyR2J Gk MTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } #### Error Responses - **401: Unauthorized Invalid Api mode** - Invalid Integration settings. - **401: Unauthorized Invalid Header response** - Invalid secret key. - **404: Not Found Invalid request type** - No routes found. ``` -------------------------------- ### Get Reference Token Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-2/create-payment-token.md This endpoint is used to initialize the API setup and obtain a reference token. It requires a secret key in the headers and a JSON payload with transaction and customer details. ```APIDOC ## POST https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Description Used to initialize the API setup and confirm the features you intend to use, returning a reference token. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Parameters #### Headers - **secret_key** (String) - Required - Your Merchant Key get from Foloosi Panel #### Request Body - **currency** (String) - Required - **transaction_amount** (Double) - Required - **customer_name** (String) - Optional - **site_return_url** (String) - Optional - Mandatory for Hosting Payment Method. Get's the payment response after payment complete. - **customer_unique_identifier** (String) - Optional - Mandatory for Saved Card Payment Method. Must be Unique like email id, customer id, etc. - **billing_country** (String) - Optional - **billing_postal_code** (String) - Optional - **billing_state** (String) - Optional - **customer_city** (String) - Optional - **customer_address** (String) - Optional - **customer_mobile** (String) - Optional - **customer_email** (String) - Optional - **description** (String) - Optional - Product or order information - **optional1** (String) - Optional - You can pass additional fields - **optional2** (String) - Optional - You can pass additional fields - **optional3** (String) - Optional - You can pass additional fields - **partner_unique_reference** (String) - Optional - Mandatory when the transaction is based on partner flow. ### Response #### Success Response (200) - **message** (String) - Application setup successfully - **data** (Object) - Contains the reference token - **reference_token** (String) - The generated reference token #### Response Example ```json { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } ``` #### Error Response - **401: Unauthorized Invalid Header response** ```json { "message": "Invalid secret key" } ``` - **401: Unauthorized Invalid Api mode** ```json { "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" } ``` - **404: Not Found Invalid request type** ```json { "message": "No routes found" } ``` ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-response-handling.md Demonstrates how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. This is useful for retrieving specific information or clarifications. ```http GET https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-response-handling.md?ask= ``` -------------------------------- ### Initialize API Setup Success Response Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-2/create-payment-token.md This snippet shows a successful response when initializing the API setup. It includes a message and a data object containing the reference token. ```javascript { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.foloosi.com/mobile-sdk-integrations/flutter/installation.md To ask questions about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. ```http GET https://docs.foloosi.com/mobile-sdk-integrations/flutter/installation.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.foloosi.com/payment-methods/popup-payment-method.md Use this GET request to ask questions about the documentation. Replace with your specific query. ```http GET https://docs.foloosi.com/payment-methods/popup-payment-method.md?ask= ``` -------------------------------- ### Query Documentation Source: https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk/payment-response-handling.md To get additional information not present on the page, perform a GET request with the 'ask' query parameter. ```http GET https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk/payment-response-handling.md?ask= ``` -------------------------------- ### Initialize Api Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/create-payment-token.md This endpoint initializes the API setup for a payment transaction. It requires essential details like currency and transaction amount, along with optional customer and partner information. A reference token is returned upon successful setup, which is crucial for proceeding with payment methods like Hosting Payment or Saved Card Payment. ```APIDOC ## POST https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Description Initializes the API setup for a payment transaction, returning a reference token for subsequent operations. This is used to confirm the feature you are about to use. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Headers - **secret_key** (String) - Required - Your Merchant Key get from Foloosi Panel ### Parameters #### Request Body - **currency** (String) - Required - **transaction_amount** (Double) - Required - **customer_name** (String) - Optional - **site_return_url** (String) - Optional - Mandatory for Hosting Payment Method. Get the payment response after payment complete. - **customer_unique_identifier** (String) - Optional - Mandatory for Saved Card Payment Method. This data must be Unique like email id, customer id, etc. - **billing_country** (String) - Optional - **billing_postal_code** (String) - Optional - **billing_state** (String) - Optional - **customer_city** (String) - Optional - **customer_address** (String) - Optional - **customer_mobile** (String) - Optional - **customer_email** (String) - Optional - **description** (String) - Optional - Product or order information - **optional1** (String) - Optional - You can pass additional fields - **optional2** (String) - Optional - You can pass additional fields - **optional3** (String) - Optional - You can pass additional fields - **partner_unique_reference** (String) - Optional - Partner unique ID. Mandatory when transaction is based on partner flow. ### Response #### Success Response (200) - **message** (String) - Application setup successfully - **data** (Object) - Contains the reference token - **reference_token** (String) - The token generated for the payment session #### Response Example (200 OK) { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } #### Error Response (401 Unauthorized Invalid Header) { "message": "Invalid secret key" } #### Error Response (401 Unauthorized Invalid Api mode) { "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" } #### Error Response (404 Not Found Invalid request type) { "message": "No routes found" } ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-2.md Use this method to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://docs.foloosi.com/client-side-integrations/javascript-integration-2.md?ask= ``` -------------------------------- ### Query Foloosi Documentation via HTTP GET Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/sample-integrations.md Use this HTTP GET request to query the Foloosi documentation dynamically. Include your specific question in the 'ask' query parameter. ```http GET https://docs.foloosi.com/client-side-integrations/javascript-integration-1/sample-integrations.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-3/create-payment-token.md Use this endpoint to ask questions about the documentation dynamically. The response includes direct answers and relevant excerpts. ```http GET https://docs.foloosi.com/client-side-integrations/javascript-integration-3/create-payment-token.md?ask= ``` -------------------------------- ### Initiate Payment with Order Object Source: https://docs.foloosi.com/mobile-sdk-integrations/android-sdk/initiate-payment.md Call the makePayment method with the populated OrderData object to start the payment process. ```java FoloosiPay.makePayment(orderData); ``` -------------------------------- ### Query Documentation Source: https://docs.foloosi.com/payment-links To ask a question about the documentation, perform an HTTP GET request on the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.foloosi.com/payment-links.md?ask= ``` -------------------------------- ### Install Foloosi Payment Extension for CS Cart Source: https://docs.foloosi.com/ecommerce-integrations/cs-cart.md This snippet outlines the steps to install the Foloosi Payment Gateway extension on your CS Cart store. It includes downloading the extension, executing SQL scripts, and uploading plugin files. ```bash execute the file named 'install_foloosi.sql'. This has to be executed against your cscart database. You can use phpmyadmin to import the file into your cscart database or Copy-Paste the content to run directly on your mysql shell. ``` ```bash Contents of downloaded **app** folder goes into **app** folder of the directory and contents of downloaded **design** folder goes into **design** folder of the directory. ``` -------------------------------- ### Query Foloosi Documentation Source: https://docs.foloosi.com/webhooks.md To ask a question about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.foloosi.com/webhooks.md?ask= ``` -------------------------------- ### POST /aggregatorapi/web/initialize-setup Source: https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk/initiate-payment.md Initiates a payment setup by providing transaction details and retrieving a reference token. This is the first step for processing payments via the Foloosi iOS SDK. ```APIDOC ## POST /aggregatorapi/web/initialize-setup ### Description Initiates a payment setup by providing transaction details and retrieving a reference token. This is the first step for processing payments via the Foloosi iOS SDK. ### Method POST ### Endpoint https://api.foloosi.com/aggregatorapi/web/initialize-setup ### Headers - **secret_key** (String) - Required - Your Merchant Key get from Foloosi Panel ### Parameters #### Request Body - **source** (String) - Required - For apple pay "ios_sdk" should be passed - **transaction_amount** (Double) - Required - - **currency** (String) - Required - - **customer_mobile** (String) - Required - - **customer_email** (String) - Required - - **customer_name** (String) - Required - - **customer_city** (String) - Optional - - **customer_address** (String) - Optional - - **billing_state** (String) - Optional - - **billing_country** (String) - Optional - - **billing_postal_code** (String) - Optional - - **customer_unique_identifier** (String) - Optional - This is mandatory when you are using saved card payment. This data must be Unique like email id, customer id, etc. - **description** (String) - Optional - Product or order information - **optional1** (String) - Optional - You can pass additional fields - **optional2** (String) - Optional - You can pass additional fields - **optional3** (String) - Optional - You can pass additional fields ### Request Example ```json { "source": "ios_sdk", "transaction_amount": 100.50, "currency": "INR", "customer_mobile": "9876543210", "customer_email": "test@example.com", "customer_name": "John Doe", "customer_city": "Mumbai", "customer_address": "123 Main St", "billing_state": "Maharashtra", "billing_country": "India", "billing_postal_code": "400001", "customer_unique_identifier": "unique_user_id_123", "description": "Order #12345" } ``` ### Response #### Success Response (200) - **message** (String) - Application setup successfully - **data** (Object) - Contains the reference token - **reference_token** (String) - The token generated for the payment #### Response Example ```json { "message": "Application setup successfully", "data": { "reference_token": "U0sjdGVzdF8kMnkkMTAkM21LRi0xZGliVDhldTV4NHlZSm9tZXZobnZxWTNEVnZmay1MdHNndTNFenNBTDU0clhWYkccVE4jRkxTQVBJNWM3Njk2ZDkwOWIzNxxSVCMkMnkkMTAkQXZ4ay9wdjlpTFlYLzRSZ2FjSkxpZWhHb2o0U0wvTFpZNXAyVjRGOVFycWNQZ2lHQ3VEZ08=" } } ``` #### Error Responses - **401: Unauthorized Invalid Api mode** ```json { "message": "Invalid Integration settings! Kindly check both foloosi merchant application settings and your integration keys" } ``` - **401: Unauthorized Invalid Header response** ```json { "message": "Invalid secret key" } ``` - **404: Not Found Invalid request type** ```json { "message": "No routes found" } ``` ### SDK Usage Make the payment with the order reference token ```java var referenceToken = "Your Reference Token" FoloosiPay.makePaymentWithReferenceToken(referenceToken) ``` ``` -------------------------------- ### Initialize Payment Module Options Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/payment-widget-initialization.md Configure the payment module with your reference token, merchant key, and redirect preference. Set 'redirect' to true to handle payments on the Foloosi site, or false to process payments on your own hosting site. ```javascript var options = { "reference_token" : "REFERENCE_TOKEN", //which is get from payment initialize "merchant_key" : "YOUR_MERCHANT_KEY", // get the merchant key from foloosi panel "redirect" : false //for accept payment from hosting site, make it as true } var fp1 = new Foloosipay(options); ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.foloosi.com/card-details To get specific information not explicitly found on a page, perform an HTTP GET request to the page URL with an 'ask' query parameter. The question should be specific and in natural language. ```HTTP GET https://docs.foloosi.com/card-details.md?ask= ``` -------------------------------- ### Initialize Foloosi SDK Source: https://docs.foloosi.com/mobile-sdk-integrations/android-sdk/initiate-payment.md Initialize the SDK with your merchant key and an optional custom color for the checkout page. This should be done early in your application's lifecycle. ```java InitData initData = new InitData(); initData.setMerchantKey(merchantKey); //YOUR MERCHANT KEY initData.setCustomColor(customColor); // SDK CUSTOM COLOR FoloosiPay.init(this, initData); ``` -------------------------------- ### Initialize Foloosi SDK Source: https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk-1/make-payment.md Initialize the Foloosi SDK with your merchant key and optional custom color for the payment page. Ensure your public key is correctly provided. ```javascript import Foloosi from 'react-native-foloosi'; var initData = { merchantKey: 'YOUR_KEY', // public key customColor: '#AB34FD', // make payment page loading color as app color. // optional }; Foloosi.initSDK(JSON.stringify(initData)) ``` -------------------------------- ### Get Transaction List Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-2/additional-setup.md Retrieve a list of transactions associated with your merchant key using a GET request to the Foloosi API. ```APIDOC ## GET /v1/api/transaction-list ### Description Retrieves a list of transactions specific to a merchant key. ### Method GET ### Endpoint https://api.foloosi.com/v1/api/transaction-list ### Headers - **secret_key** (string) - Required - Your unique secret key for authentication. ### Response #### Success Response (200) - **message** (string) - A message indicating the status of the request. - **data** (object) - Contains the transaction details. - **transactions** (array) - A list of transaction objects. - **transaction_no** (string) - Unique identifier for the transaction. - **send_amount** (number) - The amount sent by the sender. - **sender_currency** (string) - The currency of the amount sent. - **tip_amount** (number) - Any tip amount included. - **receive_currency** (string) - The currency received. - **special_offer_applied** (string) - Indicates if a special offer was applied. - **sender_amount** (number) - The total amount from the sender. - **receive_amount** (number) - The total amount received. - **offer_amount** (number) - The amount of any offer applied. - **vat_amount** (number) - The amount of Value Added Tax. - **foloosi_fee** (number) - The Foloosi transaction fee. - **transaction_fixed_fee** (number) - A fixed transaction fee. - **customer_foloosi_fee** (number) - The customer's Foloosi fee. - **status** (string) - The status of the transaction (e.g., 'success'). - **created** (string) - The timestamp when the transaction was created. - **sender** (object) - Details about the sender. - **name** (string) - The name of the sender. - **email** (string) - The email of the sender. - **business_name** (string) - The business name of the sender (can be null). - **phone_number** (string) - The phone number of the sender. ### Response Example { "message": "Merchant sales report are", "data": { "transactions": [ { "transaction_no": "FLSXXXXXXXXXXXXXXX1", "send_amount": 1.35, "sender_currency": "AED", "tip_amount": 0, "receive_currency": "AED", "special_offer_applied": "No", "sender_amount": 1.35, "receive_amount": 1.35, "offer_amount": 0, "vat_amount": 0.05, "foloosi_fee": 0.04, "transaction_fixed_fee": 1, "customer_foloosi_fee": 0, "status": "success", "created": "2022-10-18T07:52:38+00:00", "sender": { "name": "Foloosi", "email": "dev@foloosi.com", "business_name": null, "phone_number": "9870162534" } } ] } } ``` -------------------------------- ### Get Transaction Details (v1) Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/additional-setup.md Use this GET request to retrieve basic transaction details. It requires your secret key in the headers. ```javascript GET API LINK: https://api.foloosi.com/v1/api/transaction-detail/YOUR_TRANSACTION_ID HEADERS: secret_key : YOUR_SECRET_KEY SAMPLE RESPONSE ON API v1: { "message": "Transaction detail are", "data": { "transaction_no": "FLSXXXXXXXXXXXXXX", "payment_transaction_id": "1234567-819201112", "receipt": null, "request_currency": "AED", "request_amount": 18, "customer_currency": "AED", "customer_amount": 18, "merchant_currency": null, "merchant_amount": null, "status": "pending", "created": "2022-11-01T10:21:04+00:00", "optional1": "order-id-123",\optional fields passed on initialize api "optional2": "order-reference",\optional fields passed on initialize api "optional3": "",\optional fields passed on initialize api "subscription_no": "" } } ``` -------------------------------- ### Initialize Foloosi SDK Source: https://docs.foloosi.com/mobile-sdk-integrations/ios-sdk/initiate-payment.md Initialize the Foloosi SDK with your merchant key and an optional custom color for the payment page. The delegate must be set for callbacks. ```swift let initData = InitData() initData.merchantKey = "merchantKey" //"Your Unique Merchant Key" initData.customColor = "costomColor" // It must be valid 6 digit hexadecimal color to make payment page loading color as app color. FoloosiPay.initSDK(initData: initData, withDelegate: self) ``` -------------------------------- ### Install Foloosi Angular Package Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-3/payment-widget-initialization.md Install the Foloosi Angular package using npm. This command adds the necessary library to your project dependencies. ```bash npm install --save foloosi-angular ``` -------------------------------- ### Get Transaction List Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/additional-setup.md Retrieve a list of transactions for a specific merchant using a GET request. This endpoint requires your secret key for authentication. ```APIDOC ## GET /v1/api/transaction-list ### Description Retrieves a list of transactions associated with the provided merchant secret key. ### Method GET ### Endpoint https://api.foloosi.com/v1/api/transaction-list ### Headers - **secret_key** (string) - Required - Your unique secret key for authentication. ### Response #### Success Response (200) - **message** (string) - A confirmation message. - **data** (object) - Contains the transaction details. - **transactions** (array) - A list of transaction objects. - **transaction_no** (string) - Unique identifier for the transaction. - **send_amount** (number) - The amount sent by the customer. - **sender_currency** (string) - The currency of the amount sent. - **tip_amount** (number) - Any tip amount included. - **receive_currency** (string) - The currency received. - **special_offer_applied** (string) - Indicates if a special offer was applied. - **sender_amount** (number) - The amount received from the sender. - **receive_amount** (number) - The amount received. - **offer_amount** (number) - The amount of any offer discount. - **vat_amount** (number) - The amount of VAT applied. - **foloosi_fee** (number) - The Foloosi transaction fee. - **transaction_fixed_fee** (number) - A fixed transaction fee. - **customer_foloosi_fee** (number) - Customer-specific Foloosi fee. - **status** (string) - The status of the transaction (e.g., 'success'). - **created** (string) - The timestamp when the transaction was created. - **sender** (object) - Details of the sender. - **name** (string) - Sender's name. - **email** (string) - Sender's email address. - **business_name** (string) - Sender's business name (can be null). - **phone_number** (string) - Sender's phone number. ### Response Example { "message": "Merchant sales report are", "data": { "transactions": [ { "transaction_no": "FLSXXXXXXXXXXXXXXX1", "send_amount": 1.35, "sender_currency": "AED", "tip_amount": 0, "receive_currency": "AED", "special_offer_applied": "No", "sender_amount": 1.35, "receive_amount": 1.35, "offer_amount": 0, "vat_amount": 0.05, "foloosi_fee": 0.04, "transaction_fixed_fee": 1, "customer_foloosi_fee": 0, "status": "success", "created": "2022-10-18T07:52:38+00:00", "sender": { "name": "Foloosi", "email": "dev@foloosi.com", "business_name": null, "phone_number": "9870162534" } } ] } } ``` -------------------------------- ### Get Transaction Details (v1) Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/additional-setup.md Retrieves the details of a specific transaction using a GET request. This version provides basic transaction information. ```APIDOC ## GET /v1/api/transaction-detail/{YOUR_TRANSACTION_ID} ### Description Retrieves the details of a specific transaction using its ID. This API version returns basic transaction information. ### Method GET ### Endpoint `https://api.foloosi.com/v1/api/transaction-detail/YOUR_TRANSACTION_ID` ### Parameters #### Path Parameters - **YOUR_TRANSACTION_ID** (string) - Required - The unique identifier for the transaction. #### Headers - **secret_key** (string) - Required - Your secret API key for authentication. ### Response #### Success Response (200) - **message** (string) - A message indicating the status of the request. - **data** (object) - Contains the transaction details: - **transaction_no** (string) - The Foloosi transaction number. - **payment_transaction_id** (string) - The payment gateway's transaction ID. - **receipt** (string|null) - The receipt URL, if available. - **request_currency** (string) - The currency used for the transaction request. - **request_amount** (number) - The amount requested for the transaction. - **customer_currency** (string) - The currency the customer paid in. - **customer_amount** (number) - The amount paid by the customer. - **merchant_currency** (string|null) - The merchant's currency, if applicable. - **merchant_amount** (number|null) - The merchant's amount, if applicable. - **status** (string) - The current status of the transaction (e.g., 'pending'). - **created** (string) - The timestamp when the transaction was created. - **optional1** (string) - Optional field passed during initialization. - **optional2** (string) - Optional field passed during initialization. - **optional3** (string) - Optional field passed during initialization. - **subscription_no** (string) - The subscription number, if applicable. ### Response Example ```json { "message": "Transaction detail are", "data": { "transaction_no": "FLSXXXXXXXXXXXXXX", "payment_transaction_id": "1234567-819201112", "receipt": null, "request_currency": "AED", "request_amount": 18, "customer_currency": "AED", "customer_amount": 18, "merchant_currency": null, "merchant_amount": null, "status": "pending", "created": "2022-11-01T10:21:04+00:00", "optional1": "order-id-123", "optional2": "order-reference", "optional3": "", "subscription_no": "" } } ``` ``` -------------------------------- ### Get Transaction List Source: https://docs.foloosi.com/client-side-integrations/javascript-integration-1/additional-setup.md Use this GET request to retrieve a list of transactions associated with your merchant key. Ensure you include your secret key in the headers. ```javascript GET API LINK: https://api.foloosi.com/v1/api/transaction-list HEADERS: secret_key : YOUR_SECRET_KEY SAMPLE RESPONSE: { "message": "Merchant sales report are", "data": { "transactions": [ { "transaction_no": "FLSXXXXXXXXXXXXXXX1", "send_amount": 1.35, "sender_currency": "AED", "tip_amount": 0, "receive_currency": "AED", "special_offer_applied": "No", "sender_amount": 1.35, "receive_amount": 1.35, "offer_amount": 0, "vat_amount": 0.05, "foloosi_fee": 0.04, "transaction_fixed_fee": 1, "customer_foloosi_fee": 0, "status": "success", "created": "2022-10-18T07:52:38+00:00", "sender": { "name": "Foloosi", "email": "dev@foloosi.com", "business_name": null, "phone_number": "9870162534" } }, { "transaction_no": "FLSXXXXXXXXXXXXXXXX2", "send_amount": 385.66, "sender_currency": "AED", "tip_amount": 0, "receive_currency": "AED", "special_offer_applied": "No", "sender_amount": 385.66, "receive_amount": 385.66, "offer_amount": 0, "vat_amount": 0.69, "foloosi_fee": 12.73, "transaction_fixed_fee": 1, "customer_foloosi_fee": 0, "status": "success", "created": "2022-10-18T07:35:41+00:00", "sender": { "name": "foloosi tech", "email": "dev@foloosi.com", "business_name": null, "phone_number": "987654321" } } ] } } ``` -------------------------------- ### Make Payment with Reference Token Source: https://docs.foloosi.com/mobile-sdk-integrations/android-sdk/initiate-payment.md Use this method to initiate a payment after successfully obtaining a reference token from the initialize-setup API. Ensure the FoloosiPay SDK is properly integrated. ```java String referenceToken = "Your Reference Token"; FoloosiPay.makePaymentWithReferenceToken(referenceToken); ``` -------------------------------- ### Install Latest Foloosi Payment Gateway Version Source: https://docs.foloosi.com/ecommerce-integrations/magento.md Use this composer command to install the latest version of the Foloosi Payment Gateway module for Magento 2. ```bash composer require foloosi/paymentgateway:100.0.8 ``` -------------------------------- ### Get Transaction Details via API Source: https://docs.foloosi.com/subscriptions/api-subscription.md Use this GET request to retrieve details for a specific transaction using its ID. Ensure you include your secret key in the headers. ```javascript GET API LINK: https://api.foloosi.com/v1/api/transaction-detail/YOUR_TRANSACTION_ID HEADERS: secret_key : YOUR_SECRET_KEY SAMPLE RESPONSE: { "message": "Transaction detail are", "data": { "transaction_no": "FLSXXXXXXXXXXXXXX", "receipt": null, "request_currency": "AED", "request_amount": 18, "customer_currency": "AED", "customer_amount": 18, "merchant_currency": null, "merchant_amount": null, "status": "pending", "created": "2022-11-01T10:21:04+00:00", "optional1": "order-id-123",\optional fields passed on initialize api "optional2": "order-reference",\optional fields passed on initialize api "optional3": "",\optional fields passed on initialize api "subscription_no": "FLSSXXXXXXXXXXXXX" } } ```