diadia

興味があることをやってみる。自分のメモを残しておきます。

Django stripe カード情報を登録する

stripeソースurl

https://stripe.com/docs/api/cards/create?lang=python

メモ

import stripe
stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"

customer = stripe.Customer.retrieve("cus_EPPm06zGJs6haY")
customer.sources.create(source="tok_mastercard")

これをCardクラスインスタンスに登録すればよいのか?わかったら更新する。。。