Event Types
Overview of supported event types and how to retrieve them.
Supported Event Types
| Event Type | Description | Trigger Condition |
|---|---|---|
order.created | New order initiated | Customer starts checkout process |
order.success | Payment successful | Payment confirmed and completed |
order.failed | Payment failed | Payment declined, failed, or cancelled |
order.updated | Order details updated | Order information or status changes |
Retrieve Event Types
To fetch available event types, use the following code:
async function getEventTypes() {
const response = await fetch('https://backend.sa.amwal.tech/api/event-types/', {
headers: {
'X-API-Key': 'YOUR_API_KEY_FINGERPRINT'
}
});
const events = await response.json();
console.log('Available events:', events);
return events;
}Sample Response:
[
{"id": 1, "name": "order.created"},
{"id": 2, "name": "order.success"},
{"id": 3, "name": "order.failed"},
{"id": 4, "name": "order.updated"}
]Updated about 15 hours ago