Skip to main content

Official Python SDK for the Paymos Merchant API

Project description

Paymos Python SDK

Official Python 3.10+ client for the Paymos Merchant API. It includes HMAC request signing, invoices, withdrawals, balances, bounded cursor iterators, structured errors, safe retries, and raw-body webhook verification.

pip install paymos-sdk
import os

from paymos import Paymos

paymos = Paymos(
    api_key=os.environ["PAYMOS_API_KEY"],
    api_secret=os.environ["PAYMOS_API_SECRET"],
)
invoice = paymos.invoices.create(
    project_id="prj_...", amount="10.00", currency="USD",
    external_order_id="order_123",
)

Use decimal strings for money. list() returns one cursor page; iterate() follows cursors lazily and stops after 100 pages by default.

for invoice in paymos.invoices.iterate(status=["paid", "paid_over"], max_pages=10):
    print(invoice["invoice_id"])

API failures raise typed subclasses of ApiError and preserve the HTTP status, problem details, field, error code, headers, and Retry-After value.

Verify webhooks against the exact raw request body before parsing it:

from paymos import WebhookVerifier

event = WebhookVerifier(os.environ["PAYMOS_WEBHOOK_SECRET"]).construct_event(
    request.headers["X-Webhook-Signature"], request.get_data()
)

Never use the API secret in browser or mobile code. Full documentation: https://paymos.io/docs/server-sdks

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

paymos_sdk-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

paymos_sdk-1.0.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file paymos_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: paymos_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for paymos_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dbb6998035869fa76e165b09f4ecbc18b1bfe684fd89d81c3139182e9c913afc
MD5 015c90a25df9c29433511b43bbd9f5bc
BLAKE2b-256 aac51893d09b5e3967f76ee7b6bd8e483564ab1b36e9c4788b6a20755188be03

See more details on using hashes here.

Provenance

The following attestation bundles were made for paymos_sdk-1.0.0.tar.gz:

Publisher: publish.yml on Paymos-labs/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paymos_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: paymos_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for paymos_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 279c29438aafd56df85c5e139cabc45aaabcab117edf330e55254b00d0224b2b
MD5 b3ec168af4841e4f4b5d392feac3aa73
BLAKE2b-256 bf91a6431a9db5c3bed85dfaf4e1cfcb3c89a0a1a841221df17059b2abdfc310

See more details on using hashes here.

Provenance

The following attestation bundles were made for paymos_sdk-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Paymos-labs/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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