Order Success

Process order.success webhooks and identify completed payment details.

Handle order.success Events

Use the order.success webhook payload to identify a completed payment and its associated order details.

Amwal sends the order.success webhook when a payment is confirmed and completed. Use this event to mark the related order or payment attempt as successful in your system.

Process the event

  1. Match the event to the related order or payment attempt.
  2. Confirm that the payload status is success.
  3. Store the transaction ID and update the related order or payment attempt as successful.
  4. Start your fulfillment or order-completion flow after you update the payment status.
  5. Return HTTP 200 after your system accepts the event.

Example payload

{
  "event_type": "order.success",
  "id": "amwal_order_12345",
  "timestamp": "2025-12-15T10:30:00Z",
  "data": {
    "id": "amwal_order_12345",
    "ref_id": "ORD-2025-001",
    "merchant_order_id": "ORD-2025-001",
    "amount": 99.99,
    "currency": "SAR",
    "status": "completed",
    "customer": {
      "id": "customer_123",
      "email": "[email protected]",
      "phone": "+966501234567",
      "first_name": "John",
      "last_name": "Doe"
    },
    "payment": {
      "method": "wallet",
      "reference": "pay_ref_12345",
      "transaction_id": "txn_67890",
      "gateway": "amwal"
    },
    "shipping": {
      "address": {
        "street": "123 Main St",
        "city": "Riyadh",
        "state": "Riyadh Province",
        "country": "SA",
        "postal_code": "11564"
      },
      "method": "standard"
    },
    "metadata": {
      "custom_field": "value",
      "integration_version": "1.0.0"
    }
  }
}
📘

Map payload identifiers to your records

The payload id maps to the Amwal transaction_id. Use order_details.order_id to match the event to the order ID in your system.


Did this page help you?