The official Xendit PHP SDK provides a simple and convenient way to call Xendit's REST API in applications written in PHP.
- Package version: 6.0.0
PHP 7.4 and later.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/xendit/xendit-php.git"
}
],
"require": {
"xendit/xendit-php": "6.0.0"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
The SDK needs to be instantiated using your secret API key obtained from the Xendit Dashboard. You can sign up for a free Dashboard account here.
use Xendit\Configuration;
Configuration::setXenditKey('XENDIT_API_KEY');
Find detailed API information and examples for each of our product’s by clicking the links below,
All URIs are relative to https://api.xendit.co. For more information about our API, please refer to https://developers.xendit.co/.
Further Reading