Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import stripe
  2.  
  3. stripe.api_key = "sk_test_sUxmXOcI4odtOAEQOZlIh8Qs"
  4.  
  5. stripe.Token.create(
  6. card={
  7. "number": '4242424242424242',
  8. "exp_month": 12,
  9. "exp_year": 2018,
  10. "cvc": '123'
  11. },
  12. )
  13.  
  14. stripe.Customer.create(
  15. description="test test test",
  16. source="tok_visa"
  17. )
  18.  
  19. stripe.Subscription.create(
  20. customer="id",
  21. items=[
  22. {
  23. "plan": "1",
  24. },
  25. ],
  26. )
  27.  
  28. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement