Payments Documentation


Transfers can either be:
  • - Single-Phase, where they are executed immediately or
  • - Two-Phase, where they are first put in a Pending state and then either Accepted or Rejected / Perfect primitive for atomic transfers across different systems.

Let`s enhance our Income Tracking recipe to use Two-Phase transfer by managing the inflight balance / Distinguish between inflight reserved amounts and accepted/commited amounts to control inflight liquidity.

For simplicity, we will exclude the Payment Provider Fees and Tax from this example.

Two-Phase Transfer is used to place the payment in a Pending state, ensuring that the transaction is only finalized once the payment provider confirms success.

Account CodeAccount NameAccount TypeDescription
4000Services RevenueIncomeRevenue from selling IT services.
4100Subscriptions RevenueIncomeRevenue from recurring software or service subscriptions.
1100Accounts Receivable – Client XAssetAmounts owed by Client X for provided services or subscriptions.
1000Cashe/BankAssetCash in hand or bank balances.
2100Deferred RevenueLiabilityRevenue received but not yet earned (prepayment).

Example Transaction Flow: Recording Services Revenue (Two-Phase)

Step 1: Issuing an Invoice for Services Rendered

Your IT consultancy completes a service for Client X and issues an invoice for $2,000.

AccountDebitCredit
Accounts Receivable – Client X (1100)$2,000
Services Revenue (4000)$2,000

Step 2: Receiving Payment for the Invoice (over Stripe payment provider)

2A - Client X initiates a payment of $2,000 via the Stripe payment provider. The payment is not yet finalized but is authorized and held by Stripe.

AccountDebit PendingDebitCredit PendingCredit
Cash/Bank (1000)$2,000
Accounts Receivable – Client X (1100)$2,000

2B - Once the payment is finalized and Stripe transfers the funds to your Cash/Bank account, the pending entry is cleared, and the funds become available.

AccountDebit PendingDebitCredit PendingCredit
Cash/Bank (1000)$2,000
Accounts Receivable – Client X (1100)$2,000

Summary of Payments and Two-Phase Transfers:

  • This approach leverages two-phase transfers to manage inflight balances, providing clear visibility into payments as they move from pending to final status, while keeping your accounting books accurate and synchronized with the payment provider's flow.