---
title: "Subscription Webhook"
method: POST
path: "/api/v1/wallet/subscription/webhook"
tags: ["Wallet"]
---

# Subscription Webhook

`POST /api/v1/wallet/subscription/webhook`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/wallet/subscription/webhook`
- Auth: none declared

Handle subscription status webhooks from payment service.

## Headers

- `X-API-Key` string, nullable

## Request body

- SubscriptionWebhookEvent: Schema for subscription webhook events.
  - `subscription_id` string, required
  - `event` string, required
  - `payment_id` string, nullable
  - `status` string, nullable
  - `gateway` string, nullable
  - `plan_tier` string, nullable
  - `plan_duration` string, nullable
  - `paid_count` integer, nullable
  - `payment_method` string, nullable
  - `payment_method_details` object, nullable
  - `start_date` string, nullable
  - `end_date` string, nullable
  - `next_payment_datetime` string, nullable
  - `amount` number, nullable
  - `currency` string, nullable
  - `sale_id` string, nullable
  - `error_code` string, nullable
  - `error_message` string, nullable
  - `gateway_plan_id` string, nullable
  - `current_start` string, nullable
  - `current_end` string, nullable
  - `refund_id` string, nullable
  - `refund_status` string, nullable
  - `refund_created_at` string, nullable
  - `refund_speed_requested` string, nullable
  - `refund_speed_processed` string, nullable
  - `gateway_payment_id` string, nullable
  - `gateway_invoice_id` string, nullable
  - `gateway_order_id` string, nullable
  - `original_payment_amount` number, nullable
  - `amount_refunded_total` number, nullable
  - `payment_refund_status` string, nullable
  - `payment_created_at` string, nullable
  - `payment_description` string, nullable
  - `razorpay_event` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `422`: Validation Error

---

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