Payment Processing

End-to-end flow showing how a customer payment is processed, from initiation through authorization, capture, and recording in the ledger

Payment Processing Flow

This flow documents the complete journey of a customer payment through our system, from initial submission to final recording in the general ledger.

Flow Overview

The payment processing flow handles the critical path of accepting money from customers. It involves multiple services working together to ensure secure, reliable payment processing.

Key Steps

  1. Initiation: Customer submits payment information
  2. Authorization: Payment method is validated and funds are reserved
  3. Capture: Funds are actually charged from the payment method
  4. Recording: Transaction is recorded in the general ledger
  5. Notification: Customer and relevant systems are notified

Success Criteria

  • Payment is authorized by the payment gateway
  • Funds are successfully captured
  • Journal entry is recorded in the ledger
  • Invoice status is updated (if applicable)

Failure Scenarios

If payment fails at any stage:

  • Customer is notified with a clear error message
  • Failed payment attempt is logged
  • Retry logic may be triggered for retryable failures
  • Invoice remains in “Pending Payment” status

Performance Requirements

  • Authorization Time: < 2 seconds (p95)
  • End-to-End Time: < 5 seconds (p95)
  • Success Rate: > 98%
  • Invoice to Payment Flow
  • Refund Processing Flow