Line Items In Webhook

Is it possible to pass a line item array into a webhook?

Yes, what I normally do is pass a single parameter as a JSON string, and then parse that on the other end (usually Make).

1 Like

Would you make the json string with the template column?

I generally use a Helper Table, and construct the JSON using one or more of the following columns:

  • Make JSON
  • Template
  • JavaScript
  • Joined List
  • If-then-else

Every use case is different, but the general approach is something like:

  • One row per item
  • Make JSON column to construct a JSON string for each row
  • If-then-else column to discard rows that aren’t required
  • Joined List to gather up all the line items
  • Template to wrap them up into a valid JSON string.
1 Like

Thanks Darren,

Another Question - I am trying to post an amount on paystack with the same web hook.

Lets say the value is 13952.317500000001

When the invoice is generated its showing 139.52

I am guessing that make is seeing that as cents. Would you have any advice on how to tackle this problem?

Presumably you would expect to see 13952.32?

Looks like Make is rounding it to 13952, and then Paystack is interpreting it as 139.52

What if you send it as 1395232? (eg multiply it by 100 before sending)

Got it to work thanks @Darren_Murphy. Just took the amount and multiplied it by 100 and sent that as the value.

You legend!

1 Like

Cool :+1:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.