PHP SDK

      PHP SDK


        Article Summary

        About

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

        PHP_SDK_Example

        Requirements

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

        • A Buckaroo account (Dutch or English)
        • PHP 7.4 or higher
        • Up-to-date OpenSSL (or other SSL/TLS toolkit)

        GitHub repository

        Click here to view the PHP SDK on the Buckaroo Github repository.

        Composer Installation

        By far the easiest way to install the Buckaroo API client is to require it with Composer.

        $ composer require buckaroo/sdk:^1.0
        
        {
            "require": {
                "buckaroo/sdk": "^1.0"
            }
        }
        

        Example

        Create and config the Buckaroo object.

        require __DIR__ . '/vendor/autoload.php';
        
        # Get your website & secret key in your plaza.
        $buckaroo = new \Buckaroo\BuckarooClient('WEBSITE_KEY', 'SECRET_KEY');
        

        Create a payment with all 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
        $buckaroo->payment('creditcard') // Input the desire payment method.
            ->pay([
                'name'          => 'visa' // Request to pay with Visa
                'amountDebit'   => 10, // The amount we want to charge
                'invoice'       => 'UNIQUE-INVOICE-NO', // Each payment must contain a unique invoice number
            ]);
        

        Need more examples?

        More examples can be found on our GitHub page in the "examples" folder.



        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

        Please contact Buckaroo support if you have any technical questions.  
        E-mail: support@buckaroo.nl

        Our telephone number and contact details of other departments can be found in the Buckaroo Payment Plaza under "Contact details" at the bottom left of the screen.


        Was this article helpful?

        What's Next