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"
                }
            }
        

        Examples

        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');
        


        iDEAL

        # Create an iDEAL payment
        $buckaroo->payment('ideal') // Input the desire payment method.
            ->pay([
                'returnURL' => 'https://example.com/return', //Returns to this url aftere payment.
                'issuer'          => 'ABNANL2A' // Selected bank, 
                'amountDebit'   => 10, // The amount we want to charge
                'invoice'       => 'UNIQUE-INVOICE-NO', // Each payment must contain a unique invoice number
            ]);
        

        Credit Card

        # Create a credit card 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


        Was this article helpful?

        What's Next