Danil Sidorov
RU EN DE
Telegram

Online bookshop with card payments

A bookshop with catalog search, shipping quotes, card payments and refunds that keep orders and stock consistent

Online shop / Books

Live interactive demo stand

Find a book, check shipping costs, place an order and try a successful or declined test payment. A separate scenario models two purchases of the same remaining stock.

From choosing a book to payment, cancellation and stock restoration

StackPython, Django REST Framework, Vue 3, TypeScript, PostgreSQL, Stripe

The demo interface is in Russian. Books, buyers and addresses are fictional. Data stays in this browser until reload or reset; payments and refunds are simulated, with no connection to Stripe or the shop database.

What to test in the stand:
  1. Find a book using a typo in the search query and add it to the cart
  2. Enter an address, choose shipping, pay with a test card and cancel the order
  3. Run two purchases in the stock section and compare remaining copies with the participants’ orders
https://verso.example/
Live Stand
Книжный магазин для любопытныхДоставка по России и за рубеж
RU
Время замедлиться

Ещё одна глава.И целый новый мир.

Истории для тихих вечеров и больших открытий.

На книжной полке

Выбирайте по настроению

Небольшие истории. Большие открытия.
verso · истории рядомВымышленные книги и адреса. Курсы и налоговые ставки фиксированы для демо. Платежи и возвраты только имитируются.
Добавьте книгу или откройте корзину с примером заказа.

Turnkey implementation

Need a similar system for your business processes?

I will develop the architecture, fault-tolerant backend, and fast interface. Protected by NDA, clean transferable code, and transparent milestones.

  1. Free timeline and budget estimate within one day
  2. Contract and invoice
  3. Warranty and post-launch support

On weekdays usually within a couple of hours

I will reply personally, no aggressive sales pitch

Task

A bookshop needed to accept online orders and serve customers in different countries. Buyers must see the full price, including shipping and tax, before paying, while the shop must only sell copies it has in stock.

Existing orders must retain their terms when prices or exchange rates change. Cancelling must return books to stock and initiate a refund of any amount paid.

Solution

Separated the system into a Django REST API and a Vue interface. The API checks stock and creates an order in one transaction, locking the book rows. Each order stores a snapshot of titles, prices, currency, address and shipping costs at purchase time.

Payments use either Stripe Checkout or a separate demo provider. In Stripe mode, a signed webhook confirms payment. A payment arriving after cancellation leaves the order cancelled and triggers a refund. Each refund has its own record and idempotency key.

What was done

  • Built a catalog with full-text search and typo tolerance
  • Combined stock checks, order creation and book deduction in one transaction
  • Calculated shipping by zone and weight, and tax by country, state or postal code
  • Connected Stripe Checkout and a separate provider for test cards
  • Stored prices, currency and address as an independent snapshot of every order
  • Implemented cancellation with stock restoration, full refunds and partial refunds
  • Translated the original shop and catalog into Russian, English, French and German
  • Added currencies, shipping and tax to the admin, and exchange rate updates and refund retries to a scheduler

Result

Buyers can find a book, see the full cost, place an order and pay in one interface. Cancellation makes books available for sale again and starts the refund process for money already paid. Staff manage the catalog, orders and settings through the admin.

The embedded demo shows this journey using fictional books and addresses. Test payments, cancellation and two purchases of the same remaining stock share one local browser model.

Developer's note

Danil Sidorov
Danil Sidorov Project developer

What was hard

The main challenge was keeping orders, stock and payments consistent. An order may be cancelled while its buyer is paying; a successful payment must not restore a cancelled order or return its books twice. The API checks statuses under a lock and refunds late payments.

Repeated notifications and provider failures must not lead to duplicate refunds. Every refund has a separate record and a stable idempotency key sent to the provider. A scheduler retries unsuccessful attempts.

What came easy

A clear boundary between the API and the interface simplified catalog, cart and checkout work. Validation and calculations stay on the server, while Vue displays data and operation status. Screen changes do not require duplicating order rules.

Shipping, tax and currency settings fit the standard Django admin. Staff can maintain them without code changes, while existing orders retain their original terms.

Technologies

PythonDjango REST FrameworkVue 3TypeScriptPostgreSQLStripeDocker

Sources

The links confirm the numbers in this case

Tell me about your task

Telegram