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.0.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.0.0
File Size Uploaded Provenance Actions
peachpayments_partner_marshmallow-2.0.0.tar.gz 10.2 kB Without provenance Details for peachpayments_partner_marshmallow-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 22.0 kB

Release files / peachpayments_partner_marshmallow-2.0.0.tar.gz

Download URL peachpayments_partner_marshmallow-2.0.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74d9771048fea24cb88b4f75748b66b4cc7eb935f26e78e6283c58bc0fca45f7
BLAKE2b-256 checksum
How to use checksums
ba899f511023d077fb0f6ac260f36f37d91971374c08652f9665296ee84d3f11
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.0.0-py3-none-any.whl

Download URL peachpayments_partner_marshmallow-2.0.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
603c4707973d2a14e1e0dbaee0874a484bfefbd9d8594288e4734b40d1be984d
BLAKE2b-256 checksum
How to use checksums
dc59b10d9172e4b0f64505f09f796bc5a478e6cd4330bd9bd4e1cfbe6a3eca10
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.0.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