---
title: "Razorpay Webhook"
method: POST
path: "/v1/verification"
tags: ["Developer Management"]
---

# Razorpay Webhook

`POST /v1/verification`

## Request

- Base URL: `https://api.oneinfer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oneinfer.ai/v1/verification`
- Auth: HTTP bearer

Webhook endpoint to handle Razorpay payment status updates.
This endpoint will be called by Razorpay when payment status changes.

SETUP INSTRUCTIONS:
1. Configure webhook in Razorpay Dashboard:
   - Go to Settings > Webhooks in Razorpay Dashboard
   - Add webhook URL: https://yourdomain.com/webhook/razorpay
   - Select events: payment.captured, payment.failed, order.paid
   - Set webhook secret in environment variable: RAZORPAY_WEBHOOK_SECRET

2. Ensure the following environment variables are set:
   - RAZORPAY_KEY_ID: Your Razorpay Key ID
   - RAZORPAY_KEY_SECRET: Your Razorpay Key Secret
   - RAZORPAY_WEBHOOK_SECRET: Your Razorpay Webhook Secret
   - RAZORPAY_MERCHANT_ID: Your Razorpay Merchant ID

WORKFLOW:
1. User initiates payment via buy_credits endpoint
2. Order is created in Razorpay and stored in database
3. User completes payment on Razorpay
4. Razorpay sends webhook notification to this endpoint
5. Webhook verifies signature and processes payment
6. Credits are automatically added to user's account

SUPPORTED EVENTS:
- payment.captured: Payment successful and captured
- payment.failed: Payment failed
- order.paid: Order has been paid (alternative to payment.captured)

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/oneinfer/apis/oneinfer-apis.md) · [All operations](https://skmtc.dev/oneinfer/apis/oneinfer-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/oneinfer/apis/oneinfer-apis/revisions/5479122617c3?raw)
