Last active
December 15, 2015 00:49
-
-
Save keikubo/5175269 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> customer = stripe.Customer.create( | |
... card="tok_1SxLsd4YtToozX") | |
>>> plan = stripe.Plan.create( | |
... amount=2000, | |
... interval='month', | |
... name='Amazing Gold Plan', | |
... currency='usd', | |
... id='gold') | |
>>> customer.update_subscription( | |
... plan="gold") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import stripe | |
>>> stripe.api_key = "sample_test_api_key" | |
>>> stripe.api_base = "https://api.webpay.jp" | |
>>> stripe.Charge.create( | |
... amount=400, | |
... currency="jpy", | |
... card={ | |
... "number": '4242424242424242', | |
... "exp_month": '12', | |
... "exp_year": '2014', | |
... "cvc": '123' | |
... } | |
... ) | |
>>> customer = stripe.Customer.create( | |
... card="tok_1SxLsd4YtToozX") | |
>>> plan = stripe.Plan.create( | |
... amount=2000, | |
... interval='month', | |
... name='Amazing Gold Plan', | |
... currency='jpy', | |
... id='gold') | |
>>> customer.update_subscription( | |
... plan="gold") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment