> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update order payment

> Send an order payment update

## Overview

With this method you can send order payment update messages.

<Info>
  This method is only available for WhatsApp **Business** accounts.
</Info>

#### Example on WhatsApp

<div style={{ display: "flex", justifyContent: "center" }}>
  <img src="https://mintcdn.com/z-api-8aa3bb40/nNYp_QHy_iUs4_xM/images/send-order-payment-update-eng.jpeg?fit=max&auto=format&n=nNYp_QHy_iUs4_xM&q=85&s=df3aa83da48c9baebf361e6899f134cf" width="400" data-path="images/send-order-payment-update-eng.jpeg" />
</div>

***

## Attributes

### Header

<ParamField path="instanceId" type="string" required>
  Your instance ID. Available in the Z-API panel under **Instances**.
</ParamField>

<ParamField path="token" type="string" required>
  Your Z-API instance token.
</ParamField>

### Required

<ParamField body="phone" type="string" required>
  Recipient's phone number in DDI DDD NUMBER format. E.g.: 551199999999
</ParamField>

<ParamField body="messageId" type="string" required>
  Original order message ID from WhatsApp
</ParamField>

<ParamField body="referenceId" type="string" required>
  Order reference ID (obtained via webhook)
</ParamField>

<ParamField body="orderRequestId" type="string" required>
  Order request reference ID (obtained via webhook)
</ParamField>

<ParamField body="orderStatus" type="string" required>
  Order status: `pending`, `processing`, `shipped`, `completed` or `canceled`
</ParamField>

<ParamField body="paymentStatus" type="string" required>
  Payment status: `pending` or `paid`
</ParamField>

<ParamField body="order" type="object" required>
  Order data

  <Expandable title="Properties">
    <ParamField body="currency" type="string" required>
      Currency code (e.g.: BRL)
    </ParamField>

    <ParamField body="products" type="array" required>
      Order products

      <Expandable title="Properties">
        <ParamField body="name" type="string" required>
          Product name
        </ParamField>

        <ParamField body="value" type="number" required>
          Product value
        </ParamField>

        <ParamField body="quantity" type="number" required>
          Quantity
        </ParamField>

        <ParamField body="productId" type="string" required>
          Product ID
        </ParamField>

        <ParamField body="isCustomItem" type="boolean">
          Whether it is a custom item
        </ParamField>
      </Expandable>
    </ParamField>

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

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

    <ParamField body="shipping" type="number">
      Shipping amount
    </ParamField>
  </Expandable>
</ParamField>

### Optional

<ParamField body="message" type="string">
  Order update text message
</ParamField>

***

## Request Body

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "phone": "554499999999",
  "messageId": "3EB0F91BBA791BB0A787FC",
  "message": "Order update text message",
  "referenceId": "4N8FCTW1WM6",
  "orderRequestId": "4N8FCTW22W4",
  "orderStatus": "processing",
  "paymentStatus": "paid",
  "order": {
    "currency": "BRL",
    "discount": 10,
    "tax": 10,
    "shipping": 5,
    "products": [
      {
        "value": 150,
        "quantity": 2,
        "name": "order 1",
        "isCustomItem": true,
        "productId": "custom-item-4N8FCTW23N7"
      },
      {
        "productId": "23940797548900636",
        "value": 150,
        "quantity": 2,
        "name": "order 2",
        "isCustomItem": false
      }
    ]
  }
}
```

***

## Response

### 200

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}
```

### 405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

### 415

If you receive a 415 error, make sure to add the "Content-Type" header to your request, which in most cases is "application/json".
