# Line Items In Webhook

**URL:** <https://community.glideapps.com/t/line-items-in-webhook/63474>\
**Category:** Ask for Help\
**Created:** [July 4, 2023, 8:22am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474 "2023-07-04T08:22:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bradley\_Gibson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bradley_gibson/32/58297_2.png) [@Bradley\_Gibson](https://community.glideapps.com/u/Bradley_Gibson)\
**Post date:** [July 4, 2023, 8:22am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/1 "2023-07-04T08:22:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 4, 2023, 8:27am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/2 "2023-07-04T08:27:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bradley\_Gibson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bradley_gibson/32/58297_2.png) [@Bradley\_Gibson](https://community.glideapps.com/u/Bradley_Gibson)\
**Post date:** [July 4, 2023, 8:29am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/3 "2023-07-04T08:29:44Z")

</div>

Would you make the json string with the template column?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 4, 2023, 8:36am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/4 "2023-07-04T08:36:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bradley\_Gibson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bradley_gibson/32/58297_2.png) [@Bradley\_Gibson](https://community.glideapps.com/u/Bradley_Gibson)\
**Post date:** [July 4, 2023, 8:42am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/5 "2023-07-04T08:42:27Z")

</div>

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?

 ![SCR-20230704-jusg](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/6374c88576fa574ac05624a210a6bed6b4e89691.png)

 ![SCR-20230704-juzd](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/4052536735e6402b15f8eee09fbc0be665c1dfa2.png)

 ![SCR-20230704-jvpv](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/5/15983b58fa381c5f4bdd26a487c90e1296b41b96.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 4, 2023, 8:55am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/6 "2023-07-04T08:55:17Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Bradley\_Gibson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bradley_gibson/32/58297_2.png) [@Bradley\_Gibson](https://community.glideapps.com/u/Bradley_Gibson)\
**Post date:** [July 4, 2023, 9:33am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/7 "2023-07-04T09:33:19Z")

</div>

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

You legend!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 4, 2023, 10:03am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/8 "2023-07-04T10:03:28Z")

</div>

Cool 👍

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 5, 2023, 10:03am UTC](https://community.glideapps.com/t/line-items-in-webhook/63474/9 "2023-07-05T10:03:53Z")

</div>

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