---
title: "Handle Webhook"
method: POST
path: "/cashfree/webhook"
tags: ["payments"]
---

# Handle Webhook

`POST /cashfree/webhook`

## Request

- Base URL: `https://api.fincept.in` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fincept.in/cashfree/webhook`
- Auth: none declared

Production-grade Cashfree webhook handler.

Guarantees:
- Idempotent: a redelivery of an event that already completed is ignored
- Race-safe: SELECT FOR UPDATE serializes concurrent handlers on the payment
- Atomic: payment status + credit addition in a single DB commit
- Retryable: an internal failure answers 5xx so Cashfree redelivers, and the
  event row is only final ("processed") after a successful commit, so the
  redelivery is reprocessed instead of being dropped as a duplicate

State machine: pending -> processing -> activated | activation_failed | failed | cancelled

## Headers

- `x-webhook-timestamp` string
- `x-webhook-signature` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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