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.
| Resource | Purpose |
|---|---|
| Ledger | Defines an accounting environment |
| Account | Represents a currency-specific financial balance |
| Transaction | Represents a financial operation |
| Entry | Records 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:
| Type | Purpose |
|---|---|
| TRANSFER | Move value between ledger accounts |
| ISSUE | Introduce value into the ledger accounting model |
| RETIRE | Remove 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:
- Verify the correct environment and ledger.
- Validate account identifiers and currencies.
- Test supported transaction types.
- Review transaction lifecycle behavior.
- Confirm balance updates.
- Test duplicate-request handling.
- 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.
Updated about 1 hour ago