try:
charge = stripe.Charge.create(
amount=int(product.price * 100),
currency='usd',
card=stripe_token,
description=email)
except stripe.CardError, e:
return """..err.."""
print chargeI'm now unsure what something like Gumroad's value proposition is, considering I'm basically at feature parity with them (aside from PDF stamping, which I don't do anyway).
After a few years, Stripe is still only available in a handful of countries. If you live in a country that is not only not US (tier 1 for pretty much everything), but not even the handful of high-priority countries like Canada or UK, your options are greatly reduced. For me, for example, it's PayPal or FastSpring - I would love to use Stripe, but I simply can't.
You gather params, post it somewhere, check out the response, and display it. It gets fancier with age, but it's essentially the same thing.
Also the stripe_token is pretty magic, it lets you make charges to customer credit cards without storing the card details or having to take them to an external payment page.
I use Braintree at my current job.
I used to work for Balanced.
I know payment processors. Its just times have changed and this kind of thing is now quite standard. But 'magical' is of opinion, I was just inquiring what he found magical.
Compared with Stripe's 2.9% + 30¢, it's expensive, but Gumroad appears to do two things that Stripe doesn't:
- Work out whether and how much sales tax to charge (which I guess should be easy if you operate in only one state)
- Absorb chargeback fees
This second one makes the 5% seem more reasonable.