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

# Custom Webhook Setup Guide

> Send direct revenue events from your own backend, crypto processors, or custom checkout forms.

If you use a custom payment processor or run an internal checkout flow, you can push transaction events directly to Indic8 using HTTP POST requests.

## Ingress Endpoint

```http theme={null}
POST https://api.indic8.ing/v1/events/custom
Content-Type: application/json
X-Indic8-Signature: t=1726233600,v1=9f81a7b6c891...
```

***

## JSON Payload Format

Send a JSON body with the following structure:

```json theme={null}
{
  "event_id": "order_custom_10293",
  "event_type": "transaction.sale",
  "product": {
    "external_id": "prod_pro_tier",
    "name": "Pro Yearly Membership",
    "category": "SaaS"
  },
  "financials": {
    "amount": 99.00,
    "currency": "USD",
    "provider_fee": 2.50,
    "tax_amount": 0.00
  },
  "customer": {
    "identifier": "usr_acme_001",
    "country_code": "US"
  },
  "timestamp": "2026-09-13T12:00:00Z"
}
```

***

## Field Reference

| Field Name              | Type     | Required | Description                                                                           |
| :---------------------- | :------- | :------- | :------------------------------------------------------------------------------------ |
| `event_id`              | `string` | Yes      | Unique ID from your database to prevent duplicate counts                              |
| `event_type`            | `string` | Yes      | `transaction.sale`, `subscription.new`, `transaction.refund`, or `subscription.churn` |
| `product.name`          | `string` | Yes      | Display name for your product in the catalog                                          |
| `financials.amount`     | `number` | Yes      | Gross amount paid in standard units (e.g. `99.00` for \$99)                           |
| `financials.currency`   | `string` | Yes      | Three-letter currency code (e.g. `USD`, `EUR`, `GBP`)                                 |
| `customer.country_code` | `string` | No       | ISO 2-letter country code (e.g. `US`, `GB`, `IN`, `DE`)                               |

***

## Code Example: Sending an Event

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.indic8.ing/v1/events/custom \
      -H "Authorization: Bearer ind_live_your_key" \
      -H "Content-Type: application/json" \
      -d '{
        "event_id": "order_custom_10293",
        "event_type": "transaction.sale",
        "product": { "name": "Pro Yearly" },
        "financials": { "amount": 99.00, "currency": "USD" },
        "customer": { "country_code": "US" }
      }'
    ```
  </Tab>

  <Tab title="TypeScript / Node.js">
    ```typescript theme={null}
    async function sendSaleEvent() {
      const response = await fetch("https://api.indic8.ing/v1/events/custom", {
        method: "POST",
        headers: {
          "Authorization": "Bearer ind_live_your_key",
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          event_id: "order_custom_10293",
          event_type: "transaction.sale",
          product: { name: "Pro Yearly" },
          financials: { amount: 99.00, currency: "USD" },
          customer: { country_code: "US" }
        })
      });

      const result = await response.json();
      console.log("Indic8 Response:", result);
    }
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    def send_sale_event():
        url = "https://api.indic8.ing/v1/events/custom"
        headers = {
            "Authorization": "Bearer ind_live_your_key",
            "Content-Type": "application/json"
        }
        payload = {
            "event_id": "order_custom_10293",
            "event_type": "transaction.sale",
            "product": {"name": "Pro Yearly"},
            "financials": {"amount": 99.00, "currency": "USD"},
            "customer": {"country_code": "US"}
        }

        res = requests.post(url, json=payload, headers=headers)
        print("Indic8 Response:", res.json())
    ```
  </Tab>
</Tabs>
