Skip to main content

PHP SDK

This page has all the information needed to install and setup the BLOOCK's SDK for PHP. If you are looking for documentation related to an specific functionality, please refer to it's specific section.

Requirements

To run the SDK for PHP you will need:

  • PHP version >= 7.4
  • PHP's FFI extension enabled
tip

Please refer also to OS support for current operating system requirements

Installation

The PHP SDK is available through Packagist, to install it, you can run the following command:

composer require bloock/sdk

Set up

To start working with most of the functionalities of our SDKs, you will need an API Key. Please, follow the instructions of Create an API Key to get one.

Here's the code needed to properly configure the SDK with the API Key:

<?php

require "./vendor/autoload.php";

use Bloock\Bloock;

Bloock::$apiKey = getenv("API_KEY") ?: "";