Light Mode
Invoice
Below is the webhook store event paired with its respective data schema related to the Invoice webhook events:
Invoice Created Webhook Event Model
This event is triggered when the order status is either completed or restored.
{
"event": "invoice.created",
"merchant": 1601633483,
"created_at": "Mon Feb 20 2023 15:58:00 GMT+0300",
"data": {
"id": 952648521,
"uuid": "a2bffe40-adf7-4bfe-8782-c34ca567ec98",
"invoice_reference_id": "1772",
"order_id": 315606782,
"type": "Credit Note",
"date": "2023-02-20 15:58:00",
"invoice_number": 13,
"payment_method": "bank",
"sub_total": {
"amount": 50,
"currency": "SAR"
},
"shipping_cost": {
"amount": 33,
"taxable": true,
"currency": "SAR"
},
"cod_cost": {
"amount": 0,
"taxable": true,
"currency": "SAR"
},
"discount": {
"amount": 0,
"currency": "SAR"
},
"tax": {
"percent": 50,
"amount": {
"amount": 41.5,
"currency": "SAR"
}
},
"total": {
"amount": 124.5,
"currency": "SAR"
},
"shipping_cost_discount": {
"amount": 0,
"currency": "SAR"
},
"items": [
{
"id": 710619710,
"product_id": "977135276",
"item_id": 409661958,
"name": "User Product Demo",
"quantity": 1,
"type": "product",
"price": {
"amount": 50,
"currency": "SAR"
},
"discount": {
"amount": 0,
"currency": "SAR"
},
"tax": {
"percent": 50,
"amount": {
"amount": 25,
"currency": "SAR"
}
},
"total": {
"amount": 75,
"currency": "SAR"
}
},
{
"name": "رسوم الشحن",
"quantity": 1,
"type": "service",
"price": {
"amount": 33,
"currency": "SAR"
},
"discount": {
"amount": 0,
"currency": "SAR"
},
"tax": {
"percent": 50,
"amount": {
"amount": 16.5,
"currency": "SAR"
}
},
"total": {
"amount": 49.5,
"currency": "SAR"
}
}
],
"customer": {
"id": 166343388,
"first_name": "Username",
"last_name": "Demo",
"mobile": 555555555,
"mobile_code": "+966",
"email": "[email protected]",
"avatar": "https://logo.com/logo.png",
"gender": "female",
"birthday": {
"date": "1997-03-06 00:00:00.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"city": "جدة",
"country": "السعودية",
"country_code": "SA",
"currency": "SAR",
"location": "31.221365",
"updated_at": {
"date": "2023-02-20 15:44:35.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"order_address": {
"description": "Lorem Ipsum",
"street_name": "abu umayyah ad damri",
"additional_number": null,
"building_number": null,
"district": null
}
}
}
}
Last modified: a month ago