Skip to content

One Page Checkout

Inspired by Stripe Checkout.

Why

Integrating payment for each project requires time and effort. Especially hosting all the fancy backend stuff and getting approval by payment provider is not fun. With one page checkout, you can just use your main site to process payments and redirect to your project site.

How it works

This feature uses already available checkout page. The difference is you just need to pass callback query parameter to the url. After payment complete or canceled, system will do a post request with details to the callback address.

How to use it

http://localhost:8000/checkout?success_url=[success_url]&cancel_url=[cancel_url]&products=[products_ids]&quantities=[quantities]
  • success_url: URL that system will redirect after successful payment.
  • cancel_url: URL that system will redirect after cancelled payment.
  • product_ids: List of product ids that will be purchased.
  • quantities: Quantities of each product. Will be matched with product ids using the same order. If not provided each product quantity will set to 1.