Business trade finance: credit line applications, trade creation, payback plans, and document management.
Flow
- Apply for a trade credit line (manually processed by Solaris)
- Attach supporting documents to the application
- Once approved, create individual trades against the credit line
- Attach invoice and supporting documents to each trade
- Add payback plan to trade → triggers payout and sets repayment dates
- Attach the business's account to the trade credit line
Webhook
Monitor TRADE_FINANCE_APPLICATION and TRADE_FINANCE_TRADE webhooks
for status changes.
Summary
Functions
Attaches a business bank account to the trade credit line.
Attaches pre-uploaded documents to a trade finance application.
Attaches an invoice or supporting documents to a trade.
Applies for a trade finance credit line for a business.
Creates a trade against the business's approved credit line.
Retrieves a trade finance application.
Retrieves a specific trade.
Lists all trades for a business.
Adds a payback plan to a trade.
Functions
@spec attach_account(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Attaches a business bank account to the trade credit line.
Must be done before trades can be created.
@spec attach_application_document(String.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Attaches pre-uploaded documents to a trade finance application.
@spec attach_trade_document(String.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Attaches an invoice or supporting documents to a trade.
@spec create_application(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Applies for a trade finance credit line for a business.
Applications are manually reviewed by Solaris.
Examples
{:ok, application} = Solaris.Lending.TradeFinance.create_application("cbac_123", %{
requested_credit_limit: 100_000_00,
currency: "EUR",
purpose: "SUPPLIER_FINANCING"
})
@spec create_trade(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Creates a trade against the business's approved credit line.
Requires pre-uploaded documents.
Examples
{:ok, trade} = Solaris.Lending.TradeFinance.create_trade("cbac_123", %{
amount: 25_000_00,
currency: "EUR",
supplier_name: "Supplier AG",
invoice_number: "INV-2024-001"
})
@spec get_application(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Retrieves a trade finance application.
@spec get_trade(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Retrieves a specific trade.
@spec list_trades( String.t(), keyword() ) :: {:ok, [map()]} | {:error, Solaris.Error.t()}
Lists all trades for a business.
@spec set_payback_plan(String.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}
Adds a payback plan to a trade.
Setting the payback plan triggers payout to the supplier and establishes repayment dates. This is the final step before disbursement.
Examples
{:ok, trade} = Solaris.Lending.TradeFinance.set_payback_plan("cbac_123", "ctrd_456", %{
repayment_date: "2024-03-01",
disbursement_date: "2024-01-15"
})