Created
September 2, 2020 13:05
-
-
Save miodeqqq/21526d6717373e1db5ff9c2ffdda8c4c to your computer and use it in GitHub Desktop.
Django & Stripe - add_customer_card.py
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
new_card_source = stripe.Customer.create_source(user1.stripe_id, source=token) | |
stripe.SetupIntent.create( | |
payment_method_types=["card"], | |
customer=user1.stripe_id, | |
description="some description", | |
payment_method=new_card_source.id, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment