Skip to main content
Solved

Stripe Payment from Webhook Decimal Issue


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, ".")
View original
Did this topic help you find an answer to your question?

4 replies

TheTimeSavingCo
Forum|alt.badge.img+18

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?


TheTimeSavingCo wrote:

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.


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)

  • Author
  • Inspiring
  • 33 replies
  • Answer
  • January 16, 2023

This worked, if someone ever needs it:

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

Reply