- Free for 7 days, then just
$5/month or
$49/year.
+ Free for 7 days, then just
$5/mo,
$49/yr, or
$149 once.
We believe the best way to build a superior product is to charge for it.
As a paid Snipt member, you'll have unrestricted access to the app, API,
diff --git a/views.py b/views.py
index f61cb9f..cd9dd02 100644
--- a/views.py
+++ b/views.py
@@ -104,19 +104,32 @@ def pro_complete(request):
token = request.POST['token']
stripe.api_key = STRIPE_SECRET_KEY
- plan = 'snipt-monthly'
+ # One-time plan.
+ if request.POST['plan'] == 'onetime':
+ customer = stripe.Customer.create(email=request.user.email,
+ card=token)
+ try:
+ stripe.Charge.create(amount=14900,
+ currency='usd',
+ customer=customer.id,
+ description='Snipt.net')
+ except stripe.CardError:
+ return HttpResponseRedirect('/pro/?declined=true')
- if request.POST['plan'] == 'monthly':
- plan = 'snipt-monthly'
- elif request.POST['plan'] == 'yearly':
- plan = 'snipt-yearly'
+ # Recurring plans.
+ else:
- try:
- customer = stripe.Customer.create(card=token,
- plan=plan,
- email=request.user.email)
- except stripe.CardError:
- return HttpResponseRedirect('/pro/?declined=true')
+ if request.POST['plan'] == 'monthly':
+ plan = 'snipt-monthly'
+ elif request.POST['plan'] == 'yearly':
+ plan = 'snipt-yearly'
+
+ try:
+ customer = stripe.Customer.create(card=token,
+ plan=plan,
+ email=request.user.email)
+ except stripe.CardError:
+ return HttpResponseRedirect('/pro/?declined=true')
profile = request.user.profile
profile.is_pro = True