stripe
stripe
Crystal implementation of the Stripe API
Installation
-
Add the dependency to your
shard.yml
:dependencies: stripe: github: jgaskins/stripe
-
Run
shards install
Usage
The Stripe::Client
takes an API key argument or you can set the STRIPE_API_KEY
environment variable.
require "stripe"
# Pass the API key explicitly
stripe = Stripe::Client.new(api_key)
# ... or pull it from the `STRIPE_API_KEY` env var
stripe = Stripe::Client.new
To create a PaymentIntent
:
payment_intent = stripe.payment_intents.create(
amount: 13_37, # $13.37
currency: :usd,
customer: user.stripe_customer_id,
confirm: true,
)
See the Stripe docs for details on what these options do.
Contributing
- Fork it (https://github.com/jgaskins/stripe/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Jamie Gaskins - creator and maintainer
Repository
stripe
Owner
Statistic
- 0
- 0
- 0
- 0
- 1
- 8 days ago
- April 16, 2025
License
MIT License
Links
Synced at
Fri, 09 May 2025 17:36:11 GMT
Languages