Stripe Scala Library
Latest commit f6edf3d Oct 26, 2013 @anurag anurag Merge pull request #20 from anchortab/default-card
Implement cards list and defaultCard attribute.


Stripe Scala bindings

Quickstart with sbt 0.10

In the stripe-scala directory, run sbt console. You're now in a Scala REPL where you can import com.stripe. Set your stripe.apiKey and start making API requests. (See the Example section at the end of this file)


The current release is distributed for Scala 2.9.0 or later. Add stripe-scala as a dependency in sbt or Maven:


Add the stripe-scala dependency:

val stripeScala = "com.stripe" %% "stripe-scala" % "1.1.2"


Add the Scala-Tools repository and the stripe-scala dependency to your POM:

        <artifactId>stripe-scala_2.9.1</artifactId> <!-- replace with your Scala version -->
        <name>Scala-Tools Maven2 Repository</name>

Run the test suite

In the stripe-scala directory, run sbt test, using your stripe test secret key.



import com.stripe
stripe.apiKey = "sSs57dBsUSkxo3lQPsNKNDX5H0RAcYsj"
val charge = stripe.Charge.create(Map(
  "amount" -> 100,
  "currency" -> "usd",
  "card" -> Map("number" -> "4242424242424242", "exp_month" -> 3, "exp_year" -> 2015)

See src/test/scala/com/stripe/StripeSuite.scala for more examples.

See for the most up-to-date documentation.