Modal Closed
Process modal.closed webhooks and record when a customer closes the payment modal.
Handle modal.closed Events
modal.closed EventsUse the modal.closed webhook to record when a customer closes the payment modal.
Amwal sends this event when the customer closes the payment modal. Use the payload to record the event and the payment link's current status in your system.
Process the event
- Read the payload
id,status, and payment-link details. - Record that the customer closed the payment modal.
- Store the current payment-link status with the related order or checkout record.
- Return HTTP
200after your system accepts the event.
Example payload
The following example uses dummy data. Do not include real customer details, merchant credentials, or signed URLs in documentation.
{
"id": "11111111-2222-4333-8444-555555555555",
"fees": "0.00000",
"type": "PRODUCTION",
"taxes": "0.00000",
"amount": "2598.00000",
"issuer": null,
"number": null,
"ref_id": null,
"status": "expired",
"gateway": 11,
"discount": "0.00000",
"shipping": "0.00000",
"trx_lang": "en",
"amwal_fee": null,
"bank_name": "EXAMPLE_BANK",
"card_type": "",
"created_at": "2026-01-15T10:30:00.000000+03:00",
"store_logo": "https://example.com/store-logo.png",
"branch_name": "Main Branch",
"card_holder": "",
"merchant_id": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee",
"murabha_fee": "0.00",
"app_notified": false,
"client_email": "[email protected]",
"gateway_type": 4,
"merchant_key": "prod-amwal-example-key",
"paymentBrand": null,
"store_domain": "https://store.example.com",
"total_amount": "2598.00",
"amwal_tax_vat": null,
"approval_type": null,
"hypersplit_id": null,
"is_refundable": false,
"order_details": {
"order_id": null,
"payment_link_metadata": {
"order_id": "ORDER-1001",
"platform": "mobile_app",
"customer_id": "CUSTOMER-1001",
"reference_number": "ORDER-1001"
}
},
"failure_reason": null,
"funding_method": null,
"payment_amount": "2598.00",
"payment_method": "Apple Pay",
"payment_option": "Installment",
"refund_tracker": null,
"address_details": null,
"convenience_fee": "0.00",
"disputed_status": null,
"installment_fee": "58.46",
"merchant_domain": "https://store.example.com",
"merchant_payout": null,
"murabha_fee_vat": "0.00",
"payment_link_id": "99999999-8888-4777-8666-555555555555",
"refunded_amount": "0.00",
"address_required": false,
"brand_percentage": null,
"brand_static_fee": null,
"card_bank_issuer": "",
"client_last_name": "Customer",
"shipping_details": null,
"supports_stc_pay": false,
"client_first_name": "Example",
"client_registered": false,
"payment_link_lang": "en",
"card_last_4_digits": "",
"card_payment_brand": "",
"installment_status": "Pending",
"client_phone_number": "+966500000000",
"installment_fee_vat": "8.77",
"installment_tracker": {
"id": "123456",
"status": "P",
"message": null
},
"has_new_registration": false,
"hyperpay_checkout_id": null,
"installment_duration": "12",
"is_approved_by_client": null,
"merchant_country_code": "SA",
"merchant_business_name": "Example Store",
"billing_address_required": false,
"payment_link_description": "Example installment purchase",
"payment_link_callback_url": "https://store.example.com/payment/callback",
"payment_link_show_shipping": false,
"payment_link_passkey_enabled": false,
"merchant_english_business_name": "Example Store",
"payment_link_only_show_pay_in_full": false,
"payment_link_only_show_bank_installments": false
}Updated 1 day ago
Did this page help you?
