Skip to content

Razorpay Webhook Failing Due to Missing X-Razorpay-Signature Header(Test Mode) #453

@ra-ele

Description

@ra-ele

Summary
We're experiencing an issue where incoming webhook requests from Razorpay are failing due to the absence of the X-Razorpay-Signature header. This header is required to verify the authenticity of webhook events.

Expected Behavior
Webhook requests from Razorpay should include the X-Razorpay-Signature header to allow our server to verify the request using the webhook secret.

Actual Behavior
Webhook requests are reaching our server, but the X-Razorpay-Signature header is missing.
As a result, our verification logic rejects the webhook due to signature mismatch or absence.
This is causing critical events like payment.authorized to go unprocessed.

raw_req:
{
"REQUEST": {
"body": {
"entity": "event",
"account_id": "acc_QHMJOxK7sIesA6",
"event": "payment.authorized",
"contains": [
"payment"
],
"payload": {
"payment": {
"entity": {
"id": "pay_Qq7fR54m5Qt1bl",
"entity": "payment",
"amount": 580000,
"currency": "INR",
"status": "authorized",
"order_id": "order_Qq7esG4hZ5OZlM",
"invoice_id": "inv_Qq7erL95r9fLEs",
"international": false,
"method": "upi",
"amount_refunded": 0,
"refund_status": null,
"captured": false,
"description": "Monthly Subscription",
"card_id": null,
"bank": null,
"wallet": null,
"vpa": "fhcytf@okhdfcbank",
"email": "singh[email protected]",
"contact": "+919
9",
"customer_id": "cust_QiAwzxjzrOzlif",
"token_id": "token_Qq7fRdMbCPCoEM",
"notes": [],
"fee": null,
"tax": null,
"error_code": null,
"error_description": null,
"error_source": null,
"error_step": null,
"error_reason": null,
"acquirer_data": {
"rrn": "001000100002",
"upi_transaction_id": "npci_txn_id_for_Qq7fR54m5Qt1bl"
},
"created_at": 1751879341,
"upi": {
"vpa": "fhcytf@okhdfcbank"
}
}
}
},
"created_at": 1751879342
},
"headers": {}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions