This guide demonstrates practical implementation patterns for payment acceptance operations using Formance Ledger. Whether you’re building a wallet top-up system, marketplace, or payment platform, these patterns help you manage real-time card authorizations and asynchronous settlement.
What is Payment Acceptance?
Payment acceptance is the process of receiving payments from customers, particularly through card payments. As a merchant or acceptor, you integrate with payment service providers (PSPs) to enable customers to pay with their cards.Payment Flow Overview
1
Payment Initiation
Customer initiates a payment for a defined amount in a specific currency using their card as the payment instrument.Integration Types:
- Hosted Payment Page (HPP): PSP-hosted checkout page
- Tokenization: Securely store card details for future use
- API Integration: Direct API calls for recurring or one-click payments
2
Authorization
The card issuer approves the transaction and agrees to eventually pay your acquirer. This creates a real-time promise that you can rely on for immediate user experience.Authorization Types:
- CiT (Cardholder-initiated Transaction): Customer actively participates
- MiT (Merchant-initiated Transaction): Automated charges using stored cards
3
Capture (Optional)
Request the issuer to finalize the payment. Capture can be:
- Automatic: PSP captures at end of day
- Explicit: You control when to capture
- Partial: Capture less than authorized amount
- Multiple: Capture in installments (for some card schemes)
4
Settlement
The acquirer settles funds to your bank account, typically T+1 to T+3 days after authorization.
Focus: Wallet Top-Up Use Case
This guide focuses on a straightforward wallet top-up scenario where customers add funds to their account balance. Key characteristics:- Immediate Availability: Funds are available to the customer as soon as the card is authorized
- Acquirer Promise: Authorization is treated as an asset—a binding promise from the acquirer
- Automatic Capture: All authorizations are considered captured for immediate booking
- Asynchronous Settlement: Bank settlement occurs days later, requiring careful tracking
Implementation Guide
This section demonstrates how to model payment acceptance operations in Formance Ledger for wallet top-ups.System Actors
- Acquirers
- Banks
- End Users (Clients)
- Platform
Normal Debit Accounts - Hold real-time payment promises.Financial institutions providing merchant services, including:
- Card transaction underwriting and risk management
- Real-time authorization processing
- Bulk settlement (gross or net of fees)
- Currency conversion services
Similar to Omnibus accounts, but the acquirer holds a real-time payment promise rather than settled funds.
Balances & Periods
A balance of an asset in an account is the result of the sum of all incoming volumes subtracted by the sum of all outgoing volumes. Here we will have to deal with a real-time aspect we want to handle in order to have the best user experience, where the end user has immediately their balance/top-up amounts at their disposal, even if the amount are net yet settled into your accounts. As you base yourself on binding technical payment signals (aut+capture), the settlement arrives at a later data and clears the amounts due by the acquirer. Handling both of these aspects in the Formance Ledger will allow you to have an instant and clear view of where the assets are, and how they are moving around.Transaction Patterns
Below are example Numscripts that capture the intent of the movements and bookings needed to handle payment acceptance flows. This is merely an example and your business might need different implementations, additional details, different steps and events to handle, etc…Download the T-Account Movements Excel Template to visualize all accounting entries with detailed T-account diagrams for each payment acceptance flow described in this guide.
Card Authorization - Gross Top-Up
When a card authorization is successful and captured, you make the full gross amount immediately available to the end user. The acquirer has provided a real-time promise to settle, which you treat in the ledger as an amount that the acquirer owes you in a normal debit account.Variables
- $asset (asset): asset in UMN
- $amount (number): Transaction amount (gross)
- $acquirer_id (account): Acquirer account identifier
- $client_id (account): Client account identifier
- $platform_name (account): Platform account identifier
- $authorization_id (string): Unique authorization reference
Accounts Used
- @acquirers:$acquirer_id:main : Account holding the acquirer promise (normal debit)
- @clients:$client_id:main : Client wallet account (normal credit - liability)
- @platform:$platform_name:fees : Platform expense account for fees paid
Numscript
Example Usage
EUR card top-up authorization - Try in Playground →Acquirer Settlement to Bank
When the acquirer settles funds to your bank account (typically in bulk, daily or weekly), they settle the net amount after deducting their fees. You receive the net settlement in your bank account and need to cover the fees from your platform account to balance the acquirer account.Variables
- $asset (asset): asset in UMN
- $net_amount (number): Net settlement amount received in bank
- $fee_amount (number): Fee amount deducted by acquirer
- $acquirer_id (account): Acquirer account identifier
- $bank_number (account): Bank account identifier
- $platform_name (account): Platform account identifier
- $settlement_ref (string): Settlement reference from acquirer
Accounts Used
- @acquirers:$acquirer_id:main : Acquirer account (normal debit)
- @banks:$bank_number:main : Bank account (normal debit)
- @platform:$platform_name:fees : Platform expense account for fees
Numscript
Example Usage
EUR settlement from Stripe to bank - Try in Playground →Card Refund
When processing a refund for a previously captured card payment, you reverse the original booking flow.Variables
- $asset (asset): asset in UMN
- $amount (number): Refund amount
- $fee_refund (number): Fee refund amount (if applicable)
- $acquirer_id (account): Acquirer account identifier
- $client_id (account): Client account identifier
- $platform_name (account): Platform account identifier
- $refund_id (string): Unique refund reference
- $original_authorization_id (string): Reference to original authorization
Accounts Used
- @acquirers:$acquirer_id:main : Acquirer account
- @clients:$client_id:main : Client wallet account
- @platform:$platform_name:fees : Platform fee account
Numscript
Example Usage
EUR card refund - Try in Playground →Chargeback
When a chargeback occurs, the acquirer debits your account and you must debit the client’s account.Variables
- $asset (asset): asset in UMN
- $amount (number): Chargeback amount
- $chargeback_fee (number): Chargeback fee charged by acquirer
- $acquirer_id (account): Acquirer account identifier
- $client_id (account): Client account identifier
- $platform_name (account): Platform account identifier
- $chargeback_id (string): Unique chargeback reference
- $original_authorization_id (string): Reference to original authorization
Accounts Used
- @acquirers:$acquirer_id:main : Acquirer account
- @clients:$client_id:main : Client wallet account
- @platform:$platform_name:chargeback_fees : Platform expense for chargeback fees
Numscript
Example Usage
USD chargeback with fee - Try in Playground →Key Differences from Omnibus Accounts
Payment acceptance builds on omnibus account patterns but introduces unique real-time characteristics:- Timing & Availability
- Asset Flow
- Fee Management
- Dispute Handling
Payment Acceptance:
- Funds available immediately upon authorization
- Based on acquirer’s real-time promise
- Customer can spend before settlement
- Funds available upon bank settlement
- Based on confirmed wire transfer
- Settlement-driven availability
Advanced Ledger Features
Bi-temporality
Track authorization time vs. settlement time for accurate historical reconstruction.
Metadata
Store authorization IDs, PSP references, and dispute information for comprehensive audit trails.
Multi-Asset Support
Handle multiple currencies across different acquirers without code changes.
Event Publishing
Stream payment events to trigger notifications and integrations.