Skip to main content
Every webhook delivery is an HTTP POST request with a JSON body. This page documents the complete payload structure for each event type.

Request Headers

All webhook requests include these headers:
Content-Type: application/json
X-RMZ-WEBHOOKS: 1.2
X-RMZ-REQUEST-ID: 12345
The Signature header is only included when signing is enabled for the webhook. See Signature Verification for details.
HeaderDescription
Content-TypeAlways application/json
X-RMZ-WEBHOOKSWebhook API version (currently 1.2)
X-RMZ-REQUEST-IDUnique integer ID for this delivery attempt. Use for deduplication and support inquiries.
SignatureHMAC-SHA256 signature of the payload (only present when signing is enabled for the webhook)

order.created Payload

{
  "event": "order.created",
  "data": {
    "id": 12345,
    "store_id": 7,
    "customer_id": 5678,
    "coupon_id": null,
    "total": "149.00",
    "discount_amount": null,
    "customer_note": null,
    "meta": null,
    "cost": "0.00",
    "current_status": 4,
    "tax_rate": "0.00",
    "tax_amount": "0.00",
    "prices_include_tax": true,
    "tax_country_code": null,
    "tax_registration_number": null,
    "order_review_notification_sent_at": null,
    "seen_at": null,
    "created_at": "2026-03-30T14:30:00.000000Z",
    "updated_at": "2026-03-30T14:30:00.000000Z",
    "human_format": {
      "date_human": "منذ ثانية واحدة",
      "date_normal": "الأحد، مارس 30، 2026 2:30 م"
    },
    "transaction": {
      "id": 301,
      "deserved": "134.10",
      "platform_fees": "14.90",
      "total": "149.00",
      "order_id": 12345,
      "created_at": "2026-03-30T14:30:00.000000Z",
      "payment_method": "dokanpay",
      "is_by_platform": false,
      "human_format": {
        "payment.method": "البطائق الإئتمانية",
        "created_at": "30 مارس 2026 2:30 م",
        "created_at_text": "منذ ثانية واحدة",
        "store_balance_scheduled_at_text": null,
        "store_balance_scheduled_at": null
      }
    },
    "items": [
      {
        "id": 101,
        "quantity": 1,
        "item_id": 42,
        "item_type": "App\\Models\\StoreProduct",
        "price": "149.00",
        "fields": null,
        "notes": null,
        "order_id": 12345,
        "created_at": "2026-03-30T14:30:00.000000Z",
        "updated_at": "2026-03-30T14:30:00.000000Z",
        "item": {
          "id": 42,
          "name": "Premium Digital Course",
          "price": "199.00",
          "actual_price": "149.00",
          "type": "code",
          "...": "additional product fields"
        },
        "codes": [
          {
            "id": 201,
            "code": "XXXX-YYYY-ZZZZ",
            "is_used": true,
            "...": "additional code fields"
          }
        ]
      }
    ],
    "customer": {
      "id": 5678,
      "firstName": "Ahmed",
      "lastName": "Ali",
      "email": "ahmed@example.com",
      "country_code": 966,
      "phone": "501234567",
      "is_banned": false,
      "ban_reason": null,
      "store_id": 7,
      "created_at": "2026-01-15T10:00:00.000000Z",
      "updated_at": "2026-03-30T14:30:00.000000Z",
      "deleted_at": null
    },
    "status": {
      "id": 401,
      "reason": null,
      "status": 4,
      "model_id": 12345,
      "model_type": "App\\Models\\Order",
      "created_at": "2026-03-30T14:30:00.000000Z",
      "updated_at": "2026-03-30T14:30:00.000000Z",
      "human_format": {
        "text": "مكتمل",
        "dashboard_color": "success",
        "color": "success",
        "date_human": "منذ ثانية واحدة",
        "date_normal": "الأحد، مارس 30، 2026 2:30 م"
      }
    },
    "statuses": [
      {
        "id": 401,
        "reason": null,
        "status": 4,
        "model_id": 12345,
        "model_type": "App\\Models\\Order",
        "created_at": "2026-03-30T14:30:00.000000Z",
        "updated_at": "2026-03-30T14:30:00.000000Z",
        "human_format": {
          "text": "مكتمل",
          "dashboard_color": "success",
          "color": "success",
          "date_human": "منذ ثانية واحدة",
          "date_normal": "الأحد، مارس 30، 2026 2:30 م"
        }
      }
    ]
  }
}

