Skip to main content

AbacatePay SDK

PyPI Version PyPI Downloads

A Python SDK to simplify interactions with the AbacatePay API.
This SDK provides tools for billing management, customer handling, and more.

English | Português


Table of Contents


Installation

Using pip

pip install abacatepay

Using Poetry

poetry add abacatepay

Getting Started

To use the SDK, import it and initialize the client with your API key:

import abacatepay

client = abacatepay.AbacatePay("<your-api-key>")

Usage Examples

Create a Billing

from abacatepay.products import Product


products = [
    Product(
        external_id="123",
        name="Test Product",
        quantity=1,
        price=50_00,
        description="Example product"
    ),
    # or as dict
    {
        'external_id': "321",
        'name': "Product as dict",
        'quantity': 1,
        'price': 10_00,
        'description': "Example using dict"
    }
]

billing = client.billing.create(
    products=products,
    return_url="https://yourwebsite.com/return",
    completion_url="https://yourwebsite.com/complete"
)

print(billing.data.url)

List All Billings

billings = client.billing.list()
for billing in billings:
    print(billing.id, billing.status)

print(len(billings))

Customer Management

from abacatepay.customers import CustomerMetadata

customer = CustomerMetadata(  # Its can also be only a dict
    email="customer@example.com",
    name="Customer Name",
    cellphone="(12) 3456-7890",
    tax_id="123-456-789-10"
)

created_customer = client.customers.create(customer)
print(created_customer.id)

Contributing

We welcome contributions to the AbacatePay SDK! To get started, please follow the steps in our Contributing Guide.

Metadata

Release files for abacatepay 1.0.9

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

Source distribution (sdist)

Source distribution for abacatepay 1.0.9
File Size Uploaded Provenance
abacatepay-1.0.9.tar.gz 11.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 28.5 kB

Release files / abacatepay-1.0.9.tar.gz

Download URL abacatepay-1.0.9.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f6732f8bfdd6a905eedcee0125f6f0a803ab076bcc56162862f87ff2c5d38559
BLAKE2b-256 checksum
How to use checksums
8b40fa43d027f10b3f73a356aaf205ea4a87589c8958fcd91b9f1a156c405359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / abacatepay-1.0.9-py3-none-any.whl

Download URL abacatepay-1.0.9-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dba09ff3286ad659aeef46170499e61b0f473d3a892365dfe12dc8a072e4706b
BLAKE2b-256 checksum
How to use checksums
e011a6e5938e4f91f057d7a211e18c21a9d6cd983e20092f274980d793b5c9d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for abacatepay 1.0.9

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.

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