PHPackages                             bitvora/bitvora-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bitvora/bitvora-php

ActiveLibrary[API Development](/categories/api)

bitvora/bitvora-php
===================

A PHP SDK for the Bitvora API

1149PHP

Since Oct 17Pushed 1y agoCompare

[ Source](https://github.com/bitvora/bitvora-php)[ Packagist](https://packagist.org/packages/bitvora/bitvora-php)[ RSS](/packages/bitvora-bitvora-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bitvora PHP SDK
===============

[](#bitvora-php-sdk)

The Bitvora PHP SDK provides a simple way to interact with the Bitvora API for Bitcoin and Lightning transactions. This SDK supports functionality for handling transactions, deposits, withdrawals, and managing Lightning invoices and addresses.

Installation
------------

[](#installation)

You can install the SDK using Composer:

```
composer require bitvora/bitvora-php
```

Usage
-----

[](#usage)

To use the SDK, initialize the `BitvoraClient` with the appropriate API key and `Network` enum (`Network::MAINNET` or `Network::SIGNET`), and then call the methods available for each endpoint.

Available Methods and Getters
-----------------------------

[](#available-methods-and-getters)

### 1. Get Transactions

[](#1-get-transactions)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$transactionsResponse = $client->getTransactions();
$transactions = $transactionsResponse->all(); // Returns an array of TransactionResponse objects

foreach ($transactions as $transaction) {
    echo $transaction->getId();
    echo $transaction->getAmountSats();
    echo $transaction->getStatus();
    echo $transaction->getRailType();
}
```

### Available Getters for `TransactionResponse`:

[](#available-getters-for-transactionresponse)

```
$transaction->getId();
$transaction->getAmountSats();
$transaction->getRecipient();
$transaction->getStatus();
$transaction->getRailType();
$transaction->isSettled();
$transaction->isPending();
$transaction->isFailed();
$transaction->isPendingApproval();
$transaction->isRejected();
$transaction->isDeposit();
$transaction->isWithdrawal();
```

---

### 2. Get Withdrawal by ID

[](#2-get-withdrawal-by-id)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$withdrawalResponse = $client->getWithdrawal('withdrawal_id');
echo $withdrawalResponse->getId();
echo $withdrawalResponse->getAmountSats();
```

### Available Getters for `WithdrawalResponse`:

[](#available-getters-for-withdrawalresponse)

```
$withdrawal->getId();
$withdrawal->getAmountSats();
$withdrawal->getRecipient();
$withdrawal->getStatus();
$withdrawal->getRailType();
$withdrawal->isSettled();
$withdrawal->isPending();
$withdrawal->isFailed();
```

---

### 3. Get Deposit by ID

[](#3-get-deposit-by-id)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$depositResponse = $client->getDeposit('deposit_id');
echo $depositResponse->getId();
echo $depositResponse->getAmountSats();
```

### Available Getters for `DepositResponse`:

[](#available-getters-for-depositresponse)

```
$deposit->getId();
$deposit->getAmountSats();
$deposit->getRecipient();
$deposit->getStatus();
$deposit->getRailType();
$deposit->isSettled();
$deposit->isPending();
$deposit->isFailed();
```

---

### 4. Get Balance

[](#4-get-balance)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$balanceResponse = $client->getBalance();
echo $balanceResponse->getBalance();
```

### Available Getter for `BalanceResponse`:

[](#available-getter-for-balanceresponse)

```
$balanceResponse->getBalance(); // Returns the balance in satoshis.
```

---

### 5. Get Lightning Invoice by ID

[](#5-get-lightning-invoice-by-id)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$lightningInvoiceResponse = $client->getLightningInvoice('invoice_id');
echo $lightningInvoiceResponse->getPaymentRequest();
```

### Available Getters for `LightningInvoiceResponse`:

[](#available-getters-for-lightninginvoiceresponse)

```
$invoice->getId();
$invoice->getMemo();
$invoice->getAmountSats();
$invoice->getPaymentRequest();
$invoice->isSettled();
```

---

### 6. Estimate Withdrawal

[](#6-estimate-withdrawal)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Currency;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$estimateResponse = $client->estimateWithdrawal(1000, Currency::BTC(), 'destination_address');
echo $estimateResponse->getAmountSats();
echo $estimateResponse->getFeeSats();
```

### Available Getters for `EstimateWithdrawalResponse`:

[](#available-getters-for-estimatewithdrawalresponse)

```
$estimateResponse->getRecipient();
$estimateResponse->getAmountSats();
$estimateResponse->getFeeSats();
$estimateResponse->getSuccessProbability();
```

---

### 7. Create Lightning Invoice

[](#7-create-lightning-invoice)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Currency;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$invoiceResponse = $client->createLightningInvoice(1000, Currency::BTC(), 'Invoice for services', 3600);
echo $invoiceResponse->getPaymentRequest();
```

### Available Getters for `LightningInvoiceResponse`:

[](#available-getters-for-lightninginvoiceresponse-1)

```
$invoice->getId();
$invoice->getMemo();
$invoice->getAmountSats();
$invoice->getPaymentRequest();
$invoice->isSettled();
```

---

### 8. Create Lightning Address

[](#8-create-lightning-address)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$lightningAddressResponse = $client->createLightningAddress();
echo $lightningAddressResponse->getAddress();
```

### Available Getters for `CreateLightningAddressResponse`:

[](#available-getters-for-createlightningaddressresponse)

```
$lightningAddress->getId();
$lightningAddress->getHandle();
$lightningAddress->getDomain();
$lightningAddress->getAddress();
```

---

### 9. Create On-Chain Address

[](#9-create-on-chain-address)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$onChainAddressResponse = $client->createOnChainAddress();
echo $onChainAddressResponse->getAddress();
```

### Available Getters for `CreateOnChainAddressResponse`:

[](#available-getters-for-createonchainaddressresponse)

```
$onChainAddress->getId();
$onChainAddress->getAddress();
```

---

### 10. Confirm Withdrawal

[](#10-confirm-withdrawal)

```
use Bitvora\Client\BitvoraClient;
use Bitvora\Enum\Currency;
use Bitvora\Enum\Network;

$client = new BitvoraClient(Network::MAINNET, 'API_KEY');
$withdrawalResponse = $client->confirmWithdrawal(2100, Currency::SATS(), 'destination_address');
echo $withdrawalResponse->getId();
echo $withdrawalResponse->getStatus();
```

### Available Getters for `WithdrawalResponse`:

[](#available-getters-for-withdrawalresponse-1)

```
$withdrawal->getId();
$withdrawal->getAmountSats();
$withdrawal->getRecipient();
$withdrawal->getStatus();
$withdrawal->getRailType();
$withdrawal->isSettled();
$withdrawal->isPending();
$withdrawal->isFailed();
```

---

License
-------

[](#license)

This SDK is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/231e9917ef9deab64c45853b92ec9aa586faee9d72814e56f048348044101037?d=identicon)[bitvora](/maintainers/bitvora)

---

Top Contributors

[![barrydeen](https://avatars.githubusercontent.com/u/170961995?v=4)](https://github.com/barrydeen "barrydeen (3 commits)")

### Embed Badge

![Health badge](/badges/bitvora-bitvora-php/health.svg)

```
[![Health](https://phpackages.com/badges/bitvora-bitvora-php/health.svg)](https://phpackages.com/packages/bitvora-bitvora-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
