File size: 2,897 Bytes
64fb1e7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Transaction status constants β single source of truth for all status strings.
# Used in wavvy_tools.py (status pre-checks), seed.py (test data), and
# workflow/definitions.py (routing keys).
# ββ Terminal / final states βββββββββββββββββββββββββββββββββββββββββββββββββββ
FAILED = "failed" # deducted but not credited β refund eligible
COMPLETED = "completed" # successfully settled β disputes-team path
CANCELLED = "cancelled" # cancelled before settlement β auto-reversal
EXPIRED = "expired" # payment link/session timed out
# ββ In-flight states ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PENDING = "pending" # submitted to gateway, awaiting confirmation
PROCESSING = "processing" # gateway accepted, settlement in progress
# ββ Refund lifecycle ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
REFUND_INITIATED = "refund_initiated" # refund case opened
REFUND_PROCESSING = "refund_processing" # refund debit instruction sent to bank
REFUND_COMPLETED = "refund_completed" # funds credited back to customer
# ββ Hold / review states ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FLAGGED = "flagged" # fraud-flagged β fraud-team path
KYC_HOLD = "kyc_hold" # KYC verification pending β kyc-team path
COMPLIANCE_HOLD = "compliance_hold" # regulatory / AML hold β compliance-team path
# ββ Dispute / chargeback lifecycle ββββββββββββββββββββββββββββββββββββββββββββ
DISPUTED = "disputed" # customer filed a dispute
CHARGEBACK_INITIATED = "chargeback_initiated" # chargeback raised with bank/card network
CHARGEBACK_WON = "chargeback_won" # chargeback resolved in customer's favour
CHARGEBACK_LOST = "chargeback_lost" # chargeback denied
# ββ Fraud states ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FRAUD_REPORTED = "fraud_reported" # customer reported unauthorized transaction
FRAUD_CONFIRMED = "fraud_confirmed" # fraud team confirmed the fraud
FRAUD_REVERSED = "fraud_reversed" # fraudulent charge reversed
|