Stripe¶
Stripe uses OAuth2 for its authorization service. To setup Stripe backend:
Register a new application at Stripe App Creation, and
Grab the
client_id
value inApplications
tab and fill theApp Id
setting:SOCIAL_AUTH_STRIPE_KEY = 'ca_...'
Grab the
Test Secret Key
in theAPI Keys
tab and fille theApp Secret
setting:SOCIAL_AUTH_STRIPE_SECRET = '...'
Define
SOCIAL_AUTH_STRIPE_SCOPE
with the desired scope (options areread_only
andread_write
):SOCIAL_AUTH_STRIPE_SCOPE = ['read_only']
Add the needed backend to
AUTHENTICATION_BACKENDS
:AUTHENTICATION_BACKENDS = ( ... 'social_core.backends.stripe.StripeOAuth2', ... )
More info on Stripe OAuth2 at Integrating OAuth.