anildigital

anildigital

Hi, I am writing a Phoenix app where I need to integrate with Stripe. mainly for subscriptions and plans. Have you used any available open source Elixir Stripe library? What is your experience?

First 6 of 6 Posts Switch mode

AstonJ

AstonJ

Have a look at this:

You may also be interested in this:

mangofarmer

mangofarmer

Hi, I’ve had some success with Stripity Stripe (stripity_stripe | Hex) to sign people up to subscription plans, and a bit of Stripe Connect to make charges on behalf of other users. Unfortunately it looks like I picked it a the time the library was going through a major re-write so whilst it works for me at the moment it’s on my list of things to reassess in the future. I do incoming webhook handling mostly manually, using the signatures or re-fetching the event directly using the API is also on my todo list for now.

I had to make a few tiny changes to the code at the time, but since their development’s moved on it’s not going to get merged back in so I’m a bit out on a limb now but none the less it works ok. It’s here: https://github.com/wardes/stripity_stripe/commits/wardes-cust-patch-1

So maybe worth seeing what their current version is like instead. They do all seem to have different approaches to wrapping the API and data structures.
Cheers.

Crowdhailer

Crowdhailer

Creator of Raxx

We just managed without one. Stripe’s api is very clean and well documented. building and sending requests was not hard. e.g.

def create_a_charge(charge, token) do
  %{"object" => "customer", "id" => stripe_customer_id} = token
  data = %{
    amount: charge.amount,
    currency: "GBP",
    customer: stripe_customer_id,
    description: charge.description,
    metadata: charge.metadata,
  }

  request = request(:POST, "/v1/charges")
  |> set_authorization(:bearer, api_secret())
  |> set_header("idempotency-key", charge.transaction_id)
  |> accept(:json)
  |> send_form(data)

  handle_response(send_sync(request, api_host()))
end
13
Post #3
svilen

svilen

Author of Concurrent Data Processing in Elixir

FWIW: I emailed Stripe sometime ago and I’m happy to say they finally added Elixir as a language to the Community Libraries section:

11
Post #4
Crowdhailer

Crowdhailer

Creator of Raxx

I never mentioned here what send_sync was. Previously it was a cumbersome wrapper around HTTPoison. Now I am working on a Client library that takes full request objects and just handles sending them.
You can see it in this Pull Request. Currently looking for feedback.

albydarned

albydarned

I agree with this. Stripe’s API is so well documented and clean that I had no problem implementing it on my own.

For me I only needed to implement a few endpoints, so it was easy enough.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement