Use the blnk transactions command to create and manage transactions in your Blnk server.

Ensure that your Blnk server is running and connected to the CLI to use this command.

1. Create new transaction

To create a new transaction:

Shell
blnk transactions create
Output
? Amount: <amount>
? Precision: <precision>
? Reference: <reference>
? Description: <description>
? Currency: <currency>
? Source: <source>
? Destination: <destination>
? Allow overdraft: (y/n)
? Inflight: (y/n)
? Metadata (JSON format): <metadata>
FieldDescription
<amount>The transaction amount.
<precision>Precision for the currency/asset passed. See also: Precision.
<reference>Your unique reference to ensure idempotency.
<description>The unique id of the ledger that this balance belongs to.
<currency>Short code for your asset class. See also: Asset classes.
<source>Sender’s balance ID.
<destination>Recipient’s balance ID.
<allow overdraft>”y” if you want to enable overdraft, “n” if otherwise.
<inflight>”y” if you want to enable inflight, “n” if otherwise.
<metadata>Custom info written in JSON format . If you have no metadata, you can leave it blank like this: {}

A new transaction record is now created and added to your ledger.

For creating more complex transactions, please use the API.

2. View transactions

To view all of the transactions in your server:

Shell
blnk transactions list

3. Search transactions

Search is used to query and find data in your Blnk server. To search your transactions with the Blnk CLI, you can use the following options with the blnk transactions list command.

OptionsDescription
-p or --page <number>Page number (default: “1”)
--per-page <number>Results per page (default: “10”)
-s or --search <term>What you are searching for (default: ”*“)
-q or --query-by <fields>Fields to query your search term by (default: “reference, source, destination”)

For example, the command below displays your latest 50 transactions instead of the default 10.

Shell
blnk transactions list --per-page 50

Read our Search docs to learn more about Search.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.

To ask questions or discuss issues, please contact us or join our Discord community.

Get access to Blnk Cloud.

Manage your Blnk Ledger and explore advanced features (access control & collaboration, anomaly detection, secure storage & file management, etc.) in one dashboard.