order.status.changed Payload

The payload structure is identical to order.created — the same relations are loaded (transaction, items.item, items.codes, customer, status, statuses). The status field reflects the new (current) status, and the statuses array contains the full status history.
The order.status.changed event is only fired when the order has more than one status (i.e., the initial status creation does not trigger this event — only subsequent status changes do).
{
  "event": "order.status.changed",
  "data": {
    "id": 12345,
    "store_id": 7,
    "customer_id": 5678,
    "coupon_id": null,
    "total": "149.00",
    "discount_amount": null,
    "customer_note": null,
    "meta": null,
    "cost": "0.00",
    "current_status": 5,
    "tax_rate": "0.00",
    "tax_amount": "0.00",
    "prices_include_tax": true,
    "tax_country_code": null,
    "tax_registration_number": null,
    "order_review_notification_sent_at": null,
    "seen_at": null,
    "created_at": "2026-03-30T14:30:00.000000Z",
    "updated_at": "2026-03-31T10:00:00.000000Z",
    "human_format": {
      "date_human": "منذ يوم واحد",
      "date_normal": "الأحد، مارس 30، 2026 2:30 م"
    },
    "transaction": {
      "id": 301,
      "deserved": "134.10",
      "platform_fees": "14.90",
      "total": "149.00",
      "order_id": 12345,
      "created_at": "2026-03-30T14:30:00.000000Z",
      "payment_method": "dokanpay",
      "is_by_platform": false,
      "human_format": {
        "payment.method": "البطائق الإئتمانية",
        "created_at": "30 مارس 2026 2:30 م",
        "created_at_text": "منذ يوم واحد",
        "store_balance_scheduled_at_text": null,
        "store_balance_scheduled_at": null
      }
    },
    "items": [ "..." ],
    "customer": { "..." : "same structure as order.created" },
    "status": {
      "id": 502,
      "reason": null,
      "status": 5,
      "model_id": 12345,
      "model_type": "App\\Models\\Order",
      "created_at": "2026-03-31T10:00:00.000000Z",
      "updated_at": "2026-03-31T10:00:00.000000Z",
      "human_format": {
        "text": "ملغي",
        "dashboard_color": "error",
        "color": "danger",
        "date_human": "منذ ثانية واحدة",
        "date_normal": "الثلاثاء، مارس 31، 2026 10:00 ص"
      }
    },
    "statuses": [
      {
        "id": 401,
        "reason": null,
        "status": 4,
        "model_id": 12345,
        "model_type": "App\\Models\\Order",
        "created_at": "2026-03-30T14:30:00.000000Z",
        "updated_at": "2026-03-30T14:30:00.000000Z",
        "human_format": {
          "text": "مكتمل",
          "dashboard_color": "success",
          "color": "success",
          "date_human": "منذ يوم واحد",
          "date_normal": "الأحد، مارس 30، 2026 2:30 م"
        }
      },
      {
        "id": 502,
        "reason": null,
        "status": 5,
        "model_id": 12345,
        "model_type": "App\\Models\\Order",
        "created_at": "2026-03-31T10:00:00.000000Z",
        "updated_at": "2026-03-31T10:00:00.000000Z",
        "human_format": {
          "text": "ملغي",
          "dashboard_color": "error",
          "color": "danger",
          "date_human": "منذ ثانية واحدة",
          "date_normal": "الثلاثاء، مارس 31، 2026 10:00 ص"
        }
      }
    ]
  }
}

Field Reference

Top Level

FieldTypeDescription
eventstringEvent type: order.created or order.status.changed
dataobjectThe full order object

data (Order)

