All Projects â†’ dmjio â†’ Stripe

dmjio / Stripe

💰 Stripe API

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Stripe

Nest-Js-Boiler-Plate
Nest Js Boilerplate with JWT authentication, CRUD functions and payment gateways.
Stars: ✭ 14 (-90.67%)
Mutual labels:  stripe, stripe-api
Terraform Provider Stripe
A Terraform Provider for Stripe
Stars: ✭ 143 (-4.67%)
Mutual labels:  stripe-api, stripe
Stripe Webhook Monitor
Stripe Webhook Monitor provides a real-time feed and graph of Stripe events received via webhooks. 📈✨
Stars: ✭ 356 (+137.33%)
Mutual labels:  stripe-api, stripe
stripe-course
Stripe Payments In Practice - Build your own online ecommerce store and subscription membership website
Stars: ✭ 31 (-79.33%)
Mutual labels:  stripe, stripe-api
Stripe Demo Connect Roastery Saas Platform
Roastery demo SaaS platform using Stripe Connect
Stars: ✭ 33 (-78%)
Mutual labels:  stripe-api, stripe
procesa-pagos-con-laravel
Código fuente resultado del curso "Procesa pagos con Laravel y las mejores plataformas de pagos"
Stars: ✭ 38 (-74.67%)
Mutual labels:  stripe, stripe-api
Vue Stripe Elements
A Vue 2 component collection for StripeElements
Stars: ✭ 498 (+232%)
Mutual labels:  stripe-api, stripe
pinax-stripe-light
a payments Django app for Stripe
Stars: ✭ 670 (+346.67%)
Mutual labels:  stripe, stripe-api
Stripe Rs
Moved to https://github.com/wyyerd/stripe-rs.
Stars: ✭ 16 (-89.33%)
Mutual labels:  stripe-api, stripe
Pinax Stripe
a payments Django app for Stripe
Stars: ✭ 650 (+333.33%)
Mutual labels:  stripe-api, stripe
nuxt-stripejs
💳 NuxtJS module for Stripe.js which loads only when required and w/ retry mechanism
Stars: ✭ 17 (-88.67%)
Mutual labels:  stripe, stripe-api
Stripe Kit
Stars: ✭ 50 (-66.67%)
Mutual labels:  stripe-api, stripe
MERN-Ecommerce
An E-commerce app built using MERN stack. It has 4 social login options and implements email verification as well. Stripe and Paypal payment gateways are implemented.
Stars: ✭ 50 (-66.67%)
Mutual labels:  stripe, stripe-api
stripe-scala
Scala library for the Stripe API
Stars: ✭ 33 (-78%)
Mutual labels:  stripe, stripe-api
stripe
Stripe integration with Magento 2
Stars: ✭ 58 (-61.33%)
Mutual labels:  stripe, stripe-api
Stripe Connect Rocketrides
Sample on-demand platform built on Stripe: Connect onboarding for pilots, iOS app for passengers to request rides.
Stars: ✭ 426 (+184%)
Mutual labels:  stripe-api, stripe
TradeByte
💸 TradeByte - Stocks Trading Simulation WebApp
Stars: ✭ 30 (-80%)
Mutual labels:  stripe, stripe-api
stripe-graphql
[WIP] 🚧🚧🚧 😎 Community-driven Stripe GraphQL API with superpowers.
Stars: ✭ 53 (-64.67%)
Mutual labels:  stripe, stripe-api
Stripity stripe
An Elixir Library for Stripe
Stars: ✭ 597 (+298%)
Mutual labels:  stripe-api, stripe
Stripy
Micro wrapper for Stripe's REST API.
Stars: ✭ 49 (-67.33%)
Mutual labels:  stripe-api, stripe

stripe

Hackage Haskell Programming Language MIT LICENSE Join the chat at https://gitter.im/dmjio/stripe Build Status

Stripe API coverage for Haskell (Stripe API)

All Stripe commands are supported, including but not limited to:

  • Charges
  • Refunds
  • Customers
  • Cards
  • Subscriptions
  • Plans
  • Coupons
  • Discounts
  • Invoices
  • Invoice Items
  • Disputes
  • Transfers
  • Recipients (Deprecated)
  • Bitcoin
  • Application Fees
  • Application Fee Refunds
  • Account
  • Balance
  • Events and Tokens

Haddock Coverage

All code written for this library is documented to completion with the haddock documentation tool

100+ Hspec Tests

Thoroughly unit-tested with hspec. All API commands are unit-tested before inclusion into the API (see the tests directory). To run the tests, perform the following:

cabal clean
cabal configure --enable-tests
cabal build tests
dist/build/tests/tests # You will be prompted to enter your *TEST* key

Pagination

Pagination is possible on all API calls that return a JSON array. Any API call that returns a StripeList is eligible for pagination. To use in practice do the following:

import Web.Stripe
import Web.Stripe.Customer

main :: IO ()
main = do
  let config = StripeConfig (StripeKey "secret key") Nothing
  result <- stripe config $ getCustomers
				(Just 30 :: Maybe Limit) -- Defaults to 10 if Nothing, 100 is Max
				(StartingAfter $ CustomerId "customer_id0")
				(EndingBefore $ CustomerId "customer_id30")
  case result of
    Right stripelist -> print (list stripelist :: [Customer])
    Left stripeError -> print stripeError

Optional Parameters

Stripe API calls can take multiple optional parameters. stripe-haskell supports optional parameters through the use of type-families and typeclasses. In practice, the function to use is (-&-) to specify optional parameters on a request. For a deeper dive into how this works, please see this blog post.

chargeCardByToken :: TokenId -> Currency -> Amount -> IO (Either StripeError Charge)
chargeCardByToken tokenId currency amount =
  stripe config $ createCharge amount currency
     -&- tokenId

Versioning

All versioning is hard-coded (for safety) to version 2014-10-07. Stripe API versions specified in the HTTP headers of Stripe requests take precedence over the API version specified in your Stripe Dashboard. In an attempt to ensure API consistency and correct parsing of returned JSON, all Stripe versions are hard-coded, and are inaccessible to the end-users of this library. When a new Stripe API version is released this library will increment the hard-coded API version.

Expansion

Object expansion is supported on Stripe objects eligible for expansion though the ExpandParams type. Object expansion allows normal Stripe API calls to return expanded objects inside of other objects. For example, a Customer object contains a Card ID hash on the default_card field. This default_card hash can be expanded into a full Card object inside a Customer object. As an example:

import Web.Stripe
import Web.Stripe.Customer

main :: IO ()
main = do
  let config = StripeConfig (StripeKey "secret key") Nothing
  result <- stripe config $ getCustomerExpandable
				   (CustomerId "customerid")
				   (["default_card"] :: ExpandParams)
  case result of
    Right customer -> print (defaultCard customer) -- Will be an `ExpandedCard`
    Left stripeError -> print stripeError

MetaData

Stripe objects allow the embedding of arbitrary metadata. Any Stripe object that supports the embedding of metadata is available via this API. As an example:

import Web.Stripe
import Web.Stripe.Coupon

main :: IO ()
main = do
  let config = StripeConfig (StripeKey "secret key") Nothing
  result <- stripe config $ updateCoupon (CouponId "couponid") [("key1", "value2"), ("key2", "value2")]
  case result of
    Right coupon -> print $ couponMetaData coupon
    Left stripeError -> print stripeError

Issues

Any API recommendations or bugs can be reported on the GitHub issue tracker. Pull requests welcome!

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].