POST /api/sandbox/loans/flow
POST/api/sandbox/loans/flow
Advances one step of the cabinet-compatible loan issuance flow. This is the main endpoint for integrations that want to reproduce the same journey users follow in the Fundora borrower dashboard.
Actions must be executed in strict order:
start_collateral_transfer- create an application draft, calculate loan parameters, and receive sandbox wallets.confirm_btc- confirm the test BTC collateral credit withtx_hashandconfirmations.run_kyt- simulate a KYT check.complete_payout- complete payout simulation and turn the application into an active loan.
You cannot execute a step too early. API returns 409 FLOW_CONFLICT when the state does not allow the requested action. To recover, call GET /api/sandbox/state and continue from the current step.
Response wallets are located at sandboxFlow.loanApplications[].wallets. They are deterministic test addresses: collateralDeposit for collateral, loanPayout for payout, and collateralReturn for future collateral return. Production transactions will be tracked from on-chain credits, but Sandbox does not require external chain polling: confirmation is simulated by the confirm_btc POST action.
POST requests must include Idempotency-Key so a retry does not create a second draft or duplicate a state transition.
Example:
curl https://partner.fundora.capital/api/sandbox/loans/flow \
-H "Authorization: Bearer sk_sandbox_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 0d66a118-e544-4a82-94de-35c9f28a0f38" \
-d '{"action":"start_collateral_transfer","collateral_btc":0.1,"loan_amount":3000,"loan_currency":"USDT","external_client_id":"client-42"}'
Request
Responses
- 200
- 400
- 401
- 404
- 409
- 429
Updated Sandbox loan state
Invalid request: invalid body, missing Idempotency-Key for POST, unknown action, or invalid amount
Sandbox API key is missing or invalid
Loan was not found
The flow cannot continue from the current state, a balance/limit is insufficient, or Idempotency-Key conflicts
Sandbox API rate limit exceeded