Skip to main content

BlindPay Python SDK

chat on Discord twitter Version

The official Python SDK for BlindPay - Stablecoin API for global payments.

Installation

pip install blindpay

Requirements

  • Python 3.12 or higher

Error Handling

All API methods return a response dictionary with either data or error:

    blindpay = BlindPay(
        api_key="your_api_key_here",
        instance_id="your_instance_id_here"
    )

    response = await blindpay.customers.get("customer-id")

    if response['error']:
        print(f"Error: {response['error']['message']}")
        return

    customer = response['data']
    print(f"Customer: {customer}")

Webhooks

Verify every delivery against the raw request body, before parsing it. No client or API key is needed:

from blindpay import webhooks

# Flask: request.get_data(); FastAPI/Starlette: await request.body()
raw_body = request.get_data()

if not webhooks.verify(raw_body, request.headers, secret):  # secret: "whsec_..."
    abort(400)

verify checks the Svix v1 signatures in svix-signature and rejects timestamps more than 5 minutes from now (tolerance= changes that). Deduplicate deliveries on the svix-id header, and never log the secret.

Uploads

upload.create and upload.analyze send multipart/form-data. Pass bytes or a binary file object:

with open("proof_of_address.pdf", "rb") as f:
    response = await blindpay.upload.create({"bucket": "onboarding", "file": f})

file_url = response["data"]["file_url"]

The API checks the file's MIME type, which the SDK guesses from the filename (or the file's first bytes). Pass filename and content_type to set them explicitly.

Types

The SDK includes comprehensive type definitions for all API resources and parameters. These can be imported from the main package:

from blindpay import (
    AccountClass,
    BankAccountType,
    Country,
    Currency,
    CurrencyType,
    Network,
    Rail,
    StablecoinToken,
    TransactionDocumentType,
    TransactionStatus,
    PaginationParams,
    PaginationMetadata,
    # ... and more
)

Development

This SDK uses:

  • uv for package management
  • httpx for async HTTP requests
  • typing_extensions for typing

License

MIT

Support

For support, please contact alves@blindpay.com or visit blindpay

Metadata

Release files for blindpay 3.4.1

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

Source distribution (sdist)

Source distribution for blindpay 3.4.1
File Size Uploaded Provenance Actions
blindpay-3.4.1.tar.gz 30.8 kB Without provenance Details for blindpay-3.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blindpay 3.4.1
File Interpreter ABI Platform Actions
blindpay-3.4.1-py3-none-any.whl Python 3 none any Details for blindpay-3.4.1-py3-none-any.whl

Total release size: 79.2 kB

Release files / blindpay-3.4.1.tar.gz

Download URL blindpay-3.4.1.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3fe2c6d8c30e89077c2a1477b2dfb8cd1f8100be849d21bf23101c50a88e4722
BLAKE2b-256 checksum
How to use checksums
5674fb81eb2d04b26c147ca96b1f058d6505d45774f132416d717b9e69331e80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blindpay-3.4.1-py3-none-any.whl

Download URL blindpay-3.4.1-py3-none-any.whl
Size 48.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
544fd764cd97f85b7448ea4c61d72fb05d82f487ad8a9c1086e28cc22fe7598f
BLAKE2b-256 checksum
How to use checksums
fcc9e86dc1df8713135112d2fb30ecd839d809efc0d2ae0e67392753d6bbf2b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for blindpay 3.4.1

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