BTC-ARK as the payment method ID. Transactions also carry a few extra fields. Use them to connect to accounting tools and match Bark transactions to BTCPay invoice payments.
The endpoints appear in your server’s API documentation, at /docs on your BTCPay Server, under Store Wallet (Ark).
BTCPay’s on-chain wallet endpoints don’t list Bark’s transactions. BTCPay’s Lightning API lists only Lightning invoices and payments. For the wallet’s full history, use
GET /api/v1/stores/{storeId}/payment-methods/BTC-ARK/wallet/transactions.Create an API key
Generate an API key with the View wallets permission (btcpay.store.canviewwallet) for the store, on your account’s API Keys page in BTCPay.
List the transactions
Each transaction looks like this one, an Ark payment to an invoice:
Read the fields
Failed or canceled payments, sent or received, are listed only when they still moved bitcoin, with their real amount. Their
status doesn’t show that they failed or were canceled. The Bark wallet page lists every failed or canceled payment.
Transaction types
Each type is a value of thekind field. The Type column of the Bark Wallet report shows the same types under display names.
Identify a transaction
Useid to store transactions in your own system and to recognize the ones you’ve already seen. It’s unique within the store, including when a wallet is re-created and Bark numbers its payments from 1 again.
Store a transaction only once it’s Confirmed. After that, its id and amount stay the same. Only its labels and confirmations can still change.
If you restore the wallet from its recovery phrase, Bark doesn’t bring back its transaction history. Ark and Lightning transactions from before the restore drop out of the list. The bitcoin that the restore recovers appears in no transaction, so
balance leaves it out. Some transactions can come back with a different id. Match those to the ones you stored by outpoint or transactionHash.If you re-created or restored the wallet before plugin 0.11.0, store labels from before then can still show on unrelated transactions.Match transactions to invoice payments
BTCPay gives each payment on an invoice a payment ID. Match it to transactions as follows:- Ark payments: BTCPay records one payment per received VTXO, with the ID
txid-vout. Replace the hyphen with a colon and match the result tooutpoint. The amounts are equal. Don’t match ontransactionHash, which several transactions can share. - Lightning payments: The payment ID is the payment hash, so match it to
paymentHash. BTCPay’s payment amount is what the customer paid, which is the transaction’samountplus itsfee.
{invoiceId}#ark-movement-{movementId}-{index}: Ark payments to invoices created before plugin 0.10.0, and the rare payment that the plugin can’t split by VTXO.{invoiceId}#ark-movement-{movementId}: Ark payments recorded by plugin 0.7.0 or earlier.
movementId whose invoice label ref is the invoice ID. Their amounts add up to the payment. If one movement paid several invoices, its transactions carry no invoice label.
Get the wallet balance
balanceis the sum of every transaction’samount, in BTC, across your off-chain balance and the Bark on-chain wallet. It leaves out the bitcoin that a restore from the recovery phrase brings back.confirmedBalanceadds up theConfirmedtransactions, the part of the balance that can no longer change.unconfirmedBalanceadds up theUnconfirmedtransactions. It’s negative while more is pending out than in, for example a fee during a refresh.labelis always empty.
- Lightning payment in flight: The endpoint already counts it as spent.
- Unconfirmed exit claim: The Bark wallet page counts the claimed bitcoin twice, as a pending exit and as pending on-chain bitcoin. The endpoint counts it once.
- Offboard or on-chain send in progress: Until Bark records the payment, the Bark wallet page leaves out the VTXOs it spends. The endpoint still counts them.
- After a restore from the recovery phrase: The endpoint leaves out the bitcoin that the restore brought back.
Use BTCPay’s Lightning API
When Bark runs your store’s Lightning (see Lightning settings), BTCPay’s own Lightning API works with the Bark wallet. Its endpoints appear in the API documentation under Lightning (Store). Four of them read and pay through Bark:
Both lists come oldest first, at most 100 items per call.
offsetIndex skips that many items, counted after filtering, so to read the next page, add the number of items you received. An invoice expires when its BOLT11 does, and the Ark server sets that expiry, whatever expiry was requested. Once Bark cancels an unpaid invoice, it forgets it, so the invoice drops out of the list.
To pay an invoice, send its BOLT11:
sendTimeout you pass in seconds (up to 10 minutes), the request answers 202 Accepted with the status Pending. Check it later with GET .../lightning/BTC/payments/{paymentHash}: a payment that can’t reach its recipient can take a few minutes to fail. Paying an invoice the wallet already paid returns that payment rather than paying it again.
Creating and reading single invoices and reading the Lightning balance work too. Node information, channels, and deposit addresses don’t apply to Bark, so those endpoints answer
503.Errors
These are the errors of the two Store Wallet (Ark) endpoints.Payment method ID migration
Bark’s payment method ID isBTC-ARK, alongside BTCPay’s own BTC-CHAIN and BTC-LN. Before plugin 0.10.0 it was BARK. Invoices created before the upgrade keep BARK and still settle, so a tool that reads payment method IDs from invoices, payments, or webhooks sees both.