Payment Service
Functional Requirements
Non Functional Requirements
The UI
User Flow
User Personas
Schema
Transaction
Column | Type | Description |
---|---|---|
checkout_id | int | unique checkout |
psp_token | str | payment service provider token. Generated when you register (Paypal or Stripe) |
amount | str | amount of transaction |
currency | str | USD,CAD,etc |
status | str | pending,completed,failed |
The Process
UML Sequence Diagram
Business Rules
- Every purchase page will have a uniquely generated checkout_id and corresponding token generated by the PSP
- Always send PSP generated token to PSP fo every request when a buyer clicks "Buy Now" twice.
- You should never use floating point numbers for money. Use BigDecimal instead.
System Design
System Design
Sequence Diagram
Technical Specifications Documentation
- If we use card schemes over using a payment service provider (payment gateway), we will need to comply with PCI DSS, PSD2, KYC, AML and other compliance standards and regulations to protect against identity theft. The process is different for every country. Using PSP spares us from storing card data.
- Protocols, Signatures, PCI DSS, MFA, Tokenization, Databases
- Authorization
- Customer makes an online purchase by filling out credit card information
- Merchant website receives information and sends to PSP
- PSP routes information to a processor
- Issuing bank sends authorization or declination to processor
- Processor routes transaction results to PSP
- PSP sends results o merchant
- Merchant decides to accept or reject purchase
- Settlement
- Merchant informs payment processing service to settle transactions
- PSP sends transaction info to processor
- Processor checks the information and forwards settled transaction information to issuing bank
- Issuing Bank transfers funds to processor
- Processor routes funds to acquiring bank
- Acquiring bank credits merchants bank account
- Issuing Bank includes merchants charge on customers credit card account.
Resources
- Payment Service System Design
- Why it can be so hard
- Intro to Payment Systems
- Microbilt
- Stripe API
- API3
- VAPI
- EPX
- Trustly
Terms
Credit decisioning refers to the process of assessing the creditworthiness of a borrower or applicant in order to determine the level of risk involved in lending money or extending credit.
ACH stands for Automated Clearing House , a network that allows for electronic funds transfers (EFTs) between banks and credit unions. ACH transactions require a debit from one bank and a credit to another.