Test and Validate Webhooks

Discussions

Ask a Question
Back to All

Test and Validate Webhooks

{

"Content-Type": "application/json",

"x-webhook-signature": "8fkiGDqeIDPL8dBfeqQWN+rb9JJDK4rWE8xMxMg4CjU=",

"x-webhook-timestamp": "1707305769119",

"x-webhook-version": "2022-09-01"

}

{

"data": {

    "order": {

        "order_id": "order_LFYUig8wNyTkB0rocR0eKMxY0ooOytqU01",

        "order_amount": 200,

        "order_currency": "INR",

        "order_tags": null

    },

    "payment": {

        "cf_payment_id": 14910424398,

        "payment_status": "SUCCESS",

        "payment_amount": 200,

        "payment_currency": "INR",

        "payment_message": "Transaction Successful",

        "payment_time": "2024-02-07T17:05:58+05:30",

        "bank_reference": "26510",

        "auth_id": null,

        "payment_method": {

            "card": {

                "channel": null,

                "card_number": "XXXXXXXXXXXX1034",

                "card_network": "mastercard",

                "card_type": "debit_card",

                "card_sub_type": "R",

                "card_country": "IN",

                "card_bank_name": "ICICI BANK"

            }

        },

        "payment_group": "debit_card"

    },

    "customer_details": {

        "customer_name": "ashutosh jadhav",

        "customer_id": "454",

        "customer_email": "[email protected]",

        "customer_phone": "7666220235"

    },

    "payment_gateway_details": {

        "gateway_name": null,

        "gateway_order_id": null,

        "gateway_payment_id": null,

        "gateway_status_code": null,

        "gateway_settlement": "CASHFREE"

    },

    "payment_offers": null

},

"event_time": "2024-02-07T17:06:09+05:30",

"type": "PAYMENT_SUCCESS_WEBHOOK"

}
$secretkey = "cfsk_ma_test_c7ac97dcb8ace6b50d4def7d7d8cad55_24b009f4";

we are trying to generate a hash signature with the above payload data and secret key, but we are not getting the expected signature("8fkiGDqeIDPL8dBfeqQWN+rb9JJDK4rWE8xMxMg4CjU=") to verify the payment success webhook.
Can you kindly check from your side and inform me if you are getting the result or not? Also, could you please share an example with me pertaining to this issue?