Peach
  1. orders
Peach
  • messaging
    • Send a pre-approved template message
      POST
    • Poll template message status
      GET
    • Launch a broadcast
      POST
    • Poll broadcast status
      GET
    • Poll template messages status
      GET
    • Connect to AI Agent
      POST
    • Send an App message
      POST
  • whatsapp_templates
    • List all templates
      GET
    • Create a template
      POST
    • Update template
      PATCH
    • Archive template
      PATCH
    • Pause template
      PATCH
    • Submit template
      PATCH
  • conversations
    • Agent Assignment
      POST
    • Close Conversation
      POST
  • contacts
    • Create a contact
      POST
    • Update a contact
      PATCH
    • Create multiple contacts
      POST
  • orders
    • Create an order
      POST
    • Find order by ID
      GET
    • Create a refund for an order
      POST
  • medias
    • About uploaded media
    • List available medias
      GET
    • Add a media
      POST
    • Remove a media
      DELETE
  • webhooks
    • Order status webhooks
    • Flow execution status webhooks
    • Message delivery status webhooks
    • AI Agent Execution Webhooks
  • Schemas
    • Schemas
      • Order
      • RefundRequest
      • Contact
      • LineItem
      • OrderExpiry
      • TemplateMessage
      • AnyValue
      • Argument
  1. orders

Create an order

POST
/orders
Create a new order for collecting payments from your customer on WhatsApp

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json

Example
{
    "id": "your_order_id",
    "app_execution_id": "app_exec_1234",
    "type": "physical_goods",
    "contact": {
        "name": "Alfred Hitchcock",
        "language": "string",
        "email": "alfred@example.com",
        "phone_number": "+919988776655",
        "metadata": {
            "key": "value"
        }
    },
    "items": [
        {
            "name": "Product 1",
            "amount": 12000,
            "quantity": 2,
            "sale_amount": 12000
        }
    ],
    "expiration": {
        "timestamp": 1711929600,
        "description": "Sorry, the event is booked."
    },
    "currency": "INR",
    "subtotal": 12380,
    "tax": {
        "value": 1200,
        "description": "GST"
    },
    "shipping": {
        "value": 15000,
        "description": "Prime shipping"
    },
    "discount": {
        "value": 1000,
        "description": "10OFF on first purchase"
    },
    "total_amount": 200
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/orders' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "your_order_id",
    "app_execution_id": "app_exec_1234",
    "type": "physical_goods",
    "contact": {
        "name": "Alfred Hitchcock",
        "language": "string",
        "email": "alfred@example.com",
        "phone_number": "+919988776655",
        "metadata": {
            "key": "value"
        }
    },
    "items": [
        {
            "name": "Product 1",
            "amount": 12000,
            "quantity": 2,
            "sale_amount": 12000
        }
    ],
    "expiration": {
        "timestamp": 1711929600,
        "description": "Sorry, the event is booked."
    },
    "currency": "INR",
    "subtotal": 12380,
    "tax": {
        "value": 1200,
        "description": "GST"
    },
    "shipping": {
        "value": 15000,
        "description": "Prime shipping"
    },
    "discount": {
        "value": 1000,
        "description": "10OFF on first purchase"
    },
    "total_amount": 200
}'

Responses

🟢201Created
application/json
Created order successfully
Body

Example
{
    "id": "your_order_id",
    "app_execution_id": "app_exec_1234",
    "type": "physical_goods",
    "contact": {
        "name": "Alfred Hitchcock",
        "language": "string",
        "email": "alfred@example.com",
        "phone_number": "+919988776655",
        "metadata": {
            "key": "value"
        }
    },
    "items": [
        {
            "name": "Product 1",
            "amount": 12000,
            "quantity": 2,
            "sale_amount": 12000
        }
    ],
    "expiration": {
        "timestamp": 1711929600,
        "description": "Sorry, the event is booked."
    },
    "currency": "INR",
    "subtotal": 12380,
    "tax": {
        "value": 1200,
        "description": "GST"
    },
    "shipping": {
        "value": 15000,
        "description": "Prime shipping"
    },
    "discount": {
        "value": 1000,
        "description": "10OFF on first purchase"
    },
    "total_amount": 200
}
🟠422Parameter Error
Modified at 2025-04-02 04:39:19
Previous
Create multiple contacts
Next
Find order by ID
Built with