Download the PHP package chainberry/external-sdk-php without Composer

On this page you can find all versions of the php package chainberry/external-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package external-sdk-php

Chainberry SDK

For full details on how to use the ChainBerry SDK, check out the official documentation here: https://chainberry-docs.notaku.site. Please note that the docs are still a work in progress, and we're actively updating them - so feel free to reach out at [email protected] if something's missing or unclear!

Overview

This PHP SDK provides easy integration with the Chainberry API for deposits, crypto operations, and other API features. It includes both low-level API access and a high-level BerrySdk wrapper for simplified usage.

Features

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

Then run composer install

Manual Installation

Download the files and include autoload.php:

Quick Start with BerrySdk

Configuration

Environment Variables

Set the following environment variables:

Configuration Array

Alternatively, you can pass configuration directly:

Environment and API Version Matrix (V1 vs V2)

The SDK uses two separate configuration values:

Both values are combined to determine the base URL. The API version defaults to v1 if not specified.

Environment Constant API Version Base URL Typical use case
staging Environment::STAGING v1 https://api-stg.chainberry.com/api/v1 Legacy flows in staging
staging Environment::STAGING v2 https://api-stg.chainberry.com/api/v2 New V2 flows in staging
production Environment::PRODUCTION v1 https://api.chainberry.com/api/v1 Legacy flows in production
production Environment::PRODUCTION v2 https://api.chainberry.com/api/v2 New V2 flows in production
local Environment::LOCAL v1 http://192.168.0.226:3001/api/v1 Local V1 gateway
local Environment::LOCAL v2 http://192.168.0.226:3001/api/v2 Local V2 gateway

You can call both V1 and V2 helpers from the same process, but make sure the CB_API_VERSION (or $config['apiVersion']) matches the endpoints you want to invoke. Mixing V1 helpers with a V2 API version (or vice versa) will result in authentication failures.

Initialize the SDK (shared bootstrap)

V2 Quick Start Examples

Make sure CB_API_VERSION (or $config['apiVersion']) is set to v2 before calling the helpers in this section.

V1 Quick Start Examples (Legacy)

If you still rely on the original contracts, set CB_API_VERSION to v1 (or omit it, as v1 is the default).

Crypto Operations

Advanced Usage

Using the API Setup Directly

Using the Deposit Service

Using the Withdraw Service

Using the Checkout Service

Error Handling

Validation

Retry Logic

Logging

Low-Level API Usage

For direct API access without the BerrySdk wrapper, you can use the generated API classes directly:

API Endpoints

All URIs are relative to http://0.0.0.0:3001/api/v2

Class Method HTTP request Description
AssetApi assetV2ControllerGetSupportedAssetsV2 GET /asset
BroadcastApi broadcastV2ControllerAddBroadcastUrlV2 POST /broadcast Add a new broadcast webhook URL
BroadcastApi broadcastV2ControllerDeleteBroadcastUrlV2 DELETE /broadcast/{id} Delete a broadcast webhook URL
BroadcastApi broadcastV2ControllerGetAllBroadcastUrlsV2 GET /broadcast Get all broadcast webhook URLs
CheckoutsApi checkoutV2ControllerCreateCheckoutV2 POST /checkouts
CheckoutsApi checkoutV2ControllerGetCheckoutPaymentV2 GET /checkouts/payments/{paymentId}
CheckoutsApi checkoutV2ControllerGetCheckoutV2 GET /checkouts/{paymentId}
CheckoutsApi checkoutV2ControllerUpdateCheckoutV2 PATCH /checkouts
ConvertApi autoConversionV2ControllerAutoConversionV2 POST /convert
DepositAddressApi depositAddressControllerGetDepositAddressV2 POST /deposit-address
DepositsApi depositV2ControllerCreateDepositV2 POST /deposits
DepositsApi depositV2ControllerGetDepositPaymentV2 GET /deposits/payments/{paymentId}
DepositsApi depositV2ControllerGetDepositV2 GET /deposits/{paymentId}
KytApi kytV2ControllerFetchKytStatusesV2 POST /kyt/fetch-kyt-statuses
KytApi kytV2ControllerHandleMonitorNotificationV2 POST /kyt Process KYT monitor notification
OauthApi oAuthV2ControllerTokenV2 POST /oauth/token
PartnersApi partnerV2ControllerGetSettingsV2 GET /partners/settings/{partnerId}
PreWebhookApi preWebhookV2ControllerHandlePreWebhookV2 POST /pre-webhook Pre-process indexer webhook events
PublicKeyApi publicKeyV2ControllerDownloadPublicKeyV2 GET /public-key
QuicknodeApi quickNodeControllerSubscribeV2 POST /quicknode/subscribe
TestApi testV2ControllerInitParamsV2 POST /test/init-params Test the init params with JWT token and apiToken
TestApi testV2ControllerTestCallbackV2 POST /test/callback
TestDevApi devV2ControllerGetCurrentPartnerV2 GET /test/dev/partners/me
TestDevApi devV2ControllerTestJwtV2 GET /test/dev/jwt Test the API with JWT token
TestDevApi devV2ControllerTestSignatureGenerationV2 POST /test/dev/signature-generation Test the API with signature generation
TestDevApi devV2ControllerTestSignatureVerificationMiddlewareV2 POST /test/dev/signature-verification Test the API with signature verification middleware. Requires apiToken in body. ApiToken is partnerId
TestnetIndexerApi testnetIndexerControllerSubscribeV2 POST /testnet-indexer/subscribe
TransactionDetailApi transactionDetailControllerCreateV2 POST /transaction-detail
TransactionDetailApi transactionDetailControllerDeleteV2 DELETE /transaction-detail/{id}
TransactionDetailApi transactionDetailControllerFindAllV2 GET /transaction-detail
TransactionDetailApi transactionDetailControllerFindByHashV2 GET /transaction-detail/hash/{hash}
TransactionDetailApi transactionDetailControllerFindByIdV2 GET /transaction-detail/{id}
TransactionDetailApi transactionDetailControllerUpdateV2 PUT /transaction-detail/{id}
UiCustomizationApi uiCustomizationControllerGetCustomUiV2 GET /ui-customization/{paymentId}
WebhookApi webhookV2ControllerHandleWebhookV2 POST /webhook
WebhookApi webhookV2ControllerHandleWebhookV2V2 POST /webhook/v2
WithdrawApi withdrawV2ControllerCreateWithdrawV2 POST /withdraw
WithdrawApi withdrawV2ControllerGetWithdrawV2 GET /withdraw/{paymentId}

Models

Authorization

Authentication schemes defined for the API:

bearer

api-key

Tests

To run the tests, use:

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:


All versions of external-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chainberry/external-sdk-php contains the following files

Loading the files please wait ...