FieldTypeDescription
idintegerOrder ID
store_idintegerStore ID
customer_idintegerCustomer ID (foreign key)
coupon_idinteger|nullCoupon ID if a coupon was applied
totalstringTotal order amount
discount_amountstring|nullDiscount amount (if coupon was applied)
customer_notestring|nullNote left by the customer
metaobject|nullAdditional order metadata (JSON)
coststringOrder cost
current_statusinteger|nullDenormalized current status code
tax_ratestring|nullTax rate applied (e.g., "15.00")
tax_amountstring|nullTax amount
prices_include_taxbooleanWhether prices already include tax (defaults to true)
tax_country_codestring|nullCountry code for tax calculation (2 chars)
tax_registration_numberstring|nullStore’s tax registration number
order_review_notification_sent_atstring|nullISO 8601 timestamp when review notification was sent
seen_atstring|nullISO 8601 timestamp when the store owner viewed the order
created_atstringISO 8601 timestamp when the order was created
updated_atstringISO 8601 timestamp when the order was last updated
human_formatobjectHuman-readable date strings (Arabic locale)
human_format.date_humanstringRelative time (e.g., “منذ ثانية واحدة”)
human_format.date_normalstringFormatted date string
transactionobject|nullPayment transaction details (selected fields only)
itemsarrayLine items in the order
customerobjectCustomer who placed the order
statusobjectCurrent (latest) status
statusesarrayFull status history (oldest first)

data.transaction

The transaction is loaded with a specific column selection. Only the following fields are included:
FieldTypeDescription
idintegerTransaction ID
deservedstringAmount the store owner receives (after platform fees)
platform_feesstringRMZ platform fee amount
totalstringTotal transaction amount
order_idintegerAssociated order ID
created_atstringISO 8601 timestamp
payment_methodstringPayment method: dokanpay, bank, paypal, coinbase, bank_transfer, free
is_by_platformbooleanWhether the payment was processed through the RMZ payment system
human_formatobjectHuman-readable transaction info (appended attribute)
human_format.payment.methodstringArabic payment method name (e.g., “البطائق الإئتمانية”)
human_format.created_atstring|nullFormatted creation date
human_format.created_at_textstring|nullRelative creation time
human_format.store_balance_scheduled_atstring|nullFormatted scheduled balance date (always null in webhook since column is not selected)
human_format.store_balance_scheduled_at_textstring|nullRelative scheduled balance time (always null in webhook)

data.customer

The full customer model is loaded (minus $hidden fields: remember_token, last_login_ip, last_login_at).
FieldTypeDescription
idintegerCustomer ID
firstNamestring|nullFirst name
lastNamestring|nullLast name
emailstring|nullEmail address
country_codeinteger|nullPhone country code (e.g., 966)
phonestring|nullPhone number (without country code)
is_bannedbooleanWhether the customer is banned
ban_reasonstring|nullBan reason (if banned)
store_idintegerStore this customer belongs to
deleted_atstring|nullSoft delete timestamp
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

data.items[]

FieldTypeDescription
idintegerOrder item ID
quantityintegerQuantity purchased
item_idintegerPolymorphic item ID (typically a product ID)
item_typestringPolymorphic item type (e.g., App\Models\StoreProduct)
pricestringLine item total price
fieldsobject|nullCustom fields submitted with the order item (JSON)
notesstring|nullNotes for this item
order_idintegerParent order ID
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp
itemobjectThe related product (loaded via polymorphic relation, includes soft-deleted products)
codesarrayDelivered digital codes (for code type products)

data.items[].item (Product)

The full product model is included via toArray(). Key fields include:
FieldTypeDescription
idintegerProduct ID
namestringProduct name
pricestringOriginal listed price
actual_pricestringCurrent effective price (after discount, appended attribute)
typestringProduct type: code, file, subscription, service, card
...Additional product fields from the store_products table

data.items[].codes[]

The full code model is included. Key fields:
FieldTypeDescription
idintegerCode ID
codestringThe delivered digital code
is_usedbooleanWhether the code has been marked as used
...Additional fields from the store_product_codes table

data.status / data.statuses[]

FieldTypeDescription
idintegerStatus record ID
reasonstring|nullReason for the status change
statusintegerStatus code (1=Waiting for Payment, 2=Under Review, 3=Processing, 4=Completed, 5=Cancelled, 6=Refunded)
model_idintegerOrder ID
model_typestringAlways App\Models\Order
created_atstringISO 8601 timestamp when this status was set
updated_atstringISO 8601 timestamp
human_formatobjectHuman-readable status info (appended attribute)
human_format.textstringArabic status name (e.g., “مكتمل”, “ملغي”, “قيد التنفيذ”)
human_format.dashboard_colorstringDashboard color key (e.g., success, error, warning, default, processing)
human_format.colorstringUI color key (e.g., success, danger, warning, info, secondary)
human_format.date_humanstringRelative time
human_format.date_normalstringFormatted date string
The statuses array is ordered chronologically. Use it to build a timeline of the order’s lifecycle. The status object always reflects the latest/current status.