The boundary belongs in the client
Request construction and response interpretation belong in the integration layer. Application-specific billing, orders, and database decisions stay in the application using it.
Developer tooling / Python packages
The shamcash and PySyriatel packages turn payment integration workflows into reusable Python clients.
Repeating provider request code across projects makes every integration responsible for the same authentication, response parsing, and errors. A shared client gives those concerns one place to live.
I packaged the integrations with reusable clients, models, and exceptions, so backend projects can focus on their own workflow. The public packages can be installed with pip install shamcash and pip install PySyriatel.
Request construction and response interpretation belong in the integration layer. Application-specific billing, orders, and database decisions stay in the application using it.
A reusable client needs to distinguish provider and transport failures so the caller can decide whether to retry, ask for authentication, or stop the operation.