Configure Webhook
- You can now configure webhooks from the merchant dashboard. Click here to know how to add a new webhook.
- Ensure you do not process duplicate events.
- SUBSCRIPTION_STATUS_CHANGE
- SUBSCRIPTION_NEW_PAYMENT
- SUBSCRIPTION_PAYMENT_CANCELLED
- SUBSCRIPTION_PAYMENT_DECLINED
- SUBSCRIPTION_AUTH_STATUS
- REFUND_STATUS
SUBSCRIPTION_STATUS_CHANGE
📘 The parameters “cf_subscriptionId” will be available from 31st July 2023 onwards.
SUBSCRIPTION_NEW_PAYMENT
📘 The parameters “cf_subscriptionId” and “cf_merchantTxnId” will be available from 31st July 2023 onwards.
SUBSCRIPTION_PAYMENT_CANCELLED
📘 The parameters “cf_subscriptionId” and “cf_merchantTxnId” will be available from 31st July 2023 onwards.
SUBSCRIPTION_PAYMENT_DECLINED
📘 The parameters “cf_subscriptionId” and “cf_merchantTxnId” will be available from 31st July 2023 onwards.
SUBSCRIPTION_AUTH_STATUS
📘 The parameters “cf_subscriptionId” and “cf_merchantTxnId” will be available from 31st July 2023 onwards.
REFUND_STATUS
Verify Signature
Verifying the signature (passed along with the POST parameters) is mandatory before you process any response. We also recommend whitelisting only our IP address on your webhook endpoint. Follow the steps below to calculate & verify the signature on the webhook payload:- Please sort the webhook payload in alphabetical order based on fields which are starting with field cf_.
- Append the key-value pair w/o using any delimiter and create a string.
- Hash the string using the secret key which will be provided to you.
- Encode the hashed string using base64 and generate the signature.
-
Sample web hook payload -
-
Sorted web hook payload -
cf_amount1cf_eventSUBSCRIPTION_NEW_PAYMENTcf_eventTime2022-01-10 10:51:02cf_paymentId1cf_referenceId2cf_retryAttempts0cf_subReferenceId3 -
Signature generated using encoding with secret key -
tT9pXZkT2LuDzXacYDUaur7EX3dJgNKcITHQng44tns= - Generated signature should match the signature present in the webhook payload.
📘 We send the webhook response in a form data format.