Amwal Tech logoDocs

Webhook Event Types

Amwal delivers real-time HTTP POST notifications to your registered webhook URL for each distinct transition in a payment's lifecycle.


Supported Event Types

Event TypeDescriptionTrigger Condition
order.createdNew order initiatedCustomer starts checkout process
order.successPayment successfulPayment confirmed and completed
order.failedPayment failedPayment declined, failed, or cancelled
order.updatedOrder RefundContain the Bank gateway refund details.
installment.tracker.approvedThe installment is approvedContain the Installment tracker object with its status "A"
installment.tracker.rejectedThe installment is rejectedContain the Installment tracker object with its status "R"
order.disputedChargeback dispute updateContains disputed_status to identify the chargeback status: PENDING, RESOLVED, or LOST.
payment_link.expiredPayment link expiredThe payment link reaches its configured expiration time.
modal.closedPayment modal closedThe customer closes the payment modal.

Webhook Envelope Schema

All webhook requests deliver a JSON payload structured with the following top-level attributes:

FieldTypeDescription
event_typeStringThe event identifier name (e.g. order.success, order.updated). Also aliased as event.
timestampString (ISO 8601)UTC timestamp when the webhook event was generated.
dataObjectFull event payload containing transaction, order, and customer records.

1. order.created (New Order Initiated)

Dispatched when a customer opens a payment link or launches the checkout modal session.

{
  "event_type": "order.created",
  "timestamp": "2026-05-14T11:20:00Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "amount": "299.99",
    "currency": "SAR",
    "status": "pending",
    "client_first_name": "Ahmed",
    "client_last_name": "Al-Rashid",
    "client_email": "customer@example.com",
    "client_phone_number": "+966501234567",
    "order_details": {
      "order_id": "ORD-9876",
      "payment_link_metadata": {
        "terminal_id": "POS-001"
      }
    },
    "created_at": "2026-05-14T11:20:00.000Z"
  }
}

order.created Data Parameters

FieldTypeDescription
idString (UUID)Unique transaction identifier initiated for this checkout session.
payment_link_idString (UUID)Payment link associated with this order.
statusStringCurrent state: "pending".
amountString / NumberOrder amount in SAR.
currencyStringCurrency ISO code (SAR).
client_first_nameString / NullCustomer's first name.
client_last_nameString / NullCustomer's last name.
client_emailString / NullCustomer's email address.
client_phone_numberString / NullCustomer's phone number.
order_details.order_idString / NullExternal merchant order identifier.
order_details.payment_link_metadataObjectMerchant custom metadata dictionary.
created_atString (ISO 8601)Initiation timestamp in UTC.

2. order.success (Payment Successful)

Dispatched immediately when an installment or card payment is confirmed and approved by the issuing bank.

{
  "event_type": "order.success",
  "timestamp": "2026-05-14T11:22:10Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "success",
    "amount": "299.99",
    "currency": "SAR",
    "payment_method": "Card",
    "payment_option": "Installment",
    "bank_name": "Al Rajhi Bank",
    "installment_duration": 6,
    "installment_status": "Approved",
    "monthly_installment": "50.00",
    "paymentBrand": "VISA",
    "number": "411111xxxxxx1111",
    "client_first_name": "Ahmed",
    "client_last_name": "Al-Rashid",
    "client_email": "customer@example.com",
    "client_phone_number": "+966501234567",
    "order_details": {
      "order_id": "ORD-9876",
      "payment_link_metadata": {
        "terminal_id": "POS-001"
      }
    },
    "created_at": "2026-05-14T11:22:10.534Z"
  }
}

order.success Data Parameters

FieldTypeDescription
idString (UUID)Unique Amwal transaction identifier.
payment_link_idString (UUID)Associated payment link ID.
statusStringAuthorization outcome: "success".
amountString / NumberAuthorized transaction amount in SAR.
currencyStringCurrency ISO code (SAR).
payment_methodStringPayment channel ("Card").
payment_optionStringMode of payment: "Installment" or "Pay In Full".
bank_nameStringPartner bank name (e.g. "Al Rajhi Bank", "Saudi National Bank (SNB)").
installment_durationInteger / NullSelected installment tenure in months (3, 6, 12, 24).
installment_statusString / NullBank installment approval status: "Approved".
monthly_installmentString / NumberMonthly installment billing amount charged to the cardholder.
paymentBrandStringCard network: "VISA", "MASTERCARD", "MADA".
numberStringMasked card number.
client_first_nameStringCustomer first name.
client_last_nameStringCustomer last name.
client_emailStringCustomer email address.
client_phone_numberStringCustomer mobile number.
order_details.order_idString / NullMerchant order ID.
order_details.payment_link_metadataObjectCustom merchant metadata dictionary.
created_atString (ISO 8601)Timestamp of authorization in UTC.

3. order.failed (Payment Failed)

Dispatched when a payment attempt fails 3DS authentication, is declined by the bank, or is cancelled.

{
  "event_type": "order.failed",
  "timestamp": "2026-05-14T11:25:00Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "fail",
    "amount": "299.99",
    "currency": "SAR",
    "failure_reason": "Insufficient funds",
    "created_at": "2026-05-14T11:25:00Z"
  }
}

order.failed Data Parameters

FieldTypeDescription
idString (UUID)Transaction identifier.
statusStringFailure outcome: "fail".
failure_reasonStringDetailed decline reason code from the bank gateway (e.g. "Insufficient funds", "3DS authentication failed"). See Transaction Failed Reasons.

