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

# Webhooks

# Webhook Events

This page documents the various webhook events that can be triggered by the Payrix platform. Webhooks are used to notify your application when specific events occur.

## Table of Contents

1. [Payment Success](#payment-success)
2. [Merchant Onboarding](#merchant-onboarding)
3. [Merchant Approval](#merchant-approval)
4. [Documents Signed](#documents-signed)

## Payment Success

### Event: `payment.success`

#### Description

This event is triggered when a payment is successfully processed.

#### Payload Example

```json theme={null}
{
    "event_type": "payment.success",
    "data": {
        "transaction_id": "txn_a7f0b5340a",
        "merchant_id": "example-merchant-guid",
        "amount": 1.00,
        "net_amount": 0.95,
        "fee_amount": 0.05,
        "order_id": "example-order-id",
        "last_four": "0043",
        "brand": "VISA",
        "link_id": ""
    }
}
```

#### Explanation

* `transaction_id`: Unique identifier for the transaction.
* `merchant_id`: Unique identifier for the merchant.
* `amount`: Total amount of the payment.
* `net_amount`: Amount received after fees.
* `fee_amount`: Fee amount charged for the transaction.
* `order_id`: Identifier for the associated order.
* `last_four`: Last four digits of the card used.
* `brand`: Card brand (e.g. VISA, Mastercard).
* `link_id`: Associated pay link ID, if applicable.

## Merchant Onboarding

### Event: `merchant.onboarding`

#### Description

This event is triggered when a merchant completes the onboarding process.

#### Payload Example

```json theme={null}
{
    "event_type": "merchant.onboarding",
    "data": {
        "merchant_key": "example-guid",
        "merchant_id": "example-merchant-id",
        "business_name": "Example Business",
        "email": "merchant@example.com",
        "public_key": "example-public-key"
    }
}
```

#### Explanation

* `merchant_key`: Unique key assigned to the merchant.
* `merchant_id`: Unique identifier for the merchant.
* `business_name`: Name of the merchant's business.
* `email`: Merchant's contact email.
* `public_key`: Public key associated with the merchant.

## Merchant Approval

### Event: `merchant.approval`

#### Description

This event is triggered when a merchant's application is approved.

#### Payload Example

```json theme={null}
{
    "event_type": "merchant.approval",
    "data": {
        "merchant_id": "example-merchant-guid",
        "business_name": "Example Business",
        "email": "merchant@example.com",
        "company_id": "example-company-id"
    }
}
```

#### Explanation

* `merchant_id`: Unique identifier for the merchant.
* `business_name`: Name of the merchant's business.
* `email`: Merchant's contact email.
* `company_id`: Unique identifier for the associated company.

## Documents Signed

### Event: `documents.signed`

#### Description

This event is triggered when a merchant completes signing the required documents.

#### Payload Example

```json theme={null}
{
    "event_type": "documents.signed",
    "data": {
        "merchant_id": "example-merchant-guid",
        "business_name": "Example Business",
        "website": "https://example.com",
        "email": "merchant@example.com",
        "company_id": "example-company-id"
    }
}
```

#### Explanation

* `merchant_id`: Unique identifier for the merchant.
* `business_name`: Name of the merchant's business.
* `website`: Merchant's website URL.
* `email`: Merchant's contact email.
* `company_id`: Unique identifier for the associated company.
