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

# Pix order messages

> Send order details and order status messages for Brazil Pix payments

Send interactive `order_details` messages so users can review and pay an order with Pix, then send `order_status` messages to update the order once the payment settles.

Kapso forwards these payloads to Meta unchanged. Meta validates account eligibility, payment details, and Pix key ownership.

## Order details

Use `type: "order_details"` with the `review_and_pay` action.

```bash REST API icon="code" theme={null}
curl -X POST 'https://api.kapso.ai/meta/whatsapp/v24.0/647015955153740/messages' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "interactive",
    "interactive": {
      "type": "order_details",
      "body": { "text": "Order details" },
      "action": {
        "name": "review_and_pay",
        "parameters": {
          "reference_id": "pix-order-123",
          "type": "digital-goods",
          "payment_type": "br",
          "payment_settings": [
            {
              "type": "pix_dynamic_code",
              "pix_dynamic_code": {
                "code": "00020101021226820014br.gov.bcb.pix",
                "merchant_name": "Kapso Merchant",
                "key": "12345678000199",
                "key_type": "CNPJ"
              }
            }
          ],
          "currency": "BRL",
          "total_amount": { "value": 1000, "offset": 100 },
          "order": {
            "status": "pending",
            "tax": { "value": 0, "offset": 100 },
            "items": [
              {
                "retailer_id": "item-1",
                "name": "Subscription",
                "amount": { "value": 1000, "offset": 100 },
                "quantity": 1
              }
            ],
            "subtotal": { "value": 1000, "offset": 100 }
          }
        }
      }
    }
  }'
```

Amounts use `value` and `offset`: `value: 1000` with `offset: 100` is R\$ 10,00.

## Order status

Use `type: "order_status"` with the `review_order` action and the same `reference_id`.

```bash REST API icon="code" theme={null}
curl -X POST 'https://api.kapso.ai/meta/whatsapp/v24.0/647015955153740/messages' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "messaging_product": "whatsapp",
    "to": "5511999999999",
    "type": "interactive",
    "interactive": {
      "type": "order_status",
      "body": { "text": "Payment confirmed" },
      "action": {
        "name": "review_order",
        "parameters": {
          "reference_id": "pix-order-123",
          "order": { "status": "processing" },
          "payment": { "status": "captured" }
        }
      }
    }
  }'
```

## Requirements

* `action.name` must be `review_and_pay` for `order_details` and `review_order` for `order_status`. Other action names are rejected with HTTP 422.
* `action.parameters` must be an object.
* These messages are subject to the 24-hour customer service window.
* The WhatsApp Business Account must be enabled for the Meta Brazil Payments API.
