BorrouPartner APISandboxDraft

Draft documentation for partners integrating against the sandbox. It can change before /v1 is published; the contract, openapi.yaml, is the reference.

Overview / Guides / Reference

Changelog

v0.2 draftChanges to the API, newest first.

Unreleased

/v1 is a draft, shared with the partners integrating against the sandbox; until it is published the contract is openapi.yaml as it stands. Each entry is dated with the day it landed in the draft.

  • A sandbox simulator for the repayment (additive, proposed, may change, 2026-11-13). POST /v1/sandbox/loans/{reference}/repayment makes the full amount the repayment instructions quote arrive at the simulated custodian and answers the transfer's hash, with steps saying how far it went. On Borrou's sandbox the two simulated TFG users then enter and confirm the repayment, one each, and advance on the repaid loan plays its collateral's return, so a sandbox loan can be taken to CLOSED. advance on an active loan that is not repaid answers 409 sandbox_step_unavailable naming the repayment simulator. info.version is 0.13.0-draft. What to do: nothing.
  • Code samples on the portal; references opaque; error responses declared (additive, 2026-10-28). Where Borrou publishes its documentation, GET /snippets lists the TypeScript, Python and Java snippets and the test vectors, and GET /snippets/{dir}/{file} serves each as it is. An external_reference or a borrower.reference that is an IP address is now 400 invalid_request, like a partner_session_ref (none may be an email: @ was never allowed). Every response declares X-Request-Id, every operation a 500 internal_error, the ten operations without one have a description, and the reference names no internal decision, file path or setting. Every answer carries X-Robots-Tag: noindex. info.version is 0.12.0-draft. What to do: nothing, unless you put an IP address in a reference.
  • interest.accrual spelled like accrual_basis (changes the draft, 2026-10-28). On products, quotes and loans interest.accrual is now DAILY_ACT_360 or SECOND_ACT_360, the values accrual_basis already carries, instead of DAILY_ACTUAL_360 and SECOND_ACTUAL_360. A change of value is allowed only because /v1 is not published yet. info.version is 0.11.0-draft. What to do: compare interest.accrual with the new values, or read accrual_basis.
  • The contract and the guides agree (fix, 2026-10-28). The contract describes the sandbox's simulated payout approvals as they are; a bullet loan's schedule and its maturity; every payout and return as going to the borrower's wallet at the custodian or to your settlement account there; and names only events you can receive. Its shared error responses no longer list every code of the API: each operation's description names its own. Idempotent-Replayed and the webhook headers Borrou-Event-Type, Borrou-Delivery-Id and Borrou-Delivery-Attempt are declared; the reference shows the fields of objects written inline (borrower.full_name); GET /openapi.yaml answers a browser in plain text. The guides recommend one subscription (with application.submitted, loan.created and loan.cancelled), list every operation under its scope, give the lifecycle row of a bullet loan and of the return after a full repayment, and state the token lifetime's range (60 to 3,600 seconds). Entries here are dated. What to do: add the three events to your subscription if you followed the guide's earlier list; nothing else.
  • The contract document repaired (fix, 2026-10-28). In 24 places a description written inside braces was cut at its first comma, and the rest became an extra property with no value (in 15 schemas and a webhook's response); and the webhook catalogue marked its minimum set with properties OpenAPI 3.1 does not allow beside a $ref. Both are fixed: the descriptions read whole, the minimum set is each webhook's summary (Minimum set), its note its description, and the document validates as OpenAPI 3.1. info.version is 0.10.1-draft. What to do: regenerate any client you generated from openapi.yaml; its types lose properties that were never real.
  • The developer portal (additive; proposed, may change, 2026-10-27). Where Borrou publishes its documentation, GET / is a landing page, GET /guides/{slug} serves each guide as a page (the new integration guide, the quick-starts, the integration rules, the error codes, address verification, the sandbox, versioning and this changelog), GET /llms.txt indexes them for coding agents, and GET /docs sits in the same frame. No authentication, no script, nothing loaded from elsewhere, not indexed by search engines; elsewhere every page answers 404 not_found. Integration guide is the new place to start. What to do: nothing.
  • The quick-start collection with a one-time-code product (fix, 2026-10-27). Run whole with the credential of a partner whose contract is accepted with a one-time code, the collection used to fail at the signing-link steps. Folder 04 now stops at the contract for such a product, folder 05 skips, and folder 10 takes its own loan from the quote to the payout. What to do: nothing; run the collection.
  • Simulated payout approvals on Borrou's sandbox (sandbox; changes the draft, 2026-10-25). On Borrou's sandbox, POST /v1/sandbox/loans/{reference}/advance on a loan at COLLATERAL_DEPOSITED now enters and approves the payout as the sandbox's two simulated TFG users, one each, through the same two-person checks a live payout goes through, then plays the custodian; the loan becomes ACTIVE without a TFG person. They approve nothing else: a repayment and the collateral's return are still TFG's, in its console, and a payout a TFG person entered still waits for a second TFG person. Live is unchanged. What to do: nothing; the quick-start collection now runs through the payout.
  • A bullet loan's full repayment amount (fix, 2026-10-25). GET /v1/loans/{reference}/repayment-instructions gives, for a bullet loan, what the loan will owe at the end of the UTC day (valid_until), so a payment recorded any time before then covers it. What to do: read the amount again after valid_until.
  • Documentation (changes the draft, 2026-10-25). The quick-starts, the sandbox guide, the error catalogue and the guide for coding agents describe payouts and returns to your settlement account at the custodian, the webhook URL rule, the quote's indicative BTC amount and the simulated payout approvals. What to do: nothing.
  • The loan's principal asset (additive; proposed, may change, 2026-10-23). A loan carries principal_asset, the stablecoin its principal is paid out and repaid in, fixed at creation: USDT unless your product pays the borrower's region in another. Its *_usdt amounts are in that asset. What to do: nothing while every loan is USDT; read it before showing an amount's unit.
  • The contract, served (additive; proposed, may change, 2026-10-22). Where Borrou publishes the contract, GET /docs renders it as one reference page (no script, nothing loaded from elsewhere) and GET /openapi.yaml serves the document itself, both without authentication and with X-Contract-Version set to its info.version; elsewhere both answer 404 not_found. What to do: nothing; point your code generator at GET /openapi.yaml if you wish. Channel flow, call by call walks the channel flow end to end.
  • Strike price and trigger prices (additive, 2026-10-15). A loan carries strike_price, the checked BTC price recorded when the payout activated it (its basis, the reading's time, the payout's time, and the collateral and debt then), null before the payout and for a loan without one; and trigger_prices, the BTC prices at which the loan is at its margin-call and liquidation levels, at_strike and now (the debt grows with interest, so now drifts up). Each is the highest price, to the cent, at which the loan is at or below the level. loan.disbursed carries the same strike and its trigger prices as strike_price. They are figures for display: every decision compares the loan's position at a checked price. What to do: nothing; show them to the borrower if you wish.
  • Risk policies per product: automatic margin calls, a kept surplus, non-recourse (additive, 2026-10-15). A product and a loan carry risk_policies: margin_call_issuance (MANUAL, TFG issues the call, or AUTOMATIC, Borrou issues it and emails the borrower the notice once two checked prices from both sources put the loan at or below its margin-call level), liquidation_surplus_policy (RETURN or RETAIN: the lender keeps what a sale raises beyond the debt) and recourse (FULL or NON_RECOURSE: the borrower owes nothing more after a sale). Every existing product is MANUAL, RETURN, FULL. An automatic call reaches you as loan.margin_call_issued, like any other; a call moves nothing. loan.liquidation_completed and the loan's liquidation resource add surplus_retained_usdt and shortfall_not_owed_usdt (null under today's policies). Contracts issued from now on are template contract-v0.5, which states a product's policies; a loan on today's policies keeps its text. Where Borrou is live, a product with a kept surplus or non-recourse lends nothing until legal clearance (409 legal_clearance_pending, as for click-wrap). What to do: nothing for today's products; for one with the new policies, show the borrower what they mean.
  • Bullet loans with a term, interest per second (additive, 2026-10-15). A product, a quote and a loan carry repayment_profile (PERIODIC or BULLET), term_days and accrual_basis (DAILY_ACT_360 or SECOND_ACT_360); a loan also matures_at and maturity_defaulted_at. A bullet loan's interest.accrual is SECOND_ACTUAL_360, its schedule has a maturity and one MATURITY entry, and its principal is due AT_MATURITY. Two webhook events: loan.maturity_approaching (a week and a day before) and loan.maturity_defaulted (unpaid at the maturity; nothing is sold or moved on it). Contracts issued from now on are template contract-v0.4, which states a bullet loan's terms; a periodic loan's text is unchanged. What to do: nothing for a periodic product; for a bullet one, show the maturity to the borrower and subscribe to the two events.
  • Sandbox borrowers, delivery records and secret reads (changes the draft, 2026-10-08). In the sandbox, POST /v1/applications refuses a borrower email outside the .test domain with 422 sandbox_test_email_required (stored), so nothing the sandbox sends can reach a real person. WebhookDelivery.last_error is now a listed enum, partner_refused included (cancelled unsent because the API was not serving your partner). Deliveries that have ended are kept 30 days from when they were queued; the events themselves stay readable from GET /v1/events for as long as Borrou keeps them, which today is indefinitely. Every read of a subscription's signing secret is recorded with the credential that read it. What to do: use .test addresses in the sandbox; replay or record what you need from a delivery within 30 days.
  • Webhook health (additive, 2026-10-04). GET /v1/webhooks/health (webhooks:manage): for each of your subscriptions over the last 24 hours, its state (DELIVERING, FAILING, NO_ATTEMPTS, DISABLED), the latest attempt with its error class or HTTP status, the last delivery that went through, the deliveries that failed and those given up, and the oldest delivery still waiting. Your console's Webhooks page shows the same, and Borrou's staff are alerted when a partner's deliveries keep failing. What to do: nothing; poll it, or watch the console, to see an endpoint failing before your events pile up.
  • Webhook delivery order and throughput (changes the draft, 2026-10-08). Borrou now sends what is waiting for you until it is all sent, rather than ten deliveries a minute, and sends your risk events (loan.margin_call_*, loan.liquidation_*, loan.coverage_warning) before anything else waiting, however much older. A delivery Borrou could not sign on its own side (last_error signing_unavailable) no longer uses one of its eight attempts: it waits five minutes and is tried again. What to do: nothing if you already order events by occurred_at or the feed's position, as delivery was never in order; otherwise start doing so.
  • The deposit tolerance (additive, 2026-10-03). GET /v1/loans/{reference}/collateral/deposit-address and GET /v1/loans/{reference}/collateral carry deposit_tolerance: the loan's own tolerance in bps and the shortfall it allows, to the satoshi. A deposit is now judged to the satoshi against it: one satoshi beyond it waits for TFG's review. Contracts issued from now on are template contract-v0.3, which states it. What to do: show the rule beside the amount you ask the borrower to send, and that more than the amount is kept as collateral.
  • Borrou's identity verification page (changes the draft, 2026-10-03). A PROVIDER hand-off's link now opens Borrou's own verification page, where the borrower confirms a code sent to their email and then completes the KYC provider's checks; the response's shape is unchanged, and a new hand-off's link replaces the one before. POST /v1/loans and POST /v1/loans/{reference}/contract are 409 borrower_not_eligible (not stored) while the borrower does not pass identity verification at the KYC provider at the moment (a later re-check), and the contract also while the borrower is no longer approved by TFG. What to do: open the link as before; handle borrower_not_eligible on the contract as Error codes says.
  • The KYC gate (changes the draft, 2026-10-03). borrower.country is required on POST /v1/applications, and a country on TFG's group block-list or outside your API product's countries is 422 country_not_accepted (stored). A RELIANCE hand-off is 403 reliance_not_approved while TFG does not let a reliance attestation stand for its identity checks (open, off until decided), and 422 country_not_accepted for a borrower with no country on file. A PROVIDER file goes to TFG once every required check has a result. POST /v1/loans is 409 borrower_not_eligible (not stored) for an approved borrower who cannot start a new loan: an override of missing documents expired, a country to confirm or not lent to, or an approval made before today's checks. What to do: send the borrower's country of residence; handle the two new codes as Error codes says.
  • Signed collateral addresses (additive; security, 2026-10-03). The deposit and top-up addresses carry address_attestation: Borrou's Ed25519 signature over a statement of the address and the loan, with a verification_code the borrower's loan page shows too. GET /v1/address-keys publishes the public keys, with no credential. In live mode an address without a signature is never served (409 address_verification_pending, now on the deposit address too), and the top-up address is served in live mode once signed. What to do: verify the attestation before showing an address, and show its code beside it (Verifying an address, snippets in three languages).
  • Documentation (additive, 2026-10-02). The sandbox quick-start collection, the TypeScript, Python and Java snippets, the error catalogue, the sandbox guide, the versioning policy and the guide for coding agents.
  • The events feed's cursor is a position (changes the draft, 2026-10-02). Every event in GET /v1/events carries position; after and next_cursor are positions (integers), in the order Borrou published the events, and an event never appears behind a position already read, so the feed no longer holds back its newest seconds. An event id is no longer accepted as after (400 invalid_request). What to do: store the last event's position instead of its id; an integration that stored an id reads again from after=0 and de-duplicates on id. Webhooks are unchanged.
  • The lender of record (additive, 2026-10-03). A monthly statement carries lender_of_record: status TO_BE_CONFIRMED (every other field null) until TFG has set the loan's lender, then SET with its legal name, jurisdiction and registration reference. In live mode, POST /v1/loans and POST /v1/loans/{reference}/contract answer 503 lender_of_record_not_configured while the lender is not set (not stored; nothing is created). What to do: show "Lender: to be confirmed" to borrowers until the statement says SET; nothing changes in the sandbox.