lsparagino/bridgesdk

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/lsparagino/bridgesdk

dev-main 2026-01-30 22:53 UTC

This package is not auto-updated.

Last update: 2026-01-31 21:21:21 UTC


README

Developer-friendly & type-safe Php SDK specifically catered to leverage Bridge API.

Built by Speakeasy License: MIT

Summary

Bridge API: APIs to move into, out of, and between any form of a dollar

Table of Contents

SDK Installation

Tip

To finish publishing your SDK you must run your first generation action.

The SDK relies on Composer to manage its dependencies.

To install the SDK first add the below to your composer.json file:

{
    "repositories": [
        {
            "type": "github",
            "url": "<UNSET>.git"
        }
    ],
    "require": {
        "rethink/bridgesdk": "*"
    }
}

Then run the following command:

composer update

SDK Example Usage

Example

declare(strict_types=1);

require 'vendor/autoload.php';

use ReThink\BridgeSDK;

$sdk = BridgeSDK\BridgeSDK::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->bridgeWallets->list(

);

if ($response->bridgeWalletsList !== null) {
    // handle response
}

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
apiKey apiKey API key

To authenticate with the API the apiKey parameter must be set when initializing the SDK. For example:

declare(strict_types=1);

require 'vendor/autoload.php';

use ReThink\BridgeSDK;

$sdk = BridgeSDK\BridgeSDK::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->bridgeWallets->list(

);

if ($response->bridgeWalletsList !== null) {
    // handle response
}

Available Resources and Operations

Available methods

AssociatedPersons

  • get - Get a single associated person (Beta)
  • delete - Delete a single associated person
  • update - Update a single associated person

BatchSettlements

  • create - Create a Batch Settlement Schedule

BridgeWallets

Cards

CryptoReturnPolicies

  • getAll - Get all crypto return policies
  • create - Create a new crypto return policy
  • delete - Delete a single crypto return policy object
  • update - Update an existing crypto return policy

Customers

Developers

ExchangeRates

  • get - Get current exchange rate between two currencies.

ExternalAccounts

  • listForCustomer - Get all External Accounts
  • get - Retrieve an External Account object
  • list - Get all External Accounts
  • create - Create a new External Account
  • update - Update an External Account
  • delete - Delete a single External Account object
  • reactivate - Reactivate an External Account

FiatPayoutConfigurations

  • get - Get the fiat payout configuration for a customer
  • update - Update the fiat payout configuration for a customer

FundsRequests

  • list - Get all funds requests

KycLinks

  • generate - Generate the Links needs to complete KYC for an individual or business
  • list - Get all KYC links.
  • getById - Check the status of a KYC link

LiquidationAddresses

  • create - Create a Liquidation Address
  • list - Get all Liquidation Addresses
  • getById - Get a Liquidation Address
  • update - Update a Liquidation Address
  • getDrains - Get drain history of a Liquidation Address
  • getBalance - Get the balance of a Liquidation Address (deprecated) ⚠️ Deprecated
  • allDrains - Liquidation Address Activity Across All Customers
  • listForCustomer - Get all Liquidation Addresses for a customer

Lists

Plaid

PrefundedAccounts

  • list - Get a list of all Prefunded Account
  • get - Get details for a specific Prefunded Account
  • getHistory - Get funding history of a Prefunded Account

Rewards

  • getRates - Get the current reward rates
  • summary - Get a summary of all rewards for a given stablecoin
  • currencyRates - Get the currency reward rates for a given stablecoin
  • getSummary - Get a summary of a customer's rewards
  • getCustomerHistory - Get a history of a customer's rewards

StaticMemos

Transfers

VirtualAccounts

Webhooks

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a Errors\APIException exception, which has the following properties:

Property Type Description
$message string The error message
$statusCode int The HTTP status code
$rawResponse ?\Psr\Http\Message\ResponseInterface The raw HTTP response
$body string The response content

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the list method throws the following exceptions:

Error Type Status Code Content Type
Errors\Error 400, 401, 404 application/json
Errors\Error 500 application/json
Errors\APIException 4XX, 5XX */*

Example

declare(strict_types=1);

require 'vendor/autoload.php';

use ReThink\BridgeSDK;
use ReThink\BridgeSDK\Models\Errors;

$sdk = BridgeSDK\BridgeSDK::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();

try {
    $response = $sdk->bridgeWallets->list(

    );

    if ($response->bridgeWalletsList !== null) {
        // handle response
    }
} catch (Errors\ErrorThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\ErrorThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\APIException $e) {
    // handle default exception
    throw $e;
}

Server Selection

Override Server URL Per-Client

The default server can be overridden globally using the setServerUrl(string $serverUrl) builder method when initializing the SDK client instance. For example:

declare(strict_types=1);

require 'vendor/autoload.php';

use ReThink\BridgeSDK;

$sdk = BridgeSDK\BridgeSDK::builder()
    ->setServerURL('https://api.bridge.xyz/v0')
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->bridgeWallets->list(

);

if ($response->bridgeWalletsList !== null) {
    // handle response
}

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

SDK Created by Speakeasy