Skip to main content

Python bindings for the Buckaroo API

Project description

Buckaroo Python SDK

Latest release


Index


About

Buckaroo is the Payment Service Provider for all your online payments with more than 30,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. Buckaroo developed their own Python SDK. The SDK is a modern, open-source Python library that makes it easy to integrate your Python application with Buckaroo's services. Start accepting payments today with Buckaroo.

Requirements

To use the Buckaroo API client, the following things are required:

  • A Buckaroo account (Dutch or English)
  • Python >= 3.9
  • Up-to-date OpenSSL (or other SSL/TLS toolkit)

Pip Installation

By far the easiest way to install the Buckaroo SDK is via pip.

$ pip install buckaroo-sdk

Then import the client in your project:

from buckaroo import BuckarooClient

Example

Create and configure the Buckaroo client. You can find your credentials in Buckaroo Plaza.

from buckaroo import BuckarooClient
from buckaroo.services.payment_service import PaymentService

# Get your store & secret key in your plaza.
# mode="test" routes calls to the test environment; use "live" for production.
client = BuckarooClient("STORE_KEY", "SECRET_KEY", mode="test")
payments = PaymentService(client)

Create a payment with any of the available payment methods. In this example, we show how to create a credit card payment. Each payment has a slightly different payload.

# Create a new payment
response = (
    payments.create_payment("creditcard", {
        "currency": "EUR",
        "amount": 10.00,                       # The amount we want to charge
        "invoice": "UNIQUE-INVOICE-NO",        # Each payment must contain a unique invoice number
        "service_parameters": {"brand": "visa"},  # Request to pay with Visa
    })
    .description("Order #UNIQUE-INVOICE-NO")
    .pay()
)

# Inspect the response from Buckaroo
if response.is_successful():
    print("transaction id:", response.get_transaction_id())
    print("redirect:", response.get_redirect_url())
else:
    print("status message:", response.get_message())

You can also use the fluent interface directly:

response = (
    payments.create_payment("creditcard")
        .currency("EUR")
        .amount(10.00)
        .invoice("UNIQUE-INVOICE-NO")
        .pay()
)

Find our full documentation online on docs.buckaroo.io.

Contribute

We really appreciate it when developers contribute to improve the Buckaroo plugins. If you want to contribute as well, then please follow our Contribution Guidelines.

Versioning

  • MAJOR: Breaking changes that require additional testing/caution
  • MINOR: Changes that should not have a big impact
  • PATCHES: Bug and hotfixes only

Additional information

License

Buckaroo Python SDK is open-sourced software licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buckaroo_sdk-0.1.1.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buckaroo_sdk-0.1.1-py3-none-any.whl (88.1 kB view details)

Uploaded Python 3

File details

Details for the file buckaroo_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: buckaroo_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for buckaroo_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e69ff86c7dec97cf0f5c4c3a6d9831cd0876a3e02e1b2c642b9c38338c0209f7
MD5 abd7820b7fc79b137d64cc8cd99950cb
BLAKE2b-256 5248729936d1e33c8d4443544171bcac62bc4a392f1f5f2c9483bc761452ce0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for buckaroo_sdk-0.1.1.tar.gz:

Publisher: publish.yml on buckaroo-it/BuckarooSDK_Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file buckaroo_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: buckaroo_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 88.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for buckaroo_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c8d4546d85751c68c7d613462dc7708f3c31d97e07246204fca3ad8574f363f
MD5 981615b5fc51752f85e4ca6626987c91
BLAKE2b-256 cf2c95bc677b795ee87a8b37cff353d723ca3798489b2d827334e8abb7b2ca4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for buckaroo_sdk-0.1.1-py3-none-any.whl:

Publisher: publish.yml on buckaroo-it/BuckarooSDK_Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page