Foloosi
  • INTRODUCTION
  • FEATURES
  • Get Started
    • Create Api Credentials
    • Checkout Page Customization
  • Payment Methods
    • Popup Payment Method
    • Hosting Payment Method
    • Saved Card Payment Method
  • CLIENT SIDE INTEGRATIONS
    • Javascript Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample Integrations
    • PHP Integration
      • Create Payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
      • Sample integrations
    • React JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
    • Angular JS Integration
      • Create payment Token
      • Payment Widget Initialization
      • Payment Response Handling
      • Additional Setup
  • ECOMMERCE INTEGRATIONS
    • WooCommerce
    • CS Cart
    • Ecwid
    • Opencart
    • Magento
    • Prestashop
  • MOBILE SDK INTEGRATIONS
    • Android SDK
      • Initiate Payment
      • Payment Response Handling
    • iOS SDK
      • Initiate Payment
      • Payment Response Handling
    • React Native SDK
      • Make Payment
    • Flutter SDK
      • Installation
      • Make Payment
      • Sample Dart Program
  • SUBSCRIPTIONS
    • Foloosi Subscription for WooCommerce
    • Api Subscription
      • Sample Integration
    • Subscription
  • WEBHOOKS
  • PARTNER PAYOUT
  • CARD DETAILS
    • Test Cards
Powered by GitBook
On this page
  • Understanding Webhooks !
  • Webhooks aren't Apis !
  • Developed by
  • License

Was this helpful?

WEBHOOKS

Our Webhook Support For Your Payment Module !

Webhooks sends small chunks of real-time payment information from one application to another in order to help prompt acknowledgement of payment status mitigating disputes and settlement issues by a significant margin.

Understanding Webhooks !

The name says it right! It's a hook that links two web applications.

Webhooks can be understood as Reverse APIs, because the one receiving information does not send requests like in an API instead, the application that is sending an Information is the one that triggers the transfer of data in the occurrence of an event.

Webhooks aren't Apis !

An API serves like a two-sided portal driven by requests and acknowledged by responses. A webhook sends small-sized data of information triggered by events. It is a service that allows one program(web application) to send data to another immediately after a particular event takes place.

Use Cases

Although there are many events that initiates a Webhook Trigger, let’s look at some obvious use cases with payments,

Successful Transaction,

A successful transaction is when the acquiring bank and the issuing bank have send their clearance and when this happens a webhook is triggered from the payment provider side to send customers prompt and verified notifications.

A sample script for successful transaction event,

{
    "data":{
        "transfer":{
            "transaction_status":"success",
            "transaction_no":"FLNIAREC61a859e4a8977",
            "payment_reference":"e8807a6b-4496-4b4d-a101-7eec0cf60754",
            "transaction_amount":"100",
            "transaction_currency":"AED",
            "transaction_message":"approved",
            "api":{
                "optional1":"FLSSUB_298617f8667047bb",
                "optional2":"Online Class",
                "optional3":"Foloosi developer",
                "customer_email":"[email protected]",
                "customer_mobile":"555534533",
                "card_last_four":"1111"
            }
        }
    }
}
{
    "data":{
        "transfer":{
            "transaction_status":"success",
            "transaction_no":"FLNIAREC61a859e4a8977",
            "payment_reference":"e8807a6b-4496-4b4d-a101-7eec0cf60754",
            "transaction_amount":"100",
            "transaction_currency":"AED",
            "transaction_message":"approved",
            "subscription":{
                "subscription_no": "FLSARE132nds08rrjrweewqq",
                "plan_no": "FSAPIPL141633e73bbb26121",
                "billing_type":"Monthly",
                "plan_name":"monthly renewal",
                "paid_count":"2",
                "status":"success"
            }
        }
    }
}

Delayed or Failed Transactions

There could be many underlying reasons for a Disputed and Failed transaction, to name a few, it could be traffic on the internet or a CNP fraudulent attempt and such. Whenever there is a visible delay in payment acknowledgement a trigger is initiated and webhook notifies your web app as soon as the bank sends clearance to the payment provider. Post this communication is when a payment is fully authorized.

A trigger to webhook happens when the bank notifies the payment provider about a failed transaction and this is instantly communicated to the customer. This data transfer is pivotal in cases where the customer’s issuing bank has debited the money and a pay_back has to be automated. A sample script for Delayed and Failed Payments,

{
    "data":{
        "transfer":{
            "transaction_status":"failed",
            "transaction_no":"FLNIAREC61a859e4a8977", //sometimes it get null
            "payment_reference":"e8807a6b-4496-4b4d-a101-7eec0cf60754", //sometimes it get null
            "transaction_amount":"100",
            "transaction_currency":"AED",
            "transaction_message":"Insufficient funds/declined",
            "api":{
                "optional1":"FLSSUB_298617f8667047bb",
                "optional2":"Online Class",
                "optional3":"Foloosi developer",
                "customer_email":"[email protected]",
                "customer_mobile":"555534533",
                "card_last_four":"1111"
            }
        }
    }
}
{
    "data":{
        "transfer":{
            "transaction_status":"failed",
            "transaction_no":"FLNIAREC61a859e4a8977", //sometimes it get null
            "payment_reference":"e8807a6b-4496-4b4d-a101-7eec0cf60754", //sometimes it get null
            "transaction_amount":"100",
            "transaction_currency":"AED",
            "transaction_message":"Insufficient funds/declined",
            "subscription":{
                "subscription_no": "FLSARE132nds08rrjrweewqq",
                "plan_no": "FSAPIPL141633e73bbb26121",
                "billing_type":"Monthly",
                "plan_name":"monthly renewal",
                "paid_count":"2",
                "status":"failed"
            }
        }
    }
}

Webhook Events for Payments

Webhook Event

Description

order.success

Triggered when a payment is successfully captured.

order.cancel

Triggered when a payment fails.

Payments reflect order status. A series of events happen when a Payment feedback is sent. An order is set to paid when a Payment is successful and is set to Cancel when a payment fails. This trigger the order.success and order.cancel Webhook events as well.

Support

Developed by

Foloosi Technologies Pvt Ltd.

License

Copyrights (c) 2025 Foloosi

PreviousSubscriptionNextPARTNER PAYOUT

Last updated 1 month ago

Was this helpful?

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

https://www.foloosi.com