This section walks you through setting up BerrySDK in just a few simple steps.
⚠️ Before initialising the BerrySDK, please finish the Partner Onboarding.
🆕 Newest BerrySDK version is v2.0.3
How to initialize the BerrySDK?
Step 01 - Install BerrySDK
bash> composer require chainberry/external-sdk-php
Step 02 - Initialize BerrySDK
php$config = [ 'clientId' => CB_API_CLIENT_ID, 'clientSecret' => CB_API_CLIENT_SECRET, 'privateKey' => CB_API_PRIVATE_KEY, 'environment' => CB_API_ENVIRONMENT, 'apiVersion' => CB_API_VERSION ]; BerrySdk::init($config);
Parameters
Parameter | Required | Type | Default | Description |
clientId | true | string | undefined | API Token for accessing CB API |
clientSecret | true | string | undefined | Client Secret received from CB dev team during the Onboarding process |
privateKey | true | string | undefined | The partner private key generated during the Onboarding process |
environment | false | string | staging | staging or production |
apiVersion | false | string | v1 | v1 or v2 |
Errors
Private Key is missing. |
Client Secret is missing. |
API Token is missing. |
Environment is invalid. Should be SANDBOX or PRODUCTION |
Cannot find a partner with the submitted Private Key, Client Secret and API Token. |
Let the transactions roll 🚀
With your setup complete and access granted, you can now start creating deposits, initiating withdrawals, and enabling conversions using BerrySDK. Use simple method calls to connect your app to the ChainBerry infrastructure and start moving funds with full control and real-time tracking.