Fork me on GitHub
#biff
<
2023-09-26
>
Lyn Headley13:09:39

Is there a recommended and easy way to accept payments in a biff application? I imagine redirecting to an external site using oauth, or perhaps holding and using an API key.

Jacob O'Bryant15:09:16

I've used stripe in several apps and can recommend that. they have good docs too. I would use the http api directly; no need to use the Java sdk. I'm planning to put together a biff-stripe example at some point, but might not happen for a while.

👀 3
ianjones15:09:40

Biff doesnt seem to have any built in ways to do this… if you went with something like stripe, you send the user off to the payment page on stripe, then receive webhooks for when events happen. Biff has built in jobs that would work for this pretty well I think

Jacob O'Bryant15:09:25

no need for jobs, but there is a bit of complexity around setting up the web hook; I should at least publish a gist going over that

ianjones15:09:49

I guess you can use their api directly, its been a while since i interacted with stripe

ianjones15:09:58

an example repo would be chef_kiss

👌 1
Jacob O'Bryant15:09:37

also if you want to have the payment form embedded on your own site you can be that as well, though redirecting to stripe's hosted UI is what I always do

ianjones15:09:43

I know they have a whole dev cli where you can funnel webhook events to your local end point

Jacob O'Bryant15:09:10

yep! it's handy

Martynas Maciulevičius15:09:16

> I've used stripe in several apps and can recommend that. Make sure your app doesn't land under "restricted apps" or "restricted businesses" section before writing any code. In their Terms of Service or something similar. I made this mistake in the past and wasted a lot of effort multiple times. It's very rough.

👍 1
Lyn Headley14:11:54

They have an openapi spec. Considering using martian. https://github.com/oliyh/martian

👍 1
Martynas Maciulevičius14:11:18

wrong thread, I think

Lyn Headley15:11:02

This thread is about stripe. So is my message.

👍 1
James Orson02:10:26

So glad to see this Been following HTMX for a bit and it brought me to Biff via my friend @U05V17GUX70

🙌 1
Jacob O'Bryant14:10:33

nice, hope the article was helpful!