Skip to main content

openhub-bo-payouts

Pagos a terceros desde tu cuenta en Red Enlace (ATC) OpenHub, Bolivia:

  • Pagar QR interoperables (ATC.API.PAYOUT.SYNC 3): leer → pagar → consultar.
  • Lotes de transferencias ACH (ATC.API.PAYOUT.ASYNC) con notificación por webhook.

⚠️ Mueven dinero real en producción. Pruébalo primero con MockPayouts y el sandbox.

pip install openhub-bo[payouts]

Pagar un QR

from openhub_bo.core import Session, AmbiguousOutcomeError
from openhub_bo.payouts import PayoutsClient

with Session("CLIENT_ID", "CLIENT_SECRET") as session:
    payouts = PayoutsClient(session)
    scanned = payouts.scan_qr(qr_text)  # texto del QR (lo que devuelve un lector), no la imagen
    print(scanned.recipient.holder, scanned.amount)  # muéstralo antes de pagar
    try:
        payout = payouts.pay_qr(
            scanned,
            source_account="7010123451",
            transaction_id="PAY-1042",
            amount=None if not scanned.open_amount else "100.50",  # solo para QR sin monto
            description=None if scanned.description else "Pago proveedor",
        )
    except AmbiguousOutcomeError:
        ...  # códigos 94/96 o respuesta perdida: consulta get_payout antes de reintentar

Reglas de la documentación aplicadas por la librería: con un QR de monto fijo se envía 0.00; la glosa solo va si el QR no la trae. Timeouts recomendados por ATC: 40 s para leer y 90 s para pagar y consultar (se aplican solos).

Lotes ACH

from openhub_bo.payouts import BatchTransfer, parse_batch_webhook

auth = payouts.authorize_batch(
    "455544",  # branchCode (código de comercio)
    [
        BatchTransfer(
            "001002",
            "50.00",
            "484811311404044",
            "1311404044",
            "1018",
            "LPZ",
            "Pago proveedor",
            "5452452",
            "PROVEEDOR SRL",
        )
    ],
    webhook_url="https://mitienda.bo/webhooks/ach",
    webhook_token="<token-largo-aleatorio>",
)
auth.rejected  # transferencias rechazadas al autorizar
payouts.get_batch_status("455544", auth.process_id, batch_number=auth.batch_number)
payouts.list_banks("455544")

# En tu endpoint (ATC llama a webhook_url?token=...):
n = parse_batch_webhook(request.query_params["token"], await request.body(), expected_token=TOKEN)
return JSONResponse(n.ack())  # o n.ack(processed=False, detail="...")

Según ATC, el webhook de lotes requiere coordinación previa con su área de Infraestructura y Redes.

Verificado en el sandbox: lectura de QR (con un QR propio), lista de bancos, errores y métodos HTTP. Confirmar pagos y autorizar lotes siguen la documentación (no se ejecutaron contra el sandbox).

Metadata

Release files for openhub-bo-payouts 0.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 openhub-bo-payouts 0.1.0
File Size Uploaded
openhub_bo_payouts-0.1.0.tar.gz 59.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for openhub-bo-payouts 0.1.0
File
openhub_bo_payouts-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
openhub_bo_payouts-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 4.0 MB

Release files / openhub_bo_payouts-0.1.0.tar.gz

Download URL openhub_bo_payouts-0.1.0.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bda219a0dedc1f7dad7b97234d597de5594539178ebc3bd72e539ba4d7a0a57e
BLAKE2b-256 checksum
How to use checksums
1871aa443591a97656bc04f830ab5504321e5f5b3441453901bfbd3e2857cf2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-win_amd64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-win_amd64.whl
Size 409.0 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d29413d0a051d2d7899f28cc6519dffd7ea24701c8a1480d73231d5c9884f08c
BLAKE2b-256 checksum
How to use checksums
7b0a4704e60dccb07fc4d40c47ac34fa867c58996831b6c5f161ed09a5abad92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 761.2 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
2fd8603689fb4f166b9a624dc92e1c7af8fda99406a0b3d234ef32d7d531cf09
BLAKE2b-256 checksum
How to use checksums
8d8411a75b214b3fc5cc1fd2d39a0d0f252282133a6847ca54bb08f777a6401a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 720.2 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
6265cabc03cdf324ae1811ccca6263ae60a00708c3c367d711b6f39887880103
BLAKE2b-256 checksum
How to use checksums
b56c28235b2416fce0913fa576b8c1db34149742ae8cb3943903c0080346211e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 550.9 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
897a4a96f5472741fe84943b3cffba3b4b90c855e0d65a3ac63e418629c7c284
BLAKE2b-256 checksum
How to use checksums
a65a14c223cea58a8b671a4ffeae5e685fb09160efb5a6a16d1222694d063fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 548.3 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
81a01968f79c92326b63c177e0814cb9949bc24a262bfe85100bc54c2fb9081d
BLAKE2b-256 checksum
How to use checksums
6ec5e572b9f541774de283531121bdae88b8b6ed3a43b76a6b2e927aa06e8e6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 495.0 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
836780ea115c9fe27e959dbb369533c567332d512602435ad86e996dfd418048
BLAKE2b-256 checksum
How to use checksums
ac56565f2ea7dd82042c252d79f7c33e5365eb288e98e3985be9933d3c9f6055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / openhub_bo_payouts-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL openhub_bo_payouts-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 503.8 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
639d4cb35608dba6585519992b18f5dc764f2a996bcffc094ce4e13a93e85e0b
BLAKE2b-256 checksum
How to use checksums
1203276b70eb9c1a502397b145b02086175bd495592d8c9df09be9afdd04fd04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

8 release files

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