This app replaces the old pay

from checkout.forms import CheckoutForm

class JobCheckoutForm(CheckoutForm):

    class Meta:
        model = Job
        fields = (

from checkout.views import CheckoutMixin

class JobCheckoutView(
    PageFormMixin, CheckoutMixin, BaseMixin, UpdateView):

    model = Job
    form_class = JobCheckoutForm

In the html template:

{% include '_form.html' with submit='Checkout' form_id='id_checkout_form' %}

{% block script %}
  {{ block.super }}
  {% include 'checkout/_stripe.js.html' %}
{% endblock script %}

In your .private file, add your test keys for Stripe:

export STRIPE_PUBLISH_KEY="pk_test_123"
export STRIPE_SECRET_KEY="sk_test_456"


from checkout.tests.helper import check_checkout

def test_checkout():
    obj = JobFactory()


To set-up Stripe, tick Payment reviews in Emails (Settings). Stripe will send email notifications for new payments placed in the review queue.


If you are using a copy of the live data set and you want to run test payments, then you might get a No such customer error. This is because the customer numbers on the live system will not match the customer numbers on your test system.

To remove the customer records on the live system:

from checkout.models import Customer