# Send order detail & checkout button message

## &#x20;Create  an order detail & checkout template

Visit [Templates](https://www.ycloud.com/console/#/app/dashboard/template) page and create a single product checkout template or WhatsApp order details template.

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FAViFawGsrdfRlfPLsNdz%2Fimage.png?alt=media&#x26;token=8b0b7970-3176-4672-a716-93c08891e942" alt=""><figcaption></figcaption></figure>

##

## Send message

YCloud provides two methods for sending single product and order details messages, as shown below.

### 1. Send via API

Use[ send message api](https://docs.ycloud.com/reference/whatsapp_message-send#/)

Please [click to see the request example](https://docs.ycloud.com/reference/whatsapp-messaging-examples#order-details-template-message)&#x20;

### 2.Send via Journey

Automatically send the checkout abandon message to your clients.

1. Set the trigger when you want to send a detailed message about the order. e.g. when the shopify checkout created.

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2F4O37711bW4Zhzok93mD9%2Fimage.png?alt=media&#x26;token=ad5366d5-8bb8-4443-94bc-b96d64066a86" alt=""><figcaption></figcaption></figure>

2. Add a Send templates component and choose the order details template message

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2F1tHvTNCxgYme7Epq96FC%2Fimage.png?alt=media&#x26;token=d232b33a-e552-41a9-b304-a33f4ff33938" alt=""><figcaption></figcaption></figure>

3. Save and activate the Journey

When this event happens, it will automatically trigger this Journey.

## Receive the orders

### 1. Receive the order paid webhook

If you are sending WhatsApp Pay messages via API, you need to use this webhook to listen for user payment events. [Subscribe to this Webhook](https://docs.ycloud.com/reference/whatsapp-payment-updated-webhook-examples)&#x20;

You receive updates via webhooks when the status of the user-initiated transaction changes. It occurs when payment status changes to `captured` (when the payment is successfully completed), or `pending` (when the user attempted but yet to receive success transactions signal).

Sample:

```
{
  "id": "evt_eEkn26qar3nOB8md",
  "type": "whatsapp.payment.updated",
  "apiVersion": "v2",
  "createTime": "2024-10-10T07:08:00.000Z",
  "whatsappPayment": {
    "wabaId": "WABA-ID",
    "referenceId": "<reference-id>",
    "status": "captured | pending",
    "transactions": [
      {
        "id": "<transaction-id>",
        "type": "billdesk | payu | razorpay | zaakpay",
        "status": "pending | success | failed",
        "createdTimestamp": 1728544066000,
        "updatedTimestamp": 1728544066000,
        "amount": {
          "value": 21000,
          "offset": 100
        },
        "currency": "INR",
        "methodType": "upi | card | wallet | netbanking",
        "error": {
          "code": "error-code",
          "reason": "error-reason"
        }
      }
    ]
  }
}
```

### 2. Check the payment status here on WhatsApp Pay

<figure><img src="https://3466127247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSIAnjLP6KQY5rvyuaq5K%2Fuploads%2FjNVrME3T3VGLDCs7OZxf%2Fimage.png?alt=media&#x26;token=f60a2cb9-923e-413d-b362-37d0a6f36412" alt=""><figcaption></figcaption></figure>
