Skip to main content

PeachPayments Partner Marshmallow Library

Overview

PeachPayments Partner Marshmallow Library is a platform-agnostic Python package to help Payment Service Providers in integrating with PeachPayments. This library provides functionality to validate request and response data using Marshmallow Python library.

Source Code: https://gitlab.com/peachpayments/peach-partner-marshmallow/


Key terms

Term Definition
Partner API A service provided by Peach Payments to enable Payment Service Providers to become available on the Peach Platform
Payment Service Provider A payment service provider who integrates with the Partner API
Outbound API call API calls sent from Partner API to the Payment Service Provider
Inbound API call API calls sent from Payment Service Provider to Partner API

Usage

Package requires Python 3.12+

Installation

# pip
$ pip3 install peachpayments-partner-marshmallow
# poetry
$ poetry add peachpayments-partner-marshmallow

Field validation

Payment Service Provider receives a debit request from PeachPayments.

# ... imports
from peachpayments_partner_marshmallow.validator import validate_debit_request, validate_debit_response


def debit(db: Session, data: dict):
    request_validation = validate_debit_request(data)
    if not request_validation["valid"]:
        raise HttpJSONError(request_validation["response"])

    # Store a transaction in a database
    # Prepare the response to PeachPayments in the `response_fields` dictionary

    response_validation = validate_debit_response(response_fields)
    if not response_validation["valid"]:
        raise Exception("Badly formatted response fields")

    return HttpResponse(response_fields)

Metadata

Release files for peachpayments-partner-marshmallow 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peachpayments-partner-marshmallow 2.1.0
File Size Uploaded Provenance Actions
peachpayments_partner_marshmallow-2.1.0.tar.gz 10.2 kB Without provenance Details for peachpayments_partner_marshmallow-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for peachpayments-partner-marshmallow 2.1.0
File Interpreter ABI Platform Actions
peachpayments_partner_marshmallow-2.1.0-py3-none-any.whl Python 3 none any Details for peachpayments_partner_marshmallow-2.1.0-py3-none-any.whl

Total release size: 21.9 kB

Release files / peachpayments_partner_marshmallow-2.1.0.tar.gz

Download URL peachpayments_partner_marshmallow-2.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
10c2346fa3587310cdaadbc3ad05928f4fe3bc2fee125a6bac049c4a42852aba
BLAKE2b-256 checksum
How to use checksums
ebb036b320d0ebfebfb05502abe195ed503ef13a7330603ff634090e995ef204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.15 Linux/6.8.0-1033-aws

Release files / peachpayments_partner_marshmallow-2.1.0-py3-none-any.whl

Download URL peachpayments_partner_marshmallow-2.1.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9f589007c2467ff9c72a2825a5a66a40710661754f31a9950a947b070c01af0
BLAKE2b-256 checksum
How to use checksums
496b2c8fc4eed25895e5c372c2034a3e2b521b02db81cc9760c45240fd3fc25e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.15 Linux/6.8.0-1033-aws

Security for peachpayments-partner-marshmallow 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page