Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferror/payments
https://github.com/ferror/payments
fintech php
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ferror/payments
- Owner: Ferror
- Created: 2021-07-25T12:19:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T18:12:45.000Z (about 2 years ago)
- Last Synced: 2024-12-12T12:44:28.890Z (12 days ago)
- Topics: fintech, php
- Language: PHP
- Homepage:
- Size: 198 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Payments Domain
The aggregate of Payments Bounded Context should be Payment entity
## Payment Types
### Recurring Payments (aka. Subscription)### One Time Payments
## Discounts
Mostly each system allows user to assign only one discount per payment. Same thing happens in real life,
where the promotions do not sum. That's because of the logic problem - how should the discount apply.Let's say we have 100 dollars item and add 10% discount, then we apply another 10% discount.
Should discounts sum (20%) or run two multiplications ((100 * 0.1) * 0.1).
The logic problem does not apply to the fixed discounts, but it will expand your discount logic.* Percentage Discount
* Fixed Value Discount## Money vs Price
Money is an aggregate of some sort of value with currency and taxes like 100$ + 23% vat tax
Price is an aggregate of value in currency like 100$
## Payment vs Transaction
Customer <-> Payment <-> Customer
* Payment
* Customer
* Invoice
* Discount# API Flow
Client (Mobile or Frontend App) Authenticates user and gets access to the identifier - then has access to the API.
* /customers/{id}
* /payments
* /payment-requests
* /billing-addresses
* /products
* /discounts
* /invoices