Quickstart

Prepare your first integration with Infrarails.

This guide introduces the steps required to begin working with Infrarails financial infrastructure.

Before sending API requests, ensure that your application has the necessary environment configuration and authorized access.

Prerequisites

Before starting, you should have:

  • Access to an Infrarails environment.
  • The appropriate API credentials.
  • The documented API base URL.
  • An application capable of making HTTPS requests.
  • A basic understanding of ledgers, accounts, and transactions.

Step 1 — Configure your environment

Keep API configuration separate from your application source code.

Example:

INFRARAILS_API_BASE_URL=<your-api-base-url>
INFRARAILS_API_KEY=<your-api-key>

These are illustrative environment variable names.

Use the actual values and credential format provided for your Infrarails environment.

Step 2 — Understand the resource model

Infrarails organizes financial data around four core resources.

ResourcePurpose
LedgerDefines an accounting environment
AccountRepresents a currency-specific financial balance
TransactionRepresents a financial operation
EntryRecords an individual accounting effect

A transaction belongs to a ledger and references the accounts affected by its entries.

Step 3 — Identify your ledger

Financial operations take place within a ledger.

Before working with accounts or transactions, identify the ledger associated with your application.

Ledger identifiers are important because they establish the context in which financial resources are managed.

Step 4 — Work with accounts

Accounts represent financial balances within the ledger.

When integrating account functionality, review:

  • Account identifiers.
  • Account currencies.
  • Currency exponents.
  • Available and pending balances.
  • Account status.
  • Related transaction activity.

Step 5 — Understand transactions

Transactions represent operations that affect financial records.

Infrarails supports the following ledger transaction types:

TypePurpose
TRANSFERMove value between ledger accounts
ISSUEIntroduce value into the ledger accounting model
RETIRERemove value from the ledger accounting model

Each transaction follows the supported accounting and lifecycle rules.

Step 6 — Handle transaction status

Transactions may exist in different states during their lifecycle.

Applications should not treat the creation of a transaction as confirmation that its accounting effects have been finalized.

Review the Transaction Lifecycle documentation before implementing financial workflows.

Step 7 — Prevent duplicate operations

For state-changing financial operations, use the supported idempotency mechanism.

A repeated request should not unintentionally produce a second financial movement.

Consult the API Reference for the applicable idempotency fields, scope, and duplicate-request behavior.

Step 8 — Validate your integration

Before using production infrastructure:

  1. Verify the correct environment and ledger.
  2. Validate account identifiers and currencies.
  3. Test supported transaction types.
  4. Review transaction lifecycle behavior.
  5. Confirm balance updates.
  6. Test duplicate-request handling.
  7. Verify error handling and reconciliation.

Next steps

Continue with Architecture to understand how InfraRails separates financial recordkeeping from external infrastructure integrations.

For executable requests and responses, use the InfraRails API Reference.


Did this page help you?