Giter Club home page Giter Club logo

killbill-stripe-plugin's Introduction

killbill-stripe-plugin

Plugin to use Stripe as a gateway.

Release builds are available on Maven Central with coordinates org.kill-bill.billing.plugin.ruby:stripe-plugin.

Kill Bill compatibility

Plugin version Kill Bill version Stripe version
1.0.y 0.14.z 2015-02-18
2.0.y 0.15.z 2015-02-18
3.0.y 0.16.z 2015-02-18

Requirements

The plugin needs a database. The latest version of the schema can be found here.

Configuration

curl -v \
     -X POST \
     -u admin:password \
     -H 'X-Killbill-ApiKey: bob' \
     -H 'X-Killbill-ApiSecret: lazar' \
     -H 'X-Killbill-CreatedBy: admin' \
     -H 'Content-Type: text/plain' \
     -d ':stripe:
  :api_secret_key: "your-secret-key"
  :api_publishable_key: "your-publishable-key"' \
     http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-stripe

To get your credentials:

  1. Go to stripe.com and create an account. This account will be used as a sandbox environment for testing.
  2. In your Stripe account, click on Your Account (top right), then click on Account Settings and then on the API Keys tab. Write down your keys.

To go to production, create a stripe.yml configuration file under /var/tmp/bundles/plugins/ruby/killbill-stripe/x.y.z/ containing the following:

:stripe:
  :test: false

Usage

You would typically implement Stripe.js to tokenize credit cards.

After receiving the token from Stripe, call:

curl -v \
     -X POST \
     -u admin:password \
     -H 'X-Killbill-ApiKey: bob' \
     -H 'X-Killbill-ApiSecret: lazar' \
     -H 'X-Killbill-CreatedBy: admin' \
     -H 'Content-Type: application/json' \
     -d '{
       "pluginName": "killbill-stripe",
       "pluginInfo": {
         "properties": [{
           "key": "token",
           "value": "tok_20G53990M6953444J"
         }]
       }
     }' \
     "http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/paymentMethods?isDefault=true"

An example implementation is exposed at:

http://127.0.0.1:8080/plugins/killbill-stripe?kb_account_id=2a55045a-ce1d-4344-942d-b825536328f9&kb_tenant_id=a86d9fd1-718d-4178-a9eb-46c61aa2548f

Plugin properties

Key Description
skip_gw If true, skip the call to Stripe
payment_processor_account_id Config entry name of the merchant account to use
external_key_as_order_id If true, set the payment external key as the Stripe order id
customer Stripe customer id
token Stripe token
cc_first_name Credit card holder first name
cc_last_name Credit card holder last name
cc_type Credit card brand
cc_expiration_month Credit card expiration month
cc_expiration_year Credit card expiration year
cc_verification_value CVC/CVV/CVN
email Purchaser email
address1 Billing address first line
address2 Billing address second line
city Billing address city
zip Billing address zip code
state Billing address state
country Billing address country
eci Network tokenization attribute
payment_cryptogram Network tokenization attribute
transaction_id Network tokenization attribute
payment_instrument_name ApplePay tokenization attribute
payment_network ApplePay tokenization attribute
transaction_identifier ApplePay tokenization attribute

killbill-stripe-plugin's People

Contributors

anthonyp avatar kares avatar killbillio avatar ntherning avatar pierre avatar sbrossie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.