{"id":18056268,"url":"https://github.com/ferror/payments","last_synced_at":"2025-04-05T09:44:50.540Z","repository":{"id":45399480,"uuid":"389340698","full_name":"Ferror/payments","owner":"Ferror","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-22T18:12:45.000Z","size":203,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T09:05:19.876Z","etag":null,"topics":["fintech","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ferror.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-25T12:19:55.000Z","updated_at":"2023-01-11T23:14:01.000Z","dependencies_parsed_at":"2023-01-30T16:00:47.070Z","dependency_job_id":null,"html_url":"https://github.com/Ferror/payments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferror%2Fpayments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferror%2Fpayments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferror%2Fpayments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferror%2Fpayments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ferror","download_url":"https://codeload.github.com/Ferror/payments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318721,"owners_count":20919483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fintech","php"],"created_at":"2024-10-31T01:14:30.929Z","updated_at":"2025-04-05T09:44:50.510Z","avatar_url":"https://github.com/Ferror.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payments Domain\n\nThe aggregate of Payments Bounded Context should be Payment entity \n\n## Payment Types\n### Recurring Payments (aka. Subscription)\n\n### One Time Payments\n\n## Discounts\n\nMostly each system allows user to assign only one discount per payment. Same thing happens in real life,\nwhere the promotions do not sum. That's because of the logic problem - how should the discount apply.\n\nLet's say we have 100 dollars item and add 10% discount, then we apply another 10% discount.\nShould discounts sum (20%) or run two multiplications ((100 * 0.1) * 0.1).\nThe logic problem does not apply to the fixed discounts, but it will expand your discount logic.\n\n* Percentage Discount\n* Fixed Value Discount\n\n## Money vs Price\n\nMoney is an aggregate of some sort of value with currency and taxes like 100$ + 23% vat tax\n\nPrice is an aggregate of value in currency like 100$\n\n## Payment vs Transaction\n\nCustomer \u003c-\u003e Payment \u003c-\u003e Customer\n\n* Payment\n* Customer\n* Invoice\n* Discount\n\n# API Flow\n\nClient (Mobile or Frontend App) Authenticates user and gets access to the identifier - then has access to the API.\n\n* /customers/{id}\n  * /payments\n  * /payment-requests\n  * /billing-addresses\n  * /products\n  * /discounts\n  * /invoices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferror%2Fpayments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferror%2Fpayments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferror%2Fpayments/lists"}