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"
            }
        }
    }
}

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"
            }
        }
    }
}

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

Visit https://www.foloosi.com for support requests or email to [email protected].

Developed by

Foloosi Technologies Pvt Ltd.

License

Copyrights (c) 2024 Foloosi

Last updated