TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tell HN: I made a knockoff Stripe Radar using GPT-4

5 pointsby tinyprojectsabout 2 years ago
I run a SaaS biz that is low transaction value &#x2F; high volume. This meant when Stripe introduced their latest policy where you get charged $20 per card dispute no matter if you win or lose it, I decided to try out Stripe Radar&#x27;s 30 day free trial to help me detect credit card fraud on my site.<p>It worked well, and I managed to prevent several fraudulent cases using it. However, once the trial period ended I was being charged £0.06 per screened transaction(!). This was becoming really expensive with many transactions.<p>I noticed during my free trial with Stripe Radar that 90% of the time it&#x27;s quite easy to eyeball if a credit card payment is fraudulent based off of the number of blocked card attempts from the customer, and the number of cards tried - so I wondered if I could build my own version using the free information available through Stripe&#x27;s API.<p>Stripe&#x27;s docs can be confusing, so I decided to try ChatGPT with GPT-4 for the first time to help write code. I described my task, and it created some beautiful Typescript functions that take in a paymentIntent id, and determines if the payment is fraudulent taking into account failed payment attempts, number of cards, and even IP address, country of origin, and email address - all using Stripe&#x27;s free API!<p>I&#x27;ve been using this code for a day and it has already picked up a couple of sketchy transactions, but completely free. It&#x27;s missing things like &quot;Early Fraud Warnings&quot; and info from &quot;Stripe&#x27;s Network&quot;, but I&#x27;m okay with that since it&#x27;s saving me £0.06&#x2F;transaction.<p>This is the first time I&#x27;ve used AI in a professional coding sense for a real problem (not just for fun). I&#x27;m actually blown away, not only did it save me a bunch of time coding, but the result is saving&#x2F;making me money - hence my excitement writing this!<p>I&#x27;ve been coding for 10 years, but this experience using AI felt like something totally different. It&#x27;s like gaining a team of developers that you can orchestrate whilst you do less of the typing. It&#x27;s made me more excited to build things than ever before.

no comments

no comments