What's the best option to process credit card payments in Django?

As mentioned in the previous answer, you need a merchant account and a payment gateway.

I'd recommend BrainTree if you're processing enough payments that they'll accept you. They act as both if you want them to. They also have a Python API for processing payments. It will be much easier to set up. I don't know if they accept customers from outside of the US.

PayPal also offers a solution that allows you to process credit card payments without users having to go to the PayPal site. It's called website payments pro, but I think it's only available in the US and the UK.

Otherwise, look at Authorize.Net as a gateway (or shop around) and speak with you bank about a merchant account.

Nothing is built into Django or Python for this.


Stripe has a Python library to accept credit cards without needing a merchant account: https://github.com/stripe/stripe-python

Check out the documentation and FAQ, and feel free to drop by our chatroom if you have more questions.


You can avoid PCI audits if the credit card details never touch your server... for example by using payment forms hosted on the servers of your chosen payment gateway provider.

I have used SagePay here in the UK (and built Django connectors for their service from scratch - sorry not on github yet...) and they offer payment forms you can display in an iframe on your site so they look part of your own checkout page, specifically to avoid the PCI issues.