Payment Response Handling

Let's see how to handle payment response !

Foloosi payments has two types of responses,

  • Foloosi handler for Popup Payment method.

  • Request post object for Hosting Payment method.

a. Foloosi handler

/* Foloosi handler for payment response handling
 * Add the below code inside the script tag to handle payment response
    foloosiHandler(response, function (e) {
      if( == 'success'){
        //responde success code
      if( == 'error'){
        //responde success code
      if( == 'closed'){
        //Payment Popup Closed

b. Redirects to site_return_url with post data

//sample post response
    "status": "success",
    "data": {
        "amount": 12.00,
        "currency": "AED",
        "transaction_no": "FLSXXXXXXXXXXABC",
        "optional1": "additional_field",
        "optional2": "additional_field",
        "optional3": "additional_field",


Visit for support requests or email to [email protected].

Developed by

Foloosi Technologies Pvt Ltd.


Copyrights (c) 2024 Foloosi

Last updated