Settings & Configuration
This is the Stripe "publishable" key. You can find it in your Stripe account's Account Settings panel.
This is the Stripe "secret" key. You can find it in your Stripe account's Account Settings panel.
This is the API version to use for API calls and webhook processing.
This is the from address of the email notifications containing invoices.
Sets a default plan and is used if you have a scenario where you want to auto-subscribe new users to a plan upon signup.
Should be a string that is a dotted-notation path to a class that implements hookset methods as outlined below.
pinax-stripe to send out email receipts for successful charges.
A list of URLs to exempt from requiring an active subscription if the
pinax.stripe.middleware.ActiveSubscriptionMiddleware is installed.
The URL of where to redirect requests to that are not from a user with an
active subscription if the
If you wish to charge tax on a subscription, set this value to an integer
specifying the percentage of tax required (i.e. 10% would be '10'). This is
Stripe Account Settings Panel
A HookSet is a design pattern that allows the site developer to override callables to customize behavior. There is some overlap with Signals but they are different in that these are called directly and executed only once per call rather than going through a dispatch mechanism where there is an unknown number of receivers.
There are currently three methods on the
DefaultHookSet than you can
override. You do this by inheriting from the default and implementing the
methods you care to change.
# mysite/hooks.py from pinax.stripe.hooks import DefaultHookSet class HookSet(DefaultHookSet): def adjust_subscription_quantity(self, customer, plan, quantity): """ Given a customer, plan, and quantity, when calling Customer.subscribe you have the opportunity to override the quantity that was specified. """ return quantity def trial_period(self, user, plan): """ Given a user and plan, return an end date for a trial period, or None for no trial period. """ return None def send_receipt(self, charge): pass
# settings.py PINAX_STRIPE_HOOKSET = "mysite.hooks.HookSet"