Skip to main content

Framework-agnostic payment processing core.

Project description

getpaid-core

PyPI Python Version License

Framework-agnostic payment processing library for Python. Provides the core abstractions — enums, protocols, FSM, processor base class, plugin registry, and exception hierarchy — that framework-specific adapters build on.

Architecture

getpaid-core defines the what of payment processing without coupling to any web framework:

  • Enums (PaymentStatus, FraudStatus, BackendMethod, ConfirmationMethod) define all valid states and methods.
  • Protocols (Payment, Order, PaymentRepository) define structural contracts that framework models must satisfy.
  • FSM (create_payment_machine, create_fraud_machine) attaches state-machine triggers to payment objects at runtime using the transitions library.
  • BaseProcessor is an abstract class that payment gateway plugins subclass to implement prepare_transaction, handle_callback, charge, etc.
  • PluginRegistry discovers and stores payment backend processors via entry points or manual registration.
  • Exceptions provide a structured hierarchy for payment errors.

Framework Adapters

Installation

pip install python-getpaid-core

You typically install this as a dependency of a framework adapter rather than directly.

Quick Example

from getpaid_core.enums import PaymentStatus
from getpaid_core.fsm import create_payment_machine

# Any object satisfying the Payment protocol works
payment = MyPayment(status=PaymentStatus.NEW, amount_required=100)
machine = create_payment_machine(payment)

# FSM trigger methods are attached directly to the object
payment.confirm_prepared()
assert payment.status == PaymentStatus.PREPARED

Requirements

  • Python 3.12+
  • transitions
  • httpx
  • anyio

License

MIT

Disclaimer

This project has nothing in common with the getpaid plone project.

Credits

Created by Dominik Kozaczko.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_getpaid_core-0.1.0.tar.gz (106.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_getpaid_core-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file python_getpaid_core-0.1.0.tar.gz.

File metadata

  • Download URL: python_getpaid_core-0.1.0.tar.gz
  • Upload date:
  • Size: 106.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_getpaid_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80d58dd584e1e52ab3e6d25e71bc02b85ebb4914d0bb804ac382e7365eefa72d
MD5 17272fc18090bec0c36f1cbf8359a11d
BLAKE2b-256 4b241b640b2b8f4b96534316f25ff4b68c692bd704fb4dd802306dd1de32419a

See more details on using hashes here.

File details

Details for the file python_getpaid_core-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_getpaid_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_getpaid_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22ef7adda468591dab23982d0fe9082bb1e7554813254df44c8e49eb1dfd9231
MD5 ef9d84f7d6b677438418d3d4e550a7d3
BLAKE2b-256 d4490d8d95c630ca03f31b50ce37ec2a9f56b166fbb641a1bbfb0816aa6cea9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page