Invoice issued subscribe example:
curl --location --request POST '/platform/v1/webhook/subscribe' \
--header 'Authorization: "Bearer API_TOKEN"'\
--header 'Content-Type: application/json' \
--data-raw '{
"event": "invoice/issued",
"target_url": "URL"
}'Invoice issued response example:
{
"entity_name": "invoice",
"event_type": "issued",
"data": {
"business_id": "s5ek7tfgp068i2st",
"staff_id": "e6j4i1ofy2pf0dmg",
"conversation_id": "pto6yng4e908c8g0",
"invoice_id": "ujjq3chk5jv91y0q",
"state": "issued",
"title": "#0000001",
"issued_at": "2019-10-29",
"due_date": "2019-11-28",
"invoice_number": 1,
"address": "Tel Aviv",
"note": null,
"amount": "35.84",
"currency": "ILS",
"charge_at": null,
"client_id": "54gjvtadfbxiom7y",
"created_at": "2019-10-29T09:33:43.000+02:00",
"items": [
{
"title": "Demo Class / Event",
"amount": "35.84",
"tax": "3.84"
}
]
}
}Note: amount is a number when the value is a whole amount (e.g. 35) and a string when it has a decimal part (e.g. "35.84"). Coerce it before doing arithmetic on it. The nested items[].amount and items[].tax are always strings.
