NAV

Notification examples

There is always common part of the message which defines what kind of event is expected

COMMON PART of the message
{
  "id":34,
  "event_code": " Event code ",
  "create_date": " Timestamp of the event ",
  "company_id": " Your company id in SimplePin database ", 
  "...": " ... ", 
}

 

Based on the event_code, you might receive different message. Following is the most common example of Webhook's notification in JSON format:

INV-PAID-CCARD. Invoice paid by customer using Credit Card
{
  "id":34,
  "event_code":"INV-PAID-CCARD",
  "create_date":1547149419560,
  "company_id":10,
  "cc_profile_id":2,
  "cc_profile_version":0,
  "customer_name":"John Smith",
  "policy":"POL003",
  "invoice_id":4899,
  "invoice_version":0,
  "invoice_number":"INV001",
  "amount":1282.05,
  "card_last_digits":"4572",
  "currency_code":"CAD"
}