Bleumi - Payment SDK for PHP
A simple and powerful REST API to integrate Traditional (Credit/Debit Card, Alternative Payment Methods) and Crypto Currency (Bitcoin, Ethereum, Stablecoins) payments into your business or application.
Getting Started
- Create an account on Bleumi
- Fill up your profile
- Complete your KYC by contacting support@bleumi.com
- Add your preferred payment service providers in the Bleumi Portal
- Create your API key on the Bleumi Integration Settings screen
Authentication
Bleumi uses API keys to authenticate requests. You can view and manage your API keys in the Bleumi Integration Settings screen.
Authenticated API requests should be made with a X-Api-Key
header. Your API key should be passed as the value.
Payment Methods
Use the Bleumi Portal to add your preferred payment service provider (e.g. Stripe, BitPay, Bleumi Pay) and configure the payment methods that buyers would be able to use to make payments.
For more information, please visit https://bleumi.com/contact.html.
Installation & Usage
Requirements
PHP 7.2 and later.
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"bleumi/payment-sdk-php": "1.0.0"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php
require_once('/path/to/payment-sdk-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
$config = Bleumi\Payment\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');
$apiInstance = new Bleumi\Payment\Api\CountriesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->listCountries();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CountriesApi->listCountries: ', $e->getMessage(), PHP_EOL;
}
API Endpoints
All URIs are relative to https://api.bleumi.io/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CountriesApi | listCountries | GET /data/countries | |
CurrenciesApi | listCurrencies | GET /data/currencies | |
PaymentRequestApi | getPayment | GET /payment/{id} | |
PaymentRequestApi | listPaymentReceipts | GET /payment/{id}/receipts | |
PaymentRequestApi | listPaymentRefunds | GET /payment/{id}/refunds | |
PaymentRequestsApi | createPaymentRequest | POST /payment | |
PaymentRequestsApi | listPaymentRequests | GET /payment | |
PaymentRequestsApi | updatePaymentRequest | PUT /payment | |
StatesApi | listStates | GET /data/states |
Models
- AddressInfo
- BadRequest
- Country
- CreatePaymentInput
- CreatePaymentInputMetadata
- Currency
- LineItem
- PaginatedPaymentRequest
- PaymentRequest
- PaymentUpsertResponse
- Receipt
- ReceiptMetadata
- Record
- RecordBasics
- RecordInput
- Refund
- UpdatePaymentInput
Authorization
Authorization
- Type: API key
- API key parameter name: X-Api-Key
- Location: HTTP header
Tests
To run the tests, use:
composer install
vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0
- Package version:
1.0.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen