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

# claim.approved

<RequestExample>
  ```json Example Webhook Request theme={null}
  {
    "id": "aa58a883-1e6f-4ec1-aa06-556908167f46",
    "topic": "claim.approved",
    "created_at": "2024-03-20T10:00:00Z",
    "body": {
      "claim_id": "cm6v2zdt10002j20vqs7f74hc",
      "order_id": "order-1",
      "source_order_id": "100",
      "source_order_number": "#1001",
      "resolutions": [
        {
          "type": "REFUND",
          "details": {
            "items": [
              {
                "product_id": "prod001",
                "variant_id": "var001",
                "sku": "sku001",
                "item_id": "item001",
                "item_name": "Wireless Mouse",
                "price": 30.0,
                "discount": 5.0,
                "tax": 2.0,
                "resolution_percentage": 80,
                "resolution_flat_amount": null,
                "quantity": 1
              }
            ],
            "currency": "USD",
            "total_refund_amount": 27.6,
            "shipping_amount": 5.0,
            "shipping_amount_tax": 1.0,
        },
        {
          "type": "RESHIP",
          "details": {
            "items": [
              {
                "product_id": "prod002",
                "variant_id": "var002",
                "sku": "sku002",
                "item_id": "item002",
                "item_name": "Wireless Mouse",
                "price": 50.0,
                "discount": 0.0,
                "tax": 5.0,
                "resolution_percentage": 100,
                "resolution_flat_amount": null,
                "quantity": 1,
                "product_options": [
                  {
                    "name": "Color",
                    "value": "Red"
                  },
                  {
                    "name": "Size",
                    "value": "Large"
                  }
                ]
              }
            ],
            "currency": "USD",
            "total_refund_amount": 55.0,
            "shipping_amount": 0.0,
            "shipping_amount_tax": 0.0,
            "shipping_address": {
              "address1": "123 Main St",
              "address2": "Apt 4B",
              "city": "San Francisco",
              "state": "California",
              "zip": "94105",
              "country": "United States"
            }
          }
        }
      ]
    }
  }
  ```
</RequestExample>

This webhook is triggered when a claim is approved, providing structured data about the resolution actions taken. It includes the type of resolution, along with details on the refunded or credited items, shipping amounts, and total reimbursement.

When this webhook is triggered, a JSON payload is sent, containing key details such as the list of resolutions applied. Each resolution object specifies the type of resolution, item details and the final refund or credit amount.

When a resolution is of type `REFUND`, the `total_refund_amount` amount should be used to refund the order.

## Request Body

The webhook will send a JSON payload with the following structure:

### Properties

<ParamField body="id" type="string">
  Unique identifier for the webhook event
</ParamField>

<ParamField body="topic" type="string">
  The webhook topic
</ParamField>

<ParamField body="created_at" type="string">
  ISO 8601 timestamp of when the webhook was created
</ParamField>

<ParamField body="body" type="object">
  The webhook payload

  <Expandable title="Webhook Payload">
    <ParamField body="claim_id" type="string">
      Unique identifier for the claim
    </ParamField>

    <ParamField body="order_id" type="string">
      Unique identifier for the order within Order Protection
    </ParamField>

    <ParamField body="source_order_id" type="string">
      Unique identifier for the order within your system
    </ParamField>

    <ParamField body="source_order_number" type="string">
      Order number within your system
    </ParamField>

    <ParamField body="resolutions" type="array">
      List of resolution actions taken

      <Expandable title="Resolution Object">
        <ParamField body="type" type="enum">
          Type of resolution.

          Available options: `REFUND`, `RESHIP`, `FLAT_RATE`, `STORE_CREDIT`
        </ParamField>

        <ParamField body="details" type="object">
          Details of the resolution

          <Expandable title="Details Object">
            <ParamField body="items" type="array">
              List of items involved in the resolution

              <Expandable title="Item Object">
                <ParamField body="product_id" type="string">
                  Unique identifier for the product
                </ParamField>

                <ParamField body="variant_id" type="string">
                  Identifier for the product variant
                </ParamField>

                <ParamField body="sku" type="string">
                  Stock keeping unit
                </ParamField>

                <ParamField body="item_id" type="string">
                  Unique identifier for the item
                </ParamField>

                <ParamField body="item_name" type="string">
                  Name of the item
                </ParamField>

                <ParamField body="price" type="number">
                  Original price of the item prior to discounts and taxes
                </ParamField>

                <ParamField body="discount" type="number">
                  Discount amount applied
                </ParamField>

                <ParamField body="tax" type="number">
                  Tax amount
                </ParamField>

                <ParamField body="resolution_percentage" type="number">
                  Percentage of refund/credit (if applicable)
                </ParamField>

                <ParamField body="resolution_flat_amount" type="number">
                  Fixed amount for refund/credit. If `FLAT_RATE` isn't the resolution type, this will be `null`
                </ParamField>

                <ParamField body="quantity" type="integer">
                  Number of items
                </ParamField>

                <ParamField body="product_options" type="array">
                  Custom options selected for this item, such as size or color.

                  <Expandable title="Product Option Object">
                    <ParamField body="name" type="string">
                      The name of the product option (e.g., "Color", "Size")
                    </ParamField>

                    <ParamField body="value" type="string">
                      The selected value for the option (e.g., "Red", "Large")
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="currency" type="string">
              Currency code
            </ParamField>

            <ParamField body="total_refund_amount" type="number">
              Total amount of the refund
            </ParamField>

            <ParamField body="shipping_amount" type="number">
              Amount related to shipping
            </ParamField>

            <ParamField body="shipping_amount_tax" type="number">
              Tax amount related to shipping
            </ParamField>

            <ParamField body="shipping_address" type="object">
              Shipping address reship should be shipped to.

              This is only present if the resolution type is `RESHIP`.

              <Expandable title="Address Object">
                <ParamField body="address1" type="string">
                  Primary address line
                </ParamField>

                <ParamField body="address2" type="string">
                  Secondary address line (optional)
                </ParamField>

                <ParamField body="city" type="string">
                  City name
                </ParamField>

                <ParamField body="state" type="string">
                  State or province
                </ParamField>

                <ParamField body="zip" type="string">
                  Postal or ZIP code
                </ParamField>

                <ParamField body="country" type="string">
                  Country name
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>
