Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Wholesale marketplace app Atelier asks for net terms before a card

Description and use

Atelier now supports net payment terms, creating orders that remain unpaid until payment is received, while prepaid orders use Stripe checkout and mark orders as paid upon success.

Problem

Enable buyers to choose net payment terms (Prepaid, Net 15, Net 30, Net 60) in a wholesale marketplace checkout while handling order state and payment flow accordingly.

Outcome

Atelier now supports net payment terms, allowing buyers to place orders on credit while operators can track unpaid orders and mark them paid later. Prepaid orders continue to use Stripe checkout.

Workflow

  • Define NET_TERMS enum in schemas.py
  • Render payment terms dropdown in checkout form
  • On form submit, create order as pending/unpaid
  • If net terms selected, update order to confirmed/unpaid and skip card collection
  • If prepaid selected, call stripe.checkout and redirect to hosted checkout
  • On return, retrieve Stripe session and set order pay_state to paid if session is complete
  • If Stripe service missing, mark order as paid with payment_provider='simulated'
  • Operator dashboard shows unpaid net‑term orders and allows marking them paid
  • Send order confirmation email on order creation
  • Provide curation panel for buyers to describe shop and use AI service

Evidence

NET_TERMS = ["Prepaid","Net 15","Net 30","Net 60"]

Source

On net terms the order is updated to confirmed and stays unpaid. No card is asked for.

Source

On Prepaid the code on main calls services.stripe.checkout with the order total and redirects to the hosted checkout URL

Source

  • Record date: 2026-10-14T15:41:10.202Z