4. order.updated (Order Refund)

Dispatched when a partial or full refund is processed, containing bank gateway refund tracker details.

{
  "event_type": "order.updated",
  "timestamp": "2026-05-15T14:30:00Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "partially refunded",
    "amount": "299.99",
    "currency": "SAR",
    "refunded_amount": "100.00",
    "remaining_amount": "199.99",
    "refund_tracker": [
      {
        "id": "4905",
        "status": "R",
        "amount": "100.00",
        "gateway_transaction_id": "2026001732",
        "gateway_key_type": "RefundReference",
        "rrn": "623709256127"
      }
    ],
    "created_at": "2026-05-14T11:22:10.534Z"
  }
}

order.updated Data Parameters

FieldTypeDescription
idString (UUID)Transaction identifier.
statusStringUpdated transaction state: "partially refunded" or "refunded".
amountString / NumberOriginal transaction amount in SAR.
refunded_amountString / NumberTotal cumulative refund amount accepted across all refund requests.
remaining_amountString / NumberRemaining net balance after refunds.
refund_trackerArray of ObjectsArray of refund execution objects containing gateway reference numbers and settlement status (status: "R").

5. installment.tracker.approved (Installment Approved)

Dispatched when partner bank authorization approves the installment conversion plan, containing the installment tracker object with status "A".

{
  "event_type": "installment.tracker.approved",
  "timestamp": "2026-05-14T11:22:15Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "amount": "299.99",
    "currency": "SAR",
    "bank_name": "Al Rajhi Bank",
    "installment_duration": 6,
    "installment_tracker": {
      "id": "275460",
      "status": "A",
      "message": "Operation Successful"
    }
  }
}

installment.tracker.approved Data Parameters

FieldTypeDescription
idString (UUID)Transaction identifier.
bank_nameStringPartner bank confirming the installment plan.
installment_durationIntegerApproved installment duration in months (3, 6, 12, 24).
installment_tracker.statusStringApproval code: "A" (Approved).
installment_tracker.messageStringStatus message from bank gateway (e.g. "Operation Successful").

6. installment.tracker.rejected (Installment Rejected)

Dispatched when partner bank authorization declines the installment conversion plan, containing the installment tracker object with status "R".

{
  "event_type": "installment.tracker.rejected",
  "timestamp": "2026-05-14T11:22:15Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "amount": "299.99",
    "currency": "SAR",
    "bank_name": "Saudi National Bank (SNB)",
    "installment_duration": 6,
    "installment_tracker": {
      "id": "275461",
      "status": "R",
      "message": "Installment Plan Declined by Issuing Bank"
    }
  }
}

installment.tracker.rejected Data Parameters

FieldTypeDescription
idString (UUID)Transaction identifier.
bank_nameStringPartner bank declining the installment request.
installment_tracker.statusStringRejection code: "R" (Rejected).
installment_tracker.messageStringReason message returned by bank gateway.

7. order.disputed (Chargeback Dispute Update)

Dispatched when a cardholder files a dispute or when the dispute state changes. Contains disputed_status indicating whether the dispute is PENDING, RESOLVED, or LOST.

{
  "event_type": "order.disputed",
  "timestamp": "2026-06-01T10:00:00Z",
  "data": {
    "id": "60b43176-5991-4475-8ef6-c73c2417c805",
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "amount": "299.99",
    "currency": "SAR",
    "disputed_status": "PENDING",
    "dispute_id": "disp_89124",
    "reason": "Cardholder unrecognized charge",
    "due_date": "2026-06-15T23:59:59Z"
  }
}

order.disputed Data Parameters

FieldTypeDescription
idString (UUID)Transaction identifier under dispute.
disputed_statusStringCurrent dispute state: PENDING (awaiting evidence), RESOLVED (merchant won dispute), or LOST (chargeback upheld).
dispute_idStringUnique dispute case identifier.
reasonStringBank chargeback reason description.
due_dateString (ISO 8601)Deadline to upload rebuttal documentation in the Merchant Portal.

Dispatched when an unpaid link reaches its configured expiration time (selectedDate).

{
  "event_type": "payment_link.expired",
  "timestamp": "2026-12-31T23:59:59Z",
  "data": {
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "store_id": "f24267bd-79f4-433f-a9f2-485c171301e4",
    "status": "Expired",
    "amount": "299.99",
    "currency": "SAR",
    "created_at": "2026-05-14T11:18:49Z"
  }
}

payment_link.expired Data Parameters

FieldTypeDescription
payment_link_idString (UUID)Payment link identifier that expired.
store_idString (UUID)Store ID associated with the expired link.
statusStringFinal link state: "Expired".
amountString / NumberLink amount in SAR.

9. modal.closed (Payment Modal Closed)

Dispatched when a customer explicitly dismisses or closes the hosted checkout modal before completing payment.

{
  "event_type": "modal.closed",
  "timestamp": "2026-05-14T11:21:00Z",
  "data": {
    "payment_link_id": "550e8400-e29b-41d4-a716-446655440000",
    "store_id": "f24267bd-79f4-433f-a9f2-485c171301e4",
    "status": "closed",
    "action": "customer_dismissed"
  }
}

modal.closed Data Parameters

FieldTypeDescription
payment_link_idString (UUID)Payment link identifier for the closed session.
store_idString (UUID)Associated store ID.
statusStringModal status: "closed".
actionStringAction triggered: "customer_dismissed".

On this page