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

https://news.ycombinator.com/item?id=35323278
by tinyprojects • 3 years ago
5 0 3 years ago

I run a SaaS biz that is low transaction value / 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's 30 day free trial to help me detect credit card fraud on my site.

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.

I noticed during my free trial with Stripe Radar that 90% of the time it'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's API.

Stripe'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's free API!

I've been using this code for a day and it has already picked up a couple of sketchy transactions, but completely free. It's missing things like "Early Fraud Warnings" and info from "Stripe's Network", but I'm okay with that since it's saving me £0.06/transaction.

This is the first time I've used AI in a professional coding sense for a real problem (not just for fun). I'm actually blown away, not only did it save me a bunch of time coding, but the result is saving/making me money - hence my excitement writing this!

I've been coding for 10 years, but this experience using AI felt like something totally different. It's like gaining a team of developers that you can orchestrate whilst you do less of the typing. It's made me more excited to build things than ever before.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com