Skip to main content
Solved

Stripe Payment from Webhook Decimal Issue

  • January 12, 2023
  • 4 replies
  • 60 views

Forum|alt.badge.img+10

I'm creating an automation in Airtable where the info from each stripe payment comes though. The price comes in without decimals, so I thought it would be easy to add a conditional action that is there isn't a '.' in the dynamic object I could just add it within the automation, but ... its seems to be out of my comfort zone.

Is there a Script that someone has to do this?  or another workaround?

Best answer by Lost-Merovingia

This worked, if someone ever needs it:

REPLACE({Paid}, LEN({Paid})-1, 0, ".")

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, what're you doing with the output after that?  Could you use a formula field and just do a `{Number from Stripe} & ".00"` or something?


Forum|alt.badge.img+10

Hm, what're you doing with the output after that?  Could you use a formula field and just do a `{Number from Stripe} & ".00"` or something?


No .... cause if the payment was 45.95.  Stripe imports it as 4995, then it'll be 4,995.00.  There must be a regex thing for this.


Forum|alt.badge.img+10

I'm trying to use the formulas for this ... but ... 

I'm not good at it. Does this make sense?

 

LEFT(Total,2), ".", RIGHT(Total,2)

Forum|alt.badge.img+10
  • Author
  • Inspiring
  • Answer
  • January 16, 2023

This worked, if someone ever needs it:

REPLACE({Paid}, LEN({Paid})-1, 0, ".")