Skip to main content

Transaction Flow Strategy

The TransactionFlowStrategyEnum defines how Saleor requests the initial payment action:

  • AUTHORIZATION: hold funds first; capture later.
  • CHARGE: capture funds immediately.
info

This strategy applies only to payment apps.

It does not affect manual transactions created with transactionCreate or updated via transactionUpdate.
For manual transactions, you explicitly define the amounts and events yourself.

Event Flows by Strategy​

  • Authorization flow
  • Charge flow

Business Advantages​

Choosing the right transaction flow strategy is a crucial business decision. The best choice depends on your product, business model, and fulfillment process.

When to use AUTHORIZATION​

  • Inventory or stock-sensitive products: Ensure items are available before capturing funds.
  • Fraud or risk checks: Hold the payment while verifying order details.
  • Partial fulfillment: Capture only the portion shipped if the full order can’t be fulfilled.
  • Customer-friendly preorders/backorders: Customers aren’t fully charged until the product is delivered.

When to use CHARGE​

  • Instant delivery products: Digital goods, subscriptions, or services delivered on purchase.
  • Fast-moving, low-risk retail: Simplifies operations by charging right away.
  • High-volume sales: Reduces operational overhead from tracking pending authorizations.
  • Cash flow needs: Immediate settlement improves liquidity.

Configuration​

You can set the strategy per channel as the default or override it per payment during transaction initialization.

Channel Default​

  • Dashboard: Go to Configuration β†’ Channels β†’ <your_channel> β†’ Payment settings, then change Authorize transactions instead of charging.

  • API: Use the channelUpdate mutation and set the paymentSettings.defaultTransactionFlowStrategy field.

App Override​

  • When initializing a transaction, pass the action argument to transactionInitialize.
  • If action is not provided, Saleor falls back to the channel’s paymentSettings.defaultTransactionFlowStrategy.

Actions on Transactions​

All actions on a transaction can be performed via the Saleor Dashboard or API.

Performing Actions​

  • Dashboard:
    Go to Order details β†’ Transactions, then choose Charge, Cancel, or Refund, whichever is available and appropriate.

  • API:
    Use transactionRequestAction with the corresponding action parameter (CHARGE, CANCEL, REFUND).

Action Behavior​

  • Charged transactions β†’ Can be refunded directly.
  • Authorized transactions β†’ Can be:
    • Cancelled β†’ Funds are released without charging.
    • Captured (charged) first β†’ Then optionally refunded.

Authorization Expirations​

  • Authorizations are temporary and typically expire according to payment provider and card network rules (often 7–30 days).
  • Expiration happens on the provider side; when an authorization expires, funds are automatically released.
  • To continue processing, you must re-authorize the transaction.
  • Track events in your payment app and report them to Saleor using transactionEventReport as needed.