BOOK A DEMO

Selling

Orders, Payments & Fees

Capture the outcome of a sale as an order, apply configured fees, issue invoices, and record payment.

After an item is won (or sold directly), Basta can capture the outcome as an order, apply your configured fees, issue an invoice, and record payment. This page gives a high-level overview of those concepts and the operations available through the Management API.

All monetary amounts are in minor currency units (e.g. cents for USD). For example, 1000 = $10.00.

The order lifecycle

Text
DRAFT ──▶ OPEN ──▶ INVOICE_ISSUED ──▶ PAID
                └──▶ CANCELLED
StatusMeaning
DRAFTOrder is being assembled
OPENOrder has been placed / published
INVOICE_ISSUEDAn invoice has been issued to the buyer
PAIDThe order has been paid
CANCELLEDThe order was cancelled

An order belongs to a buyer and references the sale and item it came from. It is made up of one or more order lines — each line has an amount, a description, and any associated fees.

Common operations

OperationPurpose
createOrderCreate an order
updateOrderUpdate an order
cancelPaymentOrderCancel an order
publishPaymentOrderPublish an order
createOrderLine / updateOrderLine / deleteOrderLineManage line items
createInvoiceIssue an invoice for an order
createPaymentRecord a payment against an order
orders / userOrdersList orders for an account or a user

Example: fetch orders

GraphQL
query Orders {
  orders(accountId: "ACCOUNT_ID", first: 20) {
    edges {
      node {
        id
        title
        currency
        status
        orderLines {
          orderLineId
          amount
          description
          fees { name amount }
        }
        invoice { invoiceId dueDate url }
      }
    }
  }
}

Fees

Fees let you add charges such as a buyer's premium on top of the hammer price, or seller-side charges. Fees are defined as rules and applied automatically when orders are created.

Fee rule anatomy

FieldDescription
nameLabel shown on the order/invoice
typePERCENTAGE or AMOUNT
value500 = 5% (percentage) or 1000 = $10 (amount)
lowerLimit / upperLteLimitThe amount bracket this rule applies to
calculationTypeFLAT (rate applied to the whole amount) or PROGRESSIVE (rate applied only to the portion within each bracket)

Cascading levels

Fee rules cascade across three levels — the most specific level wins:

Text
Account defaults  ──▶  Sale overrides  ──▶  Item overrides
LevelSet withApplies to
AccountcreateAccountFeeDefault for every sale on the account
SalecreateSaleFeeA specific sale (overrides account)
ItemcreateSaleItemFeeA specific item (overrides sale)

When you query effective fees, each rule reports its source (ACCOUNT, SALE, or ITEM) so you can see where it came from. Use resetSaleFees to discard sale-level customizations and fall back to account defaults.

Example: account-level buyer's premium

GraphQL
mutation CreateBuyersPremium {
  createAccountFee(accountId: "ACCOUNT_ID", input: {
    name: "Buyer's Premium"
    type: PERCENTAGE
    value: 2000        # 20%
    lowerLimit: 0
  }) {
    id
    name
    type
    value
  }
}

Payments

Basta integrates with a payment provider to collect funds and manage buyer payment methods. Where a provider session is needed (for example, to render a secure payment UI), the API issues short-lived provider session credentials rather than exposing sensitive details to the browser. Buyers can also be surfaced their saved payment methods and a default selection.

The specifics of payment collection depend on your account's configuration — contact us to enable and configure payments for your account.

Staying in sync

Order changes emit webhook events:

  • OrderCreated
  • OrderUpdated
  • OrderCancelled

See Webhooks for payloads and Managing Webhooks to subscribe.

Related documentation

Questions about orders, fees, or payments? Contact us at hi@basta.app.