stripe
Version, currently main branch1 version
- main branchlatestJun 7, 2025
github.com/jgaskins/stripe
Stripe API client for Crystal
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
stripe:
github: jgaskins/stripe
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.13.2- License
- MIT
- Author
- Jamie Gaskins
- Targets
all_webhooksfrom examples/oops_all_webhooks.crselect_webhooksfrom examples/webhook.cr
Dependencies
Runtime Dependencies
- http_client*github: jgaskins/http_client
Development Dependencies
- stripe*path: .dev
README
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
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 7, 2025
- Crystal
>= 1.13.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jgaskins/stripe
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1