cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox mock invoicing webhook requests have incorrect structure

Highlighted
_ob Contributor
Contributor

Sandbox mock invoicing webhook requests have incorrect structure

The mock webhook request feature available in the developer sandbox sends out requests with a format like:

 

{
  "id": "WH-0T490472X6099635W-7LJ29748BW389372K",
  "create_time": "2015-09-25T23:14:14Z",
  "resource_type": "invoices",
  "event_type": "INVOICING.INVOICE.CREATED",
  "summary": "An invoice was created",
  "resource": {
    <invoice body>
  }
  ...
}

while actual event webhooks look like (note the nested "invoice" object in "resource"):

 

{
"id": "WH-2ME1746606342714T-4M551170NR801420S", "create_time": "2019-04-05T22:40:16.502Z", "resource_type": "invoices", "event_type": "INVOICING.INVOICE.CREATED", "summary": "An invoice is created.", "resource": { "invoice": { <invoice body> } } ... }

In addition, the summaries for the different event types (CREATED, PAID, etc.) all show as "An invoice is created." when mocked as well.