> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finventi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Returned

> Webhook notification sent when a payment is returned

<Note>
  This webhook is sent when a payment has been returned.
</Note>

## Webhook Structure

<ParamField body="id" type="string (UUID)" required>
  Unique identifier for this event
</ParamField>

<ParamField body="time" type="string (ISO 8601)" required>
  Timestamp of when the event occurred
</ParamField>

<ParamField body="type" type="string" required>
  The type of event. Value: `payment.returned`
</ParamField>

<ParamField body="data" type="object" required>
  The event data containing the details below
</ParamField>

### Data Fields

<ParamField body="data.paymentId" type="string (UUID)" required>
  Unique identifier of the returned payment
</ParamField>

<ParamField body="data.scheme" type="string" required>
  Payment scheme. Available values: `SCT`, `SCT_INST`, `INTERNAL`
</ParamField>

<ParamField body="data.direction" type="string" required>
  Payment direction. Available values: `INBOUND`, `OUTBOUND`
</ParamField>

<ParamField body="data.reasonCode" type="string">
  ISO 20022 return reason code surfaced by the payment gateway (for example, `AC04` for a closed account or `AM05` for a duplicate payment). Optional — omitted when the gateway does not provide a reason.
</ParamField>

## Request Example

```json theme={null}
{
  "id": "f2a7b5c4-9d3e-4f8a-c2ba-5e7d1f4a3c6b",
  "time": "2025-01-15T10:30:00Z",
  "type": "payment.returned",
  "data": {
    "paymentId": "019cde3e-da40-7f7c-eb65-7b2c4d5f8a1e",
    "scheme": "SCT",
    "direction": "INBOUND",
    "reasonCode": "AC04"
  }
}
```
