Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fype.dev/llms.txt

Use this file to discover all available pages before exploring further.

Webhook Event Types

Fype supports a variety of events to keep your system in sync with the payment lifecycle.

Payment Events

Event TypeDescription
payment.succeededTriggered when a payment has been successfully captured by the gateway.
payment.failedTriggered when a payment attempt fails (e.g., insufficient funds, card declined).
payment.processingTriggered when a payment is in a pending state (e.g., awaiting bank confirmation).
payment.capturedAlias for payment.succeeded in some provider contexts.

Refund Events

Event TypeDescription
refund.processedTriggered when a refund has been successfully processed by the gateway.
refund.failedTriggered if a refund attempt fails.

Event Payload Details

Every event contains a data.object which represents the normalized entity (Payment or Refund).

Payment Object

{
  "id": "uuid",
  "amount": 50000,
  "currency": "INR",
  "status": "succeeded",
  "reference_id": "your_order_id",
  "metadata": {},
  "created_at": "iso_timestamp"
}

Refund Object

{
  "id": "uuid",
  "payment_id": "uuid",
  "amount": 25000,
  "status": "processed",
  "created_at": "iso_timestamp"
}

Handling Unsupported Events

Gateways may occasionally send events that are not yet natively mapped by Fype. In such cases, Fype will still forward the event if possible, prefixed with unsupported.. We recommend logging these events but not basing critical business logic on them without verification.