Buckaroo payment SDK

Maintainers

Package info

github.com/buckaroo-it/BuckarooSDK_PHP

pkg:composer/buckaroo/sdk

Transparency log

Statistics

Installs: 257 943

Dependents: 6

Suggesters: 0

Stars: 12

Open Issues: 1

1.24.3 2026-08-19 12:53 UTC

README

Buckaroo — PHP SDK

Buckaroo PHP SDK

Latest release PHP version License Documentation

About · Requirements · Installation · Getting started · Testing · Support · Contribute

About

Buckaroo is a Dutch Payment Service Provider. More than 54,000 organisations rely on the Buckaroo platform to process their payments, subscriptions and unpaid invoices.

This is Buckaroo's official PHP SDK: a modern, open source library that connects a PHP application to the Buckaroo API. It handles authentication, request signing and response parsing, so you can start a payment in a few lines.

If you run a shop on an e-commerce platform, use the ready-made plugin for Magento 2, Shopware 6, WooCommerce, PrestaShop or Odoo instead. For Laravel applications there is a dedicated Laravel wrapper built on this SDK.

Full API documentation on docs.buckaroo.io

Requirements

Requirement Supported versions
PHP 7.4 or higher
PHP extensions json, pcre, fileinfo
OpenSSL An up-to-date SSL/TLS toolkit

You also need a Buckaroo account. Don't have one yet? Request an account.

Installation

Install the SDK with Composer:

composer require buckaroo/sdk

Composer pulls in the SDK's own dependencies (Guzzle, Monolog, ramsey/uuid and composer/ca-bundle), so there is nothing else to set up.

Getting started

Configuring the client

You can find your Store key and Secret key under API credentials in Buckaroo Plaza. The third argument is the mode: test while developing, live in production. It defaults to test.

require __DIR__ . '/vendor/autoload.php';

$buckaroo = new \BuckarooClient('STORE_KEY', 'SECRET_KEY', 'test');

Tip

Keep your Secret key out of version control. Load both keys from environment variables instead — the repository ships an .env.example to start from.

Creating a payment

Every payment method takes a slightly different payload. This example charges a Visa card:

$response = $buckaroo->method('creditcard')
    ->pay([
        'name'        => 'visa',              // request to pay with Visa
        'amountDebit' => 10,                  // the amount to charge
        'invoice'     => 'UNIQUE-INVOICE-NO', // must be unique per payment
    ]);

Swap creditcard for any other service code to use a different payment method. Service codes and their parameters are listed in the API reference.

Retrieving transaction information

Once a transaction exists you can query it on demand:

$transaction = $buckaroo->transaction('YOUR-TRANSACTION-KEY');

$transaction->status();     // transaction status
$transaction->refundInfo(); // refund info
$transaction->cancelInfo(); // cancellation info

More runnable examples are in example/.

Testing

The repository defines Composer scripts for the test suites and code style:

composer test          # run the full suite
composer test:unit     # unit tests only
composer test:feature  # feature tests only
composer cs            # check code style
composer cs:fix        # fix code style

Feature tests talk to the Buckaroo test environment, so copy .env.example to .env and fill in your test credentials first.

Support

Having trouble? Work through this list before reaching out:

  1. Check the API reference for the service and action you are calling.
  2. Confirm you are on the latest release.
  3. Reproduce the issue in test mode and inspect the response, including the status subcode and message.
  4. Verify that your push URL is reachable from outside your network. Buckaroo sends push messages from fixed IP addresses and ports, so make sure these are on your allow list. See push messages for the current list.

Still stuck? Contact us and include your PHP version, SDK version, the service and action you called, the error message and the transaction key.

Contribute

We really appreciate it when developers help improve the Buckaroo SDKs. Please read our Contribution Guidelines before opening a pull request, and target the master branch.

Found a security issue? Please report it privately to support@buckaroo.nl instead of opening a public issue.

Versioning

We follow semantic versioning (MAJOR.MINOR.PATCH):

  • MAJOR — breaking changes that require additional testing and caution.
  • MINOR — new functionality with limited impact.
  • PATCH — bug fixes and hotfixes only.

All changes are documented in the changelog and on the releases page.

License

This SDK is open source software licensed under the MIT license.

Made with care by Buckaroo.
This document is subject to change; typos and language errors are possible.