BorrouPartner APISandboxDraft

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

Borrou Partner API reference

Version 0.13.0-draft · BTC-collateralised USDT loans for embedded partners. Draft v0.10, shared for the sandbox.

  • https://api.borrou.capital: The public sandbox on synthetic data, sandbox credentials only. The live host is to be announced.

Overview

Conventions

  • Every path is under /v1. Breaking changes ship as /v2; additive changes (new fields, new error codes, new event types) can appear in /v1 at any time, so clients must ignore fields they do not know. The proposed policy, with what counts as breaking and how a deprecation is announced, is the versioning guide (/guides/versioning).
  • Amounts are decimal strings: USDT with up to 6 decimals, BTC with up to 8, USD with 2. Rates, collateralisation and LTVs are integer basis points (1200 = 12%, 13500 = 135%).
  • Coverage thresholds are collateralisation levels (collateral value ÷ principal plus accrued interest), compared exactly; the LTV beside each is derived and rounded, for display.
  • Timestamps are RFC 3339 in UTC.
  • Every response carries X-Request-Id. Quote it to TFG when asking about a request.
  • An operation marked x-status: planned would be documented so integrations can be designed against it, and would answer 404 not_found until it is built. None is today.
  • Webhook events whose summary is Minimum set are the minimum set v1 commits to; the others are additions. An event whose summary is Planned could be subscribed to but would not be sent yet. None is today.

Errors

Every error has the body { "error": { "code", "message", "request_id" } }. Branch on code, never on message. The error codes guide (/guides/errors) lists every code with its cause, its remedy and whether it is stored under the Idempotency-Key.

Partner documentation

The guides, as pages under /guides where Borrou publishes them: the integration guide, a sandbox quick-start (with a Bruno collection), the channel flow end to end, the integration rules for engineers and coding agents (indexed by llms.txt), the error codes, address verification, the sandbox, the versioning policy (proposed) and the changelog; and TypeScript, Python and Java snippets. All drafts.

Where Borrou publishes the contract, GET /docs renders this document as one reference page, GET /openapi.yaml serves the document itself, and a developer portal at GET / serves the guides as pages, all without authentication (proposed, may change).

Authentication

OAuth 2.0 client credentials (RFC 6749 §4.4). TFG issues each partner one or more credentials; the secret is shown once and Borrou stores only a hash. Exchange it at POST /v1/oauth/token for a short-lived access token and send that as Authorization: Bearer <token>. Revocation takes effect on the next request, not at token expiry. Rotation keeps the previous secret, and the access tokens obtained with it, valid for an overlap window (24 hours by default); a rotation without overlap ends both at once. Sandbox credentials work only against the sandbox and only for a sandbox partner, and live ones only against live.

Access tokens, like quote tokens, are opaque: Borrou issues them and only Borrou verifies them. Do not parse, verify or store their contents, and do not depend on their length, format, header or claims, which can change without notice; there is no key to fetch and none is published. Use expires_in to know when to ask for a new token, and ask for a new one whenever a call answers 401 invalid_token. Borrou rotates the keys that sign tokens without an outage: a token issued before a planned rotation keeps working until it expires. After an emergency rotation a token can be refused before expires_in; the same 401 invalid_token and a new token cover it.

Mutual TLS is an optional, deployment-level control: a load balancer in front of the service can require a client certificate per partner. It is not implemented in the service.

Idempotency

Every POST and DELETE except the token endpoint requires an Idempotency-Key header (1 to 255 visible ASCII characters, unique per partner). Sending the same key with the same request returns the stored response, with Idempotent-Replayed: true. Sending it with a different request returns 422 idempotency_key_mismatch. One answer is never stored: the short-lived hosted link of a PROVIDER KYC hand-off. Its replay is 409 kyc_link_not_replayable with the hand-off and no link; send a new hand-off for a fresh one.

A refusal that is about the request itself (an amount outside the product's limits, a network the product does not accept, an application already cancelled or already a loan) is stored and replayed. A refusal that can change without the request changing is not stored, so the same key works once the situation has changed: a 5xx, price_unavailable, product_unavailable, application_not_approved (TFG has not approved the borrower yet), exposure_limit_reached, and anything refused before the write runs (authentication, validation, not found). Keys are kept for at least 24 hours.

Rate limits

Per partner, per minute, shared across all of the partner's credentials and every instance of the service. Each authenticated response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; a refused request gets 429 rate_limited and Retry-After. The token endpoint limits failed attempts per client_id and source address and per source address, and tokens issued per credential; every request is also limited per source address (an IPv6 address by its /64) before it is authenticated. Replays are limited to 100 per partner per hour.

Isolation

A credential sees only its own partner's applications, loans, subscriptions and deliveries, and webhooks for its own loans only. Anything else is 404 not_found, exactly as if it did not exist.

Origination

  1. GET /v1/products for the product types you may offer, and GET /v1/quote for indicative terms from your API product type, with a quote_token that pins its terms for a few minutes. GET /v1/prices/btc-usd shows the checked reference price and whether its circuit breaker is open.
  2. POST /v1/applications with the borrower's name, email and country. The borrower becomes your client in Borrou and goes through KYC and TFG's review like every other client; one email is one borrower, so a returning borrower keeps their approval.
  3. POST /v1/applications/{id}/kyc-handoff to start KYC: PROVIDER returns a short-lived link to Borrou's identity verification page for your app to open; RELIANCE, only for partners TFG has approved for it, records your attestation. Either way TFG decides the file.
  4. When the application's status is APPROVED, POST /v1/loans with its id (and, if you hold one, the quote_token). The loan is created at LOAN_CREATED on your product type's terms, with the collateral quoted from it (the product's initial margin times the checked BTC price at that moment; you cannot set it).
  5. POST /v1/loans/{reference}/contract issues the contract and returns the borrower's signing link, a Borrou-hosted e-signature link your app opens for the borrower; Borrou keeps the signing evidence. GET /v1/loans/{reference}/contract follows it. On a product whose signature_mode is CLICKWRAP_OTP there is no link: show the borrower the acceptance text in the contract's acceptance.text, ask Borrou to email them a one-time code (POST .../contract/acceptance-code), and send their click with that code (POST .../contract/accept).
  6. Once signed, GET /v1/loans/{reference}/collateral/deposit-address gives the loan's own collateral wallet address, signed by Borrou (see Collateral address signatures), and a payment URI for a QR code; GET .../collateral follows the deposits against the required BTC.
  7. TFG approves the payout (two different people) and the custodian executes it to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your loans to be paid there; GET /v1/loans/{reference}/disbursement shows where it stands, and the loan becomes ACTIVE. GET /v1/loans/{reference} names the next step and who takes it. Before activation you may cancel (POST /v1/loans/{reference}/cancel); collateral already deposited goes back to the borrower once TFG approves the return.

The API never approves, never moves funds and never sends an instruction to the custodian: the payout and every return of collateral are TFG's, with two approvals each.

Collateral address signatures

A swapped collateral address sends the borrower's BTC to whoever swapped it. When the custodian issues a loan's collateral wallet, Borrou signs a statement of the address with an Ed25519 key, once; it shows the address anywhere (here, on its own screens, in its emails and on the borrower's loan page) only after verifying that signature. Every deposit and top-up address comes with address_attestation: the signed statement, the signature (base64url) over the statement's UTF-8 bytes, the key_id, and a verification_code. Before your app shows the address, verify the signature with the public key GET /v1/address-keys publishes under that key_id (no credential needed), then check that the statement's address and loan_reference are the ones you are about to show, and its purpose, asset and network are BORROU_COLLATERAL_ADDRESS_V1, BTC and bitcoin. Show verification_code beside the address: the borrower's loan page shows the same code with the same address. If anything does not match, show nothing and contact TFG. Steps and snippets: the address verification guide (/guides/address-verification).

The statement is eight name=value lines in this order, joined by a single LF, with no trailing newline: purpose, asset, network, address, loan_reference, wallet (a salted commitment to the custodian's wallet reference, which Borrou checks and does not disclose), key_id and signed_at (RFC 3339 UTC, milliseconds). Verify the bytes you received; never rebuild the statement from other fields. A signature does not expire: an address stays valid while the loan takes collateral, and the API stops serving it when it no longer does. In live mode an address without a signature is never served (409 address_verification_pending); only the development sandbox may answer address_attestation: null, for a wallet assigned before signing was configured, which your app must show as unsigned and never as verified.

Above the upper limit

When an active loan is at or above its upper limit (190% by default) with no breach continuing (GET /v1/loans/{reference}/upper-limit), more USDT is offered first: POST .../increase-requests for the borrower, then POST .../increase-requests/{id}/acceptance with the borrower's click and the one-time code Borrou emailed them. Surplus collateral back is allowed on the borrower's request only (POST .../surplus-return-requests), never promoted, and never together with an increase. Neither request moves anything: two different people at TFG approve the payout or the return in Borrou, which then instructs the custodian, to the borrower's wallet at the custodian or to your settlement account there if TFG has set your partner to it.

Personal data

Borrower personal fields are write-only: they are never returned and never appear in webhooks. The API takes no address of any kind: payouts and collateral returns go only to the borrower's wallet at the custodian, or, for a partner TFG has set to it, to the partner's settlement account at the custodian, which two TFG administrators register; never one given per loan or through the API. A resource names the destination by kind only (BORROWER_CUSTODIAN_WALLET or PARTNER_SETTLEMENT_ACCOUNT), never a reference. Webhook payloads carry identifiers, statuses and amounts only.

Events

Every event, webhook or feed, is derived from Borrou's transactional outbox: it exists if and only if the change it reports committed, and it carries identifiers, statuses and amounts only. GET /v1/events returns the same events as the webhooks, with the same ids, for as long as the outbox keeps them, which today is indefinitely, each with its position in the feed; use it to recover what a webhook endpoint missed.

The feed's cursor is the position. Store the position of the last event you processed and poll with after=<that position> (or pass the previous page's next_cursor). Positions only grow, and an event never appears behind a position you have already read, so polling from your last position misses nothing and needs no hold-back. Positions are not consecutive: the gaps are other partners' events and types you did not ask for. An event is in the feed once Borrou's relay has published it, usually within a minute, at the same moment its webhooks are queued. An event the relay could not publish is retried, then set aside for TFG to replay; once replayed it appears with a later position than everything published meanwhile, with its id unchanged, so de-duplicate on id. after=0 reads the whole feed again, in the same order. (Changed in v0.10: the cursor was an event id, and the feed held back its newest seconds; an event id is no longer accepted as after.)

Sandbox

The sandbox runs the same code with simulated custody and prices. TFG may set your sandbox partner up with an approved borrower whose application is ready for POST /v1/loans: GET /v1/applications?status=APPROVED lists it. The /v1/sandbox simulators (scope sandbox:simulate) stand in for the borrower, the KYC and e-signature providers, the custodian and TFG's reviewer: the borrower's KYC and TFG's decision on it, a signature, a deposit, a BTC price of your own, and the custodian's side of a payout. Your own steps (the KYC hand-off, the contract) are your API calls, as in production. A payout takes two TFG people on the console, one entering and a different one approving; on Borrou's sandbox the sandbox's two simulated TFG users take those two steps, through the same two-person checks (POST /v1/sandbox/loans/{reference}/advance). Everywhere else a payout waits for two TFG people. The simulators answer 403 sandbox_only anywhere but the sandbox, for any credential but a SANDBOX one, for any partner but a sandbox partner, and on an instance whose custodian or providers are not the simulators. An increase's one-time code, which a sandbox borrower cannot read, comes from GET /v1/sandbox/increase-requests/{id}/code (scope sandbox:simulate), and a click-wrap contract's from GET /v1/sandbox/loans/{reference}/contract/acceptance-code.

auth

post/v1/oauth/token

Exchange client credentials for an access token.

Client authentication by HTTP Basic (preferred) or by client_id and client_secret in the body, never both. Exempt from Idempotency-Key: issuing a token changes no resource. Errors use the v1 error model with the RFC 6749 §5.2 codes.

Client credentials (HTTP Basic or in the body).

Request body (required)

application/x-www-form-urlencoded TokenRequest

application/json TokenRequest

Responses

StatusDescription
200An access token.

application/json TokenResponse

400invalid_request: the token request is malformed. unsupported_grant_type: the grant type is not client credentials. invalid_scope: a scope the credential does not hold.

application/json Error

401invalid_client: client authentication failed. Which part was wrong is never said.

application/json Error

415unsupported_media_type.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

quotes

get/v1/quote

Indicative terms for a loan amount.

Priced from the partner's active product type on the API channel and the current BTC price. Indicative only: nothing is reserved. The contract's BTC amount is fixed when the loan is created, at that moment's checked price, and the loan copies its product type's terms then. 409 product_unavailable when the partner has no active API product, or its product takes collateral from agreed terms (manual sizing), which the API cannot accept.

quote_token pins the product's terms (everything a loan copies from it) for this principal until quote_expires_at: POST /v1/loans with it is created on exactly those terms or refused with 409 quote_terms_changed. It pins terms, not the price: the collateral is still computed at the checked price when the loan is created (price_pinned: false).

Whether a quote token should also pin the price is an open decision. Where the deployment pins it, price_pinned is true and indicative false: the quote is made at a checked BTC price (price_fetched_at is that reading's time), the token carries it, and POST /v1/loans with the token creates the loan at exactly that price, as long as it is no older than the quote lifetime (ten minutes unless configured otherwise). quote_expires_at is then no later than that price's time plus the lifetime. While the price is not trusted, 503 price_unavailable.

Bearer token with scope quotes:read.

Parameters

NameInTypeDescription
principal_usdt requiredqueryUsdtAmount
productqueryProductCodeThe product code to quote (GET /v1/products). It must be your active API product; another is 409 product_unavailable, an unknown code 404.

Responses

StatusDescription
200The quote.

application/json Quote

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/prices/btc-usd

The checked BTC/USD reference price, its age, and whether the circuit breaker is open.

The price a loan is created at: the reading that passes Borrou's checks (staleness, the two sources agreeing, the move since the last good price), read without moving the circuit breaker. While the breaker is open, or a reading fails its checks, checked is false, there is no price, and POST /v1/loans answers 503 price_unavailable. Quotes use the display price and may differ from it for a moment.

Bearer token with scope quotes:read.

Responses

StatusDescription
200The checked price, or why there is none.

application/json CheckedPrice

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

products

get/v1/products

The product types you may offer through the API (active ones).

Each product type TFG set up for you on the API channel, by its code: the coverage ladder as collateralisation with each level's LTV beside it (initial margin, warning, margin call, liquidation, upper limit), the cure window, rate and interest period, partial-repayment mode, collateral sizing, principal limits and configured fees. A product sized MANUAL cannot lend through the API. No internal id is shown.

Bearer token with scope quotes:read.

Responses

StatusDescription
200The products.

application/json object

FieldTypeDescription
data requiredarray of Product
400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/products/{code}

One of your API product types, active or not.

A code is never changed or given to another product type, so an inactive one still reads as the terms its loans were created on.

Bearer token with scope quotes:read.

Parameters

NameInTypeDescription
code requiredpathProductCode

Responses

StatusDescription
200The product.

application/json Product

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

applications

get/v1/applications

List the partner's applications, newest first, cursor-paginated.

Pass next_cursor from a page as starting_after for the next one. status filters on the status each application shows, TFG's decision on the borrower included.

Bearer token with scope applications:read.

Parameters

NameInTypeDescription
statusqueryApplicationStatus
limitqueryinteger
starting_afterquerystring (uuid)

Responses

StatusDescription
200A page of applications.

application/json ApplicationList

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/applications

Submit a loan application for a borrower.

Creates the borrower as your client (or attaches the application to the client that already has this email, if the name matches: 409 borrower_mismatch otherwise) and an application whose status follows TFG's decision on that client: SUBMITTED until KYC runs, IN_REVIEW, then APPROVED or REJECTED. KYC runs through the KYC provider or the partner's reliance attestation (POST /v1/applications/{id}/kyc-handoff). Borrower personal fields are write-only. The sandbox takes synthetic borrowers only: an email outside the .test domain is 422 sandbox_test_email_required (stored).

A partner TFG has set to accept its own KYC evidence may send kyc_evidence (proposed, pending TFG): what its KYC established, by reference only. It satisfies proof of address and the source-of-funds declaration; the identity checks still go to Borrou's KYC provider unless TFG lets partner evidence stand for them. The response's kyc_evidence.checks_left_for_provider names what the borrower still completes through a KYC hand-off (mode PROVIDER). Sent by a partner not set to accept it: 403 partner_kyc_not_accepted; for a borrower whose file is with TFG or decided, or filed under another country: 409 kyc_evidence_not_accepted. Neither is stored, and the application is not created.

Bearer token with scope applications:write.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json ApplicationCreate

Responses

StatusDescription
201Created.

application/json Application

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/applications/{id}

Read one application.

One of your applications, by id: its status, which follows TFG's decision on the borrower, and once it became one, its loan. Another partner's application is 404 not_found, like a missing one.

Bearer token with scope applications:read.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)

Responses

StatusDescription
200The application.

application/json Application

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/applications/{id}/cancel

Withdraw an application before it becomes a loan.

Allowed from SUBMITTED, IN_REVIEW and APPROVED. The borrower stays your client. An application already cancelled or already a loan is 409 application_not_cancellable (stored).

Bearer token with scope applications:write.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json ApplicationCancel

Responses

StatusDescription
200Cancelled.

application/json Application

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

clients

get/v1/clients

Your borrowers, newest first, cursor-paginated.

Each borrower is your client in Borrou, one per email. A client shows its KYC status as TFG decided it, the status of its wallet at the custodian (never the custodian's reference) and its loans. No personal field is ever returned: name, email and country are write-only.

Bearer token with scope applications:read.

Parameters

NameInTypeDescription
limitqueryinteger
starting_afterquerystring (uuid)

Responses

StatusDescription
200A page of clients.

application/json ClientList

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/clients/{id}

One of your borrowers.

One of your borrowers: their KYC standing, their wallet at the custodian by status only, and the references you sent with their applications. Never a personal field: those are write-only. Another partner's borrower is 404 not_found.

Bearer token with scope applications:read.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)

Responses

StatusDescription
200The client.

application/json Client

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

kyc

post/v1/applications/{id}/kyc-handoff

Start KYC for the applicant, by Borrou's KYC provider or by your reliance attestation.

KYC is per partner.

  • mode: PROVIDER (every partner): Borrou opens the borrower's verification at its KYC provider and returns a short-lived link (15 minutes) to Borrou's identity verification page, for your app to open. There the borrower confirms a one-time code sent to their email, then completes the provider's document and liveness checks; Borrou sends the provider no personal data, and no document passes through Borrou. The link is handed over once and kept nowhere, the Idempotency-Key's stored answer included: a retry with the same key is 409 kyc_link_not_replayable with the hand-off and no link, and a new hand-off (new key) gives a fresh link, which replaces the one before, while the file is open. When the provider reports the borrower's result, the file goes to TFG. The file goes to TFG once every required check (identity document, liveness, sanctions, PEP and adverse-media screening, country) has a result; until then the application stays IN_REVIEW and the client IN_PROGRESS.
  • mode: RELIANCE, only for partners TFG has approved for reliance, and only while TFG lets a reliance attestation stand for its identity checks (403 reliance_not_approved otherwise; that setting is open and off until TFG decides): you attest you ran the borrower's KYC, with your attestation reference, the provider you used and the date it was completed. Borrou keeps those references only; no document passes through this API. The file goes to TFG now. 422 country_not_accepted for a borrower with no country of residence on file.

Either way TFG approves or rejects the borrower on its own review; the application's status follows. 409 kyc_handoff_not_open for a cancelled application or one already a loan (stored), and for a file TFG holds or has decided (not stored: the same key works once it can). Emits kyc.started.

Bearer token with scope kyc:write.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json KycHandoffRequest

Responses

StatusDescription
201The hand-off.

application/json KycHandoff

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

loans

get/v1/loans

List the partner's loans, newest first, cursor-paginated.

Pass next_cursor (a loan reference) as starting_after for the next page.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
statusqueryLoanStatus
client_idquerystring (uuid)One of your clients (GET /v1/clients).
limitqueryinteger
starting_afterquerystring

Responses

StatusDescription
200A page of loans.

application/json LoanList

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans

Turn an approved application into a loan.

Creates the loan at LOAN_CREATED for the application's amount, on the terms of your active API product type at this moment (rate, collateral ratio, deposit window, coverage ladder and cure window are fixed on the loan from then on). The required collateral is the product's initial margin times the principal at a checked BTC price read for this request, rounded up to the satoshi; the request cannot set it. While the price is not trusted (its checks failing) nothing is created: 503 price_unavailable, not stored under the Idempotency-Key, so the same request can be sent again later. The price a loan is created at is never older than the quote lifetime (ten minutes unless configured otherwise), and the loan keeps the record of its check. The reference comes from Borrou's loan sequence (LN-0042). Emits loan.created.

Refused with 409 application_not_approved until TFG has approved the borrower, 409 borrower_not_eligible (not stored) while an approved borrower cannot start a new loan: an override of missing documents has expired, the country of residence is to be confirmed or not one your product lends to, the approval predates the identity checks TFG now requires, or the borrower's identity verification does not pass at the KYC provider at the moment (a later re-check); the message says which, 409 application_not_open once the application is cancelled or already a loan, 422 exposure_limit_reached beyond your remaining capacity, 422 network_not_accepted for a network that is not configured or not accepted by the product, and 409 product_unavailable without an active API product or with a manually sized one.

In live mode a loan is created only under a lender whose lender-of-record record TFG has set: until then, 503 lender_of_record_not_configured (not stored; nothing is created). The sandbox is not affected, and its statements say the lender is TO_BE_CONFIRMED. Likewise in live mode, a product whose terms wait for legal clearance (today: a CLICKWRAP_OTP signature mode, a RETAIN liquidation surplus policy, or NON_RECOURSE) lends nothing until TFG records it: 409 legal_clearance_pending (not stored; nothing is created). Never in the sandbox.

With a quote_token from GET /v1/quote, the loan is created only on the terms that quote pinned, for the application's principal: 422 quote_expired once it has expired (where the token pins the price, the message says how old that price is), 422 invalid_quote_token for a token this service did not issue to you, 422 quote_mismatch for another principal (all stored), and 409 quote_terms_changed when your product's terms are no longer the quoted ones (not stored).

No destination can be given. The payout and the collateral's return go only to the borrower's wallet at the custodian, which Borrou asks the custodian to open when TFG approves the borrower, or, if TFG has set your partner to its settlement account, to that account at the custodian (operating.destinations says which, by kind). A request carrying an address field (any field whose name contains address, or a destination, payout and collateral_return included) is refused with 422 destination_not_accepted, whatever its shape. The loan is created whatever the borrower's wallet's status; borrower_wallet.status says where it stands, and nothing is paid or returned to it until it is ACTIVE.

*Not offered:* payout and collateral_return exist only for a product whose destinations take an address from the partner (PARTNER_PROVIDED_ADDRESS), which no product offers. For such a product, a missing one is 422 payout_destination_required or 422 collateral_return_destination_required, and one wrong for its network 422 destination_address_invalid.

*Not offered:* a product whose operating.pricing_source is QUANT. No product is priced that way; if one were and its pricing was not available, nothing would be created: 503 quant_platform_unavailable (not stored).

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json LoanCreate

Responses

StatusDescription
201Created.

application/json Loan

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/loans/{reference}

Read one loan, with the next step and who takes it.

The loan's terms, status and figures, with next_action: what has to happen next for it to move, and who does it. Once it is paid out, its strike and trigger prices too. Another partner's loan is 404 not_found, like a missing one.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The loan.

application/json LoanDetail

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/balance

What is owed now (principal plus simple interest accrued to now).

Non-zero only while the loan is ACTIVE. Interest is the product's: by whole UTC days for a loan with periodic interest (accrual: DAILY_ACT_360), by the second from the payout for a bullet loan (SECOND_ACT_360), measured at the moment of the request.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The balance.

application/json LoanBalance

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/coverage

Collateral held, its value, the current LTV and the ladder.

The current LTV is computed at the time of the request while collateral is held (COLLATERAL_DEPOSITED, ACTIVE), on principal plus accrued interest, against the loan's own ladder, fixed at creation. health_flag is the monitor's last stored flag, which includes hysteresis and any open margin call.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The coverage.

application/json LoanCoverage

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/loans/{reference}/interest-periods

Interest billed per period, what is paid and what is overdue.

Every billed period with its amount, due date, the end of its 3-business-day grace, what is paid and unpaid, and its status. Default interest (the loan rate plus 2%, on overdue amounts, not compounded) is kept for the loan as a whole: a payment goes to it first, then to the oldest billed period. Once the debt has ended (full repayment, or liquidation), figures run to that moment and periods still unpaid then are SETTLED: closed by the repayment, or by the liquidation, whose shortfall holds whatever its proceeds did not cover.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The interest periods.

application/json InterestPeriods

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/schedule

Upcoming interest due dates, and the maturity if the loan has one.

On an active loan: billed interest not yet due, periods that ended and await billing, the current period and the three after it. Amounts of periods not billed yet are the engine's figure at the period's last day on today's records, so an estimate that assumes nothing changes. With periodic interest there is no maturity: the principal is due on full repayment, and maturity is null. A bullet loan bills nothing: principal and interest fall due together at its maturity (maturity.matures_at, its term maturity.term_days).

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The schedule.

application/json LoanSchedule

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/margin-calls

Open and past margin calls.

Newest first. Each call carries the position it was issued at, the top-up asked for (the BTC that restores the initial margin), when the notice was sent (the cure window runs from it), the deadline and how it ended. Who issued or resolved it is never shown.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The margin calls.

application/json MarginCalls

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/amendments

Threshold amendments TFG scheduled with notice, applied or lapsed.

TFG may amend a running loan's thresholds with 30 days' written notice, effective on a stated date. Listed once a second TFG user has approved it and the borrower's notice has gone out; oldest effective date first.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The amendments.

application/json TermAmendments

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/collateral/announcements

Say which loan a collateral transfer is for, by its transaction hash.

Proposed, to be confirmed by TFG. Only for a loan whose deposit address is your shared collateral address, the same on every one of your loans (409 collateral_announcement_not_taken otherwise, stored). Because every loan is funded at that one address, a deposit is told apart by its transaction: as soon as you broadcast it, name its hash and the loan here. Borrou records it and applies the custodian's report of that transaction to that loan, whichever comes first. It says which loan a transfer is for; it is never proof that it arrived, and the collateral counts only as GET /v1/loans/{reference}/collateral shows it. One transaction is one loan's: announced again for the same loan it returns the record already there (200); for another loan, 409 collateral_transfer_already_announced (stored). No address is taken.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json CollateralAnnouncementRequest

Responses

StatusDescription
200The same announcement, already recorded.

application/json CollateralAnnouncement

201The announcement, recorded.

application/json CollateralAnnouncement

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/liquidation

The loan's liquidation, read-only.

Where it stands (PROPOSED, APPROVED, SELLING, SETTLED, COMPLETED, or ENDED when nothing was sold), its trigger, each order's fills against the independent reference price, the proceeds, and, once a second TFG user approved the settlement, the waterfall (principal, interest, fees, surplus), the shortfall still owed and the collateral left over. Never who proposed or approved it, nor the execution route's references.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The liquidation, or liquidation null when there is none.

application/json LoanLiquidation

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/contract

Where the contract stands.

NOT_ISSUED before POST .../contract; SENT while it awaits the borrower's signature, with the signing link to open again; SIGNED with the signed date and the contract reference; EXPIRED when the loan was cancelled before the borrower signed, which withdraws the link. document is the stored contract's template, generation time, length and SHA-256: the fingerprint TFG, your console and the borrower's portal show for the same document.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The contract.

application/json Contract

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/contract

Issue the loan's contract and get the borrower's signing link.

The contract is between the borrower and Borrou, signed through a Borrou-hosted e-signature link that your app opens for the borrower; Borrou keeps the signing evidence. The agreement is generated from the versioned template with the loan's exact terms, the loan moves to CONTRACT_SENT, and a branded backup email with the link goes to the borrower. Only at LOAN_CREATED: 409 contract_not_issuable otherwise (stored). 409 borrower_not_eligible while the borrower is no longer approved by TFG, or does not pass identity verification at the KYC provider at the moment (not stored; nothing is issued). 503 provider_unavailable when the e-signature provider does not answer (not stored): the contract was not sent, and a retry makes the agreement on the same contract document. The agreement is made under Borrou's own key for the loan's contract, so a retry, with this Idempotency-Key or another, never makes a second one. In live mode, 503 lender_of_record_not_configured while the loan's lender of record is not set (not stored; nothing is issued). The contract names the lender of record once its record is in force, and says "to be confirmed" until then. On a CLICKWRAP_OTP loan (the product's signature_mode, copied at creation) no e-signature agreement is made and signing_link is null: the borrower reads the stored contract on their loan page, linked from Borrou's email, and accepts it in your app (see POST .../contract/acceptance-code and POST .../contract/accept). In live mode a contract whose terms wait for legal clearance (click-wrap acceptance, a liquidation surplus the lender keeps (RETAIN), or a non-recourse loan) is not issued until TFG records it: 409 legal_clearance_pending (not stored). Emits contract.sent.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body

application/json object

Responses

StatusDescription
201The contract, sent.

application/json Contract

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

post/v1/loans/{reference}/contract/acceptance-code

Email the borrower a one-time code to accept a click-wrap contract.

For a loan whose signature_mode is CLICKWRAP_OTP, while its contract awaits acceptance (409 contract_not_awaiting_acceptance otherwise, stored). Borrou emails a six-digit code to the email TFG verified for the borrower, with the acceptance text and a link to their loan page, where they can read the contract. The code is never returned to you, logged or stored in clear; it lasts ten minutes, takes five attempts and works once, and a new one replaces the last. At most five codes a borrower an hour (429 rate_limited with Retry-After). 409 borrower_not_eligible when the borrower's email is not a verified one (not stored). The response is the contract, whose acceptance.code says when the latest code was sent and until when it can be used. Where Borrou is live it waits for legal clearance (409 legal_clearance_pending); the details are proposed and may change.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body

application/json object

Responses

StatusDescription
201The code was emailed; the contract as it stands.

application/json Contract

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/contract/accept

Record the borrower's click-wrap acceptance of the contract, with the code Borrou emailed them.

Send the borrower's click: the code they entered, the stored contract's SHA-256 you showed them (document.sha256), the acceptance text's version (acceptance.text.version) and an opaque session reference of your own (never an email or an IP address). Borrou checks the code and records the acceptance, and with it the signature: the loan moves to SIGNED_WALLET_READY, its collateral wallet is assigned and the deposit window opens, as for any signature. Borrou's clock dates the acceptance.

A wrong, expired, used or exhausted code, or none sent, gets one answer: 422 acceptance_code_rejected (stored; it spends an attempt). 422 contract_document_mismatch when the SHA-256 is not the stored contract's, 422 acceptance_text_outdated for another text version, 409 contract_not_awaiting_acceptance for a contract that is not a click-wrap one awaiting acceptance (all stored; no attempt spent). 503 provider_unavailable when the custodian issues no collateral wallet: nothing is recorded and the code stays unspent (not stored). Partners receive contract.signed.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json object

FieldTypeDescription
otp requiredstringThe six digits Borrou emailed the borrower.
contract_sha256 requiredstringThe stored contract's SHA-256, as document.sha256.
text_version requiredstring
partner_session_ref requiredstringAn opaque reference of your own to the borrower's session. Never an email or an IP address.

Responses

StatusDescription
200Accepted and signed; the contract as it stands.

application/json Contract

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

post/v1/loans/{reference}/contract/resend

Send the borrower the signing link again by email.

Only while the contract is SENT (409 contract_not_awaiting_signature otherwise, not stored); at most three times an hour per loan (429).

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body

application/json object

Responses

StatusDescription
200The reminder was queued; the contract as it stands.

application/json Contract and object

All of: Contract, object

FieldTypeDescription
reminder_sent requiredboolean true
400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/disbursement

Where the payout stands, as states only.

NOT_DUE until the collateral is in; AWAITING_APPROVAL while TFG's two approvals are pending (and again after a rejection or a custodian failure: going again is a new entry); APPROVED once two people at TFG approved it, until the instruction is with the custodian; INSTRUCTED once the custodian holds the instruction; EXECUTED when the custodian has paid it to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your partner to it (destination.kind), with the transaction hash. NOT_APPLICABLE for a cancelled loan. Who approved is never shown, and neither is any custody reference. destination.wallet_status is the borrower's wallet's status where the payout goes to that wallet, and null otherwise.

Bearer token with scope loans:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The payout.

application/json Disbursement

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/cancel

Cancel a loan before it is active, with a coded reason.

The same rules as cancelling on the partner console. Any state before ACTIVE, unless TFG has entered the payout or the custodian holds its instruction (409 loan_not_cancellable, not stored, since that can change); an active or finished loan is 409 loan_not_cancellable, stored. An unsigned contract's signing link is withdrawn at the e-signature provider once the cancellation is recorded, and Borrou asks again until the provider confirms; the cancellation never waits on it. A contract that was sent and never signed also emits contract.expired, beside loan.cancelled. Collateral already released to the loan goes back to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your partner to it, once two people at TFG approve the return; nothing moves on this request. Partners receive loan.cancelled with reason_code: PARTNER_REQUEST.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json LoanCancel

Responses

StatusDescription
200Cancelled.

application/json LoanCancellation

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

upper-limit

Above the upper limit (190% by default), an increase first, or surplus collateral back on request.

get/v1/loans/{reference}/upper-limit

Where the loan stands against its upper limit, and what may be requested now.

Re-checked on every read, at a checked BTC price, on what the loan owes (principal plus accrued interest) against the collateral still free (released deposits less whatever is already leaving the wallet). above_upper_limit_without_breach is true when the loan is at or above its upper limit (190% by default) with no breach continuing: no unresolved margin call, not at the liquidation level, no overdue interest, no liquidation under way and no attested event of default. reason says why not otherwise; without a checked price it is PRICE_UNCHECKED and nothing is judged.

Either side of the upper limit there are two ways back to the initial margin (160% by default): more USDT (increase, offered first) or surplus collateral back (surplus_return, on the borrower's request only). They never run together. Each available_* is the configured share (share_bps, 95% by default) of what would bring the loan back to the initial margin (to_initial_margin_*), so a price reading before TFG's approval does not undo the request.

Bearer token with scope increases:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The position.

application/json UpperLimit

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/increase-requests

The loan's increase requests, newest first, whoever made them.

Every increase request on the loan, newest first, whoever made it (you, through the API, or the console), with its figures and status.

Bearer token with scope increases:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
limitqueryinteger

Responses

StatusDescription
200The requests.

application/json object

FieldTypeDescription
data requiredarray of IncreaseRequest
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/increase-requests

Request an increase of the loan for the borrower.

For at most increase.available_usdt from GET /v1/loans/{reference}/upper-limit, re-checked now at a checked price, and within your remaining exposure. Borrou emails the borrower, at the address TFG verified at KYC, a one-time code (six digits, valid for 10 minutes, single use, five attempts) together with the terms. The response carries the exact text the borrower must be shown in your app (acceptance_text: version, text and its SHA-256); the code never appears in any response. The borrower then has acceptance_expires_at (72 hours by default) to accept.

Refused, and not stored under the Idempotency-Key (each can change without the request changing): 409 upper_limit_unavailable (below the upper limit, or a breach continuing), 409 increase_in_progress (an increase is already open), 409 surplus_return_in_progress (a surplus return is requested or under way), 409 loan_not_active, 422 amount_above_limit, 422 exposure_limit_reached, 503 price_unavailable, and 429 rate_limited when the borrower has been sent as many codes as an hour allows (five). No destination can be given: the payout goes only to the borrower's wallet at the custodian, or to your settlement account there if TFG has set your partner to it. Emits loan.increase_offered.

Bearer token with scope increases:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json IncreaseRequestCreate

Responses

StatusDescription
201Requested; the borrower has been emailed the code.

application/json IncreaseRequest

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/loans/{reference}/increase-requests/{id}

One increase request, with its status and the reason it ended.

One increase request: its figures, its status, and once it has ended, the reason.

Bearer token with scope increases:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)

Responses

StatusDescription
200The request.

application/json IncreaseRequest

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/increase-requests/{id}/acceptance

The borrower's click accepting the increase, with the one-time code.

Send it when the borrower accepts in your app: when they clicked (accepted_at), the version and SHA-256 of the text you showed (exactly acceptance_text of the request), your own opaque reference for the session or device (partner_session_ref: never an email, a phone number or an IP address), and the six digits Borrou emailed the borrower (otp).

The request is re-checked first (its acceptance window, judged at the click and again at Borrou's clock, which allows one minute past acceptance_expires_at for the difference between clocks; the ratio, breaches and amount at a checked price now); one that can no longer go ahead expires, 409 increase_expired. Then the code: each code allows five attempts, counted before the digits are compared, so attempts sent at once cannot pass the limit together; a wrong one is 422 otp_invalid and spends an attempt; then otp_attempts_exhausted. A code works once and for 10 minutes (otp_expired); only the latest one sent for the request counts. However many codes are sent, a request takes ten wrong ones in all: the tenth ends it, 409 increase_expired with reason CODE_ATTEMPTS_EXCEEDED, and TFG is told. These refusals are stored under the Idempotency-Key: a different code is a different request with a new key. 503 price_unavailable is not stored, and spends nothing.

Recorded as accepted only when the code matches: Borrou keeps the click time, the channel (API), the text version and SHA-256, your session reference and the fact that the code it emailed was verified. TFG's two approvals and the payout to the borrower's custodian wallet (or your settlement account at the custodian, if TFG has set your partner to it) follow in Borrou; the request moves to AWAITING_APPROVAL once TFG enters the payout, and to PAID once the custodian has executed it. Emits loan.increase_accepted.

Bearer token with scope increases:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json IncreaseAcceptance

Responses

StatusDescription
200Accepted; TFG's approvals follow.

application/json IncreaseRequest

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

415unsupported_media_type.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

post/v1/loans/{reference}/increase-requests/{id}/cancel

Withdraw an increase before TFG has entered its payout.

While it awaits the borrower, or once accepted until TFG enters the payout (or after TFG rejected it). 409 increase_not_open once it has ended; 409 increase_not_cancellable once TFG has entered the payout (ask TFG to stop it; not stored, since TFG may reject it). A borrower who had accepted it is emailed, at their verified address, that it was withdrawn and nothing was paid. Emits loan.increase_cancelled.

Bearer token with scope increases:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200Cancelled.

application/json IncreaseRequest

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/increase-requests/{id}/resend-code

Email the borrower a new one-time code for a request awaiting them.

The new code replaces the previous ones. At most five codes per borrower an hour, however many requests or partners they come through: beyond that 429 rate_limited with Retry-After (not stored). 409 increase_not_open or 409 increase_expired for a request no longer awaiting the borrower.

Bearer token with scope increases:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200Sent.

application/json IncreaseRequest

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/surplus-return-requests

The loan's surplus-return requests, newest first.

The borrower's requests for surplus collateral back on this loan, newest first: requested, entered by TFG, declined, cancelled or expired.

Bearer token with scope surplus:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
limitqueryinteger

Responses

StatusDescription
200The requests.

application/json object

FieldTypeDescription
data requiredarray of SurplusReturnRequest
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/surplus-return-requests

The borrower asks for surplus collateral back.

On the borrower's request only; Borrou never offers it. Up to surplus_return.available_btc from GET /v1/loans/{reference}/upper-limit, or a smaller amount_btc; without one, TFG enters the share available when it acts. It goes only to the borrower's wallet at the custodian, or to your settlement account there if TFG has set your partner to it: no destination can be given. Borrou records the request and tells TFG; one TFG operator enters the return and a different one approves it, which sends the instruction to the custodian, or TFG declines it. A request TFG has not entered within 72 hours lapses, as does one the loan's position no longer allows. While it is open no increase can be requested. Refused like an increase request, with 409 increase_in_progress while an increase is open. Emits loan.surplus_return_requested.

Bearer token with scope surplus:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body

application/json SurplusReturnRequestCreate

Responses

StatusDescription
201Requested; TFG has been told.

application/json SurplusReturnRequest

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503price_unavailable: the BTC price could not be read, or (creating a loan) did not pass its checks. provider_unavailable: the KYC or e-signature provider did not answer; nothing was recorded. Retry after Retry-After. lender_of_record_not_configured (live mode): the lender of record is not set yet, so no loan is created and no contract issued; nothing was recorded, and no Retry-After applies: contact TFG.

application/json Error

get/v1/loans/{reference}/surplus-return-requests/{id}

One surplus-return request.

One surplus-return request, with its amount and status.

Bearer token with scope surplus:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)

Responses

StatusDescription
200The request.

application/json SurplusReturnRequest

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/surplus-return-requests/{id}/cancel

Withdraw a surplus-return request TFG has not entered.

409 surplus_return_not_cancellable once TFG has entered it or it has ended. Emits loan.surplus_return_request_ended.

Bearer token with scope surplus:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200Cancelled.

application/json SurplusReturnRequest

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/sandbox/increase-requests/{id}/code

Sandbox only: the one-time code Borrou emailed the borrower for an increase request.

The sandbox has no borrower to read the email, so this returns the request's current code to complete an acceptance with. Only on the partner sandbox (a service in sandbox mode on a sandbox database, with the simulated custodian and mock providers), with a SANDBOX credential of a sandbox partner holding sandbox:simulate, for one of your own requests: 403 sandbox_only otherwise. Sandbox codes are derived from a key the service holds rather than drawn at random; live, codes are random and nothing reads one back. 409 increase_not_open once the request no longer awaits the borrower; 409 otp_not_issued, 409 otp_used, 409 otp_expired or 409 otp_attempts_exhausted when there is no usable code (send one with resend-code). Every read is audited; the code never is.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)

Responses

StatusDescription
200The current code.

application/json SandboxIncreaseCode

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

collateral

get/v1/address-keys

The public keys collateral addresses are signed with (no authentication).

Ed25519 public keys, each with its key_id, as the 32 raw bytes in base64url (a JWK's x) and as an SPKI PEM. Every key listed verifies the addresses it signed; current_key_id signs new ones. A key is listed before it signs anything and stays listed while addresses it signed may still be shown, so cache the list (it is cacheable for 5 minutes) and fetch it again when an attestation names a key_id you do not hold. Unauthenticated on purpose: verifying an address must not depend on the credential of the systems being checked, and nothing here is secret or yours. It reads no partner data; it is limited per source address like every request.

No authentication.

Responses

StatusDescription
200The keys.

application/json AddressKeys

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/collateral

Deposits seen for the loan's collateral wallet, and the position against the required BTC.

Every deposit the custodian has reported, with its confirmations, screening and Travel Rule status and whether it was released to the loan (only a released deposit counts as collateral). The position is cumulative: a later deposit completes an earlier shortfall. tfg_review is TFG's go/no-go on an exceptional (short or late) deposit. On a cancelled loan, collateral_return follows the return of what was released, which TFG approves (two people) and the custodian executes to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your partner to it. No origin address and no custody reference are shown.

Bearer token with scope collateral:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The collateral status.

application/json CollateralStatus

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/collateral/deposit-address

Where the borrower sends the initial BTC collateral, from SIGNED_WALLET_READY until the loan is ACTIVE.

The loan's own collateral wallet at the custodian, issued when the contract was signed: never the borrower's custodian wallet, and never an address you supply. qr_payload is a BIP 21 payment URI for the amount still missing. Bitcoin carries no memo: memo is the loan reference, for the borrower's records, and nothing needs to travel with the transfer. address_attestation is Borrou's signature on the address: verify it before you show the address, and show its verification_code beside it (see Collateral address signatures). 409 deposit_address_unavailable before the signature, once the loan is ACTIVE (its collateral is then a top-up: GET /v1/loans/{reference}/collateral/top-up-address), after it has finished, or when the address cannot be confirmed: the wallet the custodian issued and the loan's own copy must both be there and agree, and Borrou's signature must verify against them. 409 address_verification_pending in live mode for an address that carries no signature.

Bearer token with scope collateral:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The deposit address.

application/json DepositAddress

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409deposit_address_unavailable: no deposit address at this stage, or it cannot be confirmed; send nothing and contact TFG. address_verification_pending: live mode, the address carries no signature; ask TFG for it.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/collateral/top-up-address

Where to send more collateral to an active loan (the wallet of the initial deposit).

The loan's collateral wallet at the custodian: the same address the initial deposit went to, never the borrower's own wallet, with the open margin call, if there is one, and the top-up it asks for. Only for an active loan not repaid in full, and only when the wallet's record and the loan's own copy of the address agree and Borrou's signature verifies against them (the check the deposit address makes); address_attestation carries the signature, as on the deposit address. Each read is recorded, without the address. In live mode an address without a signature is never served: 409 address_verification_pending.

Bearer token with scope collateral:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The top-up instructions.

application/json TopUpInstructions

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409loan_not_active: collateral is topped up on an active loan only. loan_repaid_in_full: repaid in full, its collateral going back; send nothing. deposit_address_unavailable: the address cannot be confirmed right now; send nothing and contact TFG. address_verification_pending: live mode, the address carries no signature (or none can be checked yet); ask TFG for it.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/release

The collateral's return after full repayment.

Due once a full repayment is confirmed (or, on a loan cancelled before its payout, once anything was received). Then AWAITING_APPROVAL until two different TFG users approve it, APPROVED once they have, until the instruction is with the custodian, INSTRUCTED while the custodian executes it, EXECUTED with the transaction hash. It goes to the borrower's wallet at the custodian, or to your settlement account there if TFG has set your partner to it (release.destination, by kind). Who approved it is never shown.

Bearer token with scope collateral:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The release status.

application/json CollateralRelease

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

repayments

get/v1/loans/{reference}/repayment-instructions

How to repay in full, in part (where the product allows) or the billed interest.

Amounts are what is owed today, today included. They hold only for a payment TFG records, entered and confirmed, before valid_until (the end of the UTC day): TFG judges a repayment full or partial against what is owed when it enters it, so a payment recorded the next day is about a day's interest short (full.next_day_amount_usdt, the next day's same figure). full.amount_usdt is what the loan owes at the last instant of the UTC day, the figure the borrower's loan page shows, so it covers an entry at any time until valid_until. On a loan accruing by the day that is what it owes now; on a bullet loan, which accrues each second, it includes the rest of the day's interest, and a borrower who pays earlier in the day pays up to that much more than is owed at the moment (how that difference is treated is to be confirmed). No other buffer is added. The destination is Borrou's USDT receiving address on the loan's network (in the sandbox a synthetic one, destination.synthetic: true, that no wallet sends to). A partial repayment is offered only if the product allows it (CURE_ONLY: while a margin call is open; ANY), in the range that leaves the loan at or above its initial margin at the checked price now, which TFG checks again when it enters and confirms the payment; it goes to interest first. The interest-only amount is withheld while a repayment or an interest payment awaits its second TFG user. Recording a payment stays with TFG, by two different people, and a payment is matched to the loan by its transaction hash; the payment reference identifies it when it is reported (USDT on these networks carries no memo).

Bearer token with scope repayments:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The repayment instructions.

application/json RepaymentInstructions

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409nothing_to_repay: the loan is not active, or has been repaid in full and waits only for its collateral to go back.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

503repayment_address_not_configured: Borrou has no USDT receiving address for the loan's network yet. Send nothing; contact TFG.

application/json Error

get/v1/loans/{reference}/repayments

Payments seen and recorded against the loan, and their status.

Repayments (full and partial) and interest payments, oldest first. PENDING_CONFIRMATION: TFG has entered it and a second TFG user has still to confirm it. A confirmed partial repayment shows how it was applied: interest first, then principal.

Bearer token with scope repayments:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The repayments.

application/json Repayments

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/loans/{reference}/repayments

Announce a repayment the borrower sent, by its transaction hash.

Proposed, to be confirmed by TFG; taken only where repayment detection is on (409 repayment_detection_off otherwise, not stored). Tell Borrou that the borrower sent a repayment: the transfer's hash and network, and the amount if you know it. Borrou records it beside what the custodian reports at the loan's receiving reference and sends repayment.seen; TFG sees it pre-filled on the loan. That is all: nothing is recorded as paid until a TFG person enters the repayment, with the custodian's check of the transfer, and a different TFG person approves it (repayment.applied, with loan.repayment_received). Only on an active loan (409 loan_not_active, stored). The same hash announced again on the loan with the same figures returns the record already there (200); with other figures, 409 repayment_announced_differently (stored). No address is taken.

Bearer token with scope loans:write.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json RepaymentAnnouncementRequest

Responses

StatusDescription
200The same announcement, already recorded.

application/json RepaymentAnnouncement

201The announcement, recorded.

application/json RepaymentAnnouncement

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

statements

get/v1/loans/{reference}/statements

The loan's monthly statements.

One per UTC calendar month, from the payout's month to the month the loan finished or the current one, which is provisional.

Bearer token with scope statements:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The statement periods.

application/json object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
data requiredarray of StatementSummary
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/loans/{reference}/statements/{period}

One monthly statement, as JSON.

The loan's lender of record (TO_BE_CONFIRMED until TFG has set it), opening and closing principal, interest accrued, billed, paid and unpaid, default interest, the payments, the collateral's movements, and coverage at the month's end on the collateral monitor's last checked price. The month's figures are the differences between the engine at its two ends, so consecutive statements chain exactly.

Bearer token with scope statements:read.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
period requiredpathstringA month in UTC, YYYY-MM.

Responses

StatusDescription
200The statement.

application/json Statement

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

webhooks

get/v1/webhooks/subscriptions

The partner's subscriptions, newest first.

Your subscriptions, newest first: each one's URL, event types and state. A signing secret is never listed: read it with GET /v1/webhooks/subscriptions/{id}/signing-secret.

Bearer token with scope webhooks:manage.

Responses

StatusDescription
200The subscriptions.

application/json object

FieldTypeDescription
data requiredarray of WebhookSubscription
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/webhooks/subscriptions

Register an HTTPS endpoint for events.

The URL must be https on port 443, carry no credentials, use a public DNS name, and resolve only to public addresses; it is checked again, after DNS resolution, on every send, and redirects are never followed: a URL that fails is 422 invalid_destination, saying which rule. At most 10 active subscriptions per partner; an eleventh is 422 invalid_request (stored). Fetch the signing secret with GET /v1/webhooks/subscriptions/{id}/signing-secret.

Bearer token with scope webhooks:manage.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json WebhookSubscriptionCreate

Responses

StatusDescription
201Created.

application/json WebhookSubscription

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

delete/v1/webhooks/subscriptions/{id}

Disable a subscription. Its pending deliveries are cancelled.

Disables the subscription: nothing more is delivered to it, its waiting deliveries are cancelled, and a replay of one of its deliveries is 409 subscription_inactive. Answers the same if it was already disabled.

Bearer token with scope webhooks:manage.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200Disabled (also returned if it already was).

application/json WebhookSubscription

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/webhooks/subscriptions/{id}/signing-secret

The HMAC-SHA256 secret that signs this subscription's deliveries.

Stored encrypted; decrypted only for this response and for signing. Not cached. Every read is recorded with the credential that made it, never the secret.

Bearer token with scope webhooks:manage.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)

Responses

StatusDescription
200The secret.

application/json object

FieldTypeDescription
subscription_id requiredstring (uuid)
signing_secret requiredstring
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/webhooks/health

Each subscription's delivery health over the last 24 hours.

For each of your subscriptions, newest first: its status, whether the latest attempt to it went through, the last delivery that did, the deliveries that failed in the last 24 hours (and of those, the ones given up after every attempt), and the oldest delivery still waiting. A delivery is counted once, by its latest attempt: one that failed and then went through is counted as delivered. Replay a delivery with POST /v1/webhooks/deliveries/{id}/replay, or read every event from GET /v1/events. Your console's Webhooks page shows the same figures. Borrou's own staff are alerted when a partner's deliveries keep failing.

Bearer token with scope webhooks:manage.

Responses

StatusDescription
200Health per subscription.

application/json WebhookHealth

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/v1/webhooks/deliveries

The delivery log, newest first.

Every delivery still waiting, and every other one queued in the last 30 days; older ones are removed. The events stay in GET /v1/events.

Bearer token with scope webhooks:manage.

Parameters

NameInTypeDescription
subscription_idquerystring (uuid)
statusqueryWebhookDeliveryStatus
limitqueryinteger

Responses

StatusDescription
200Deliveries.

application/json object

FieldTypeDescription
data requiredarray of WebhookDelivery
400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/webhooks/deliveries/{id}/replay

Send an event again.

Queues a new delivery of the same event (same event_id) to the same subscription, which must still be active (409 subscription_inactive otherwise, stored). The original delivery keeps its own history. At most 100 replays per partner per hour; beyond that 429 rate_limited with Retry-After, not stored under the Idempotency-Key, so the same request succeeds once the hour has moved on.

Bearer token with scope webhooks:manage.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
202Queued.

application/json WebhookDelivery

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

events

  • GET /v1/events Your events in the order Borrou published them, the same ones the webhooks carry, each with its position.
get/v1/events

Your events in the order Borrou published them, the same ones the webhooks carry, each with its position.

Every event about your applications, borrowers and loans, in the order Borrou's relay published them: the same event a webhook for it carries, field for field (id, type, occurred_at, created_at and data), plus its position. Use it to recover what an endpoint missed: pass the position of the last event you processed as after, or the next_cursor of the previous page. Events are kept for as long as Borrou's outbox keeps them, which today is indefinitely.

Positions only grow, and an event is never published behind a position you have already read: polling from your last position misses nothing. The gaps between positions are other partners' events and types you did not ask for. An event appears here once the relay has published it (usually within a minute); one the relay set aside appears, once TFG replays it, after everything published meanwhile, with its id unchanged. A partner the webhooks would send nothing to (disabled, an access mode without the API) reads nothing here either.

Bearer token with scope events:read.

Parameters

NameInTypeDescription
afterqueryintegerA position: the position of the last event you processed, or the next_cursor of a previous page. From the first event when absent or 0. An event id is not a cursor.
typesquerystringComma-separated event types to keep; every type when absent.
limitqueryinteger

Responses

StatusDescription
200A page of events.

application/json EventPage

400invalid_request: the request is malformed; the message names the field or parameter.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

sandbox

get/v1/sandbox/loans/{reference}/contract/acceptance-code

Sandbox only: the one-time code Borrou emailed the borrower to accept a click-wrap contract.

The sandbox has no borrower to read the email, so this returns the loan's current code to complete POST .../contract/accept with. Only on the partner sandbox, with a SANDBOX credential of a sandbox partner holding sandbox:simulate, for one of your own loans: 403 sandbox_only otherwise. Sandbox codes are derived from a key the service holds rather than drawn at random; live, codes are random and nothing reads one back. 409 contract_not_awaiting_acceptance when the contract does not await acceptance or there is no usable code (send one with POST .../contract/acceptance-code). Every read is audited; the code never is.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.

Responses

StatusDescription
200The current code.

application/json object

FieldTypeDescription
loan_reference requiredstring
otp requiredstring
expires_at requiredstring (date-time)
attempts_left requiredinteger
401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/applications/{id}/kyc

Sandbox: the borrower completes KYC and TFG decides the file.

After your KYC hand-off (POST /v1/applications/{id}/kyc-handoff), simulates the borrower finishing the KYC provider's checks (green for APPROVE, red for REJECT), recorded as the provider's result is, which sends the file to TFG (kyc.completed); then TFG's decision by the sandbox's simulated reviewer, through TFG's own review checks. A reliance hand-off's file is already with TFG and goes straight to the decision. On approval the borrower's wallet at the simulated custodian is requested, as TFG's approval does. Sends kyc.status_changed and application.approved or application.rejected. Without a hand-off it answers 409 sandbox_step_unavailable. Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json SandboxKycDecision

Responses

StatusDescription
200The application, decided.

application/json Application

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/loans/{reference}/sign

Sandbox: the borrower signs the contract.

Simulates the borrower signing at the e-signature provider; the signature is recorded as a real one is, and the loan's collateral wallet is opened at the simulated custodian (contract.signed, collateral.wallet_assigned). The loan must be CONTRACT_SENT: issue the contract first with POST /v1/loans/{reference}/contract. Otherwise, and for a contract accepted with a one-time code, 409 sandbox_step_unavailable saying what it waits for. Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200Signed.

application/json SandboxResult

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/loans/{reference}/deposit

Sandbox: a BTC deposit into the loan's collateral wallet.

A deposit at the simulated custodian, screened clear, with the confirmations (the custodian's requirement when absent) and Travel Rule status you give; or, with deposit_id, one already reported moved on. It reaches the loan through the custody sync, as a real deposit does, before this answers: classification, Travel Rule holds and the go/no-go are what production runs. A top-up on an ACTIVE loan is a deposit too. A loan that takes no deposit as it stands is 409 sandbox_step_unavailable, saying why. Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json SandboxDeposit

Responses

StatusDescription
200Deposited at the simulated custodian, and synced.

application/json SandboxResult

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/loans/{reference}/advance

Sandbox: run TFG's and the custodian's side of the loan's payout, or of its collateral's return.

At COLLATERAL_DEPOSITED, the payout. In production it takes two TFG people on the console: one enters it and a different one approves it, which sends the instruction to the custodian. On Borrou's sandbox this enters and approves it as the sandbox's two simulated TFG users, one each, through the same two-person checks, then simulates the custodian approving and executing it, and the custody sync confirms it → ACTIVE. If a TFG person has already entered the payout, it waits for a second TFG person to approve it on the console, answering 409 sandbox_step_unavailable until the instruction is with the custodian, and then plays only the custodian. A sandbox without simulated approvals waits for TFG the same way.

It never issues the contract (POST /v1/loans/{reference}/contract is yours, as in production). Any other status is waiting for you, the borrower or collateral, and answers 409 sandbox_step_unavailable saying what it waits for. The payout goes only to the borrower's wallet at the custodian, or to your settlement account there if TFG has set your partner to it: where the borrower's wallet is needed and not active yet, nothing is paid and nothing is approved.

On an ACTIVE loan repaid in full (proposed, may change), the collateral's return: two TFG people and the custodian in production; on Borrou's sandbox, the two simulated TFG users and the simulated custodian (COLLATERAL_RETURN_ENTERED, COLLATERAL_RETURN_APPROVED, CUSTODIAN_EXECUTED), and the custody sync closes the loan → CLOSED. An active loan that is not repaid answers 409 sandbox_step_unavailable. Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200The steps run, and the loan after them.

application/json SandboxResult

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/loans/{reference}/repayment

Sandbox: play the full repayment of an active loan.

Proposed, may change. Makes the borrower's USDT arrive at Borrou's receiving wallet at the simulated custodian, for the full amount GET /v1/loans/{reference}/repayment-instructions quotes (what the loan owes at the end of this UTC day), under a transaction hash shaped like one: nothing moves. In production a TFG person then enters the repayment from that hash and a different one confirms it, past the check of the transfer with the custodian.

On Borrou's sandbox the sandbox's two simulated TFG users take those two steps, one each, through the same two-person checks (steps reads TRANSFER_SEEN, REPAYMENT_ENTERED, REPAYMENT_CONFIRMED): the loan is then repaid in full, and POST /v1/sandbox/loans/{reference}/advance plays its collateral's return. A sandbox without those simulated approvals answers TRANSFER_SEEN alone, and the repayment waits for two TFG people: give your TFG contact the loan's reference and the tx_hash this answers.

Refused with 409 sandbox_step_unavailable, saying why, for a loan that is not active, is already repaid, has a repayment waiting for its second approver, or is being liquidated. Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
reference requiredpathstringThe loan reference, for example LN-0042.
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Responses

StatusDescription
200The steps run, the transfer played, and the loan after them.

application/json SandboxResult

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

404not_found: no such resource for this partner.

application/json Error

409The loan, application or request is not in a state that allows this; retrying it unchanged gets the same answer. The operation's description names its codes, and the error codes guide says what each means and whether it is stored under the Idempotency-Key.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

post/v1/sandbox/prices

Sandbox: move the simulated BTC price for your loans.

Sets the base of the simulated price sources for your partner's own feed. Your quotes, applications, loans and coverage use it from now on; the collateral monitor and the upper-limit job judge your loans on it from their next run, through the same price checks and a circuit breaker of its own. No other partner's loans move with it. One step moves the price by less than the checks' move band from the price they last accepted (422 price_move_out_of_band with the range otherwise); move further in steps, one per price check (about a minute). Sandbox only.

Bearer token with scope sandbox:simulate.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringUnique per partner per distinct write. Generate a UUID per request. The same key with the same request answers what the first answered, a stored refusal included, with Idempotent-Replayed: true.

Request body (required)

application/json SandboxPriceSet

Responses

StatusDescription
200The price your loans are judged on from the next check.

application/json SandboxPrice

400invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.

application/json Error

401invalid_token: missing, invalid, expired or revoked access token.

application/json Error

403insufficient_scope: the token does not carry the scope this operation needs. reliance_not_approved: TFG has not approved your partner for KYC reliance, or does not yet let a reliance attestation stand for its identity checks. partner_kyc_not_accepted: TFG has not set your partner to send its own KYC evidence. sandbox_only: a sandbox simulator called outside the sandbox, with a credential other than a SANDBOX one, or for a partner other than a sandbox partner.

application/json Error

422Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes; and idempotency_key_mismatch when the Idempotency-Key was already used with another request.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

service

  • GET /health Liveness check for the platform (no authentication, no database round trip).
  • GET / The developer portal's landing page (no authentication; proposed, may change).
  • GET /guides/{slug} One partner guide as an HTML page (no authentication; proposed, may change).
  • GET /snippets The code samples, as one HTML page (no authentication; proposed, may change).
  • GET /snippets/{dir}/{file} One code sample or test vector, as it is (no authentication; proposed, may change).
  • GET /llms.txt An index of the documentation for coding agents (no authentication; proposed, may change).
  • GET /docs This contract as one reference page (no authentication; proposed, may change).
  • GET /openapi.yaml This contract, as the OpenAPI 3.1 document (no authentication; proposed, may change).
get/health

Liveness check for the platform (no authentication, no database round trip).

Answers {"status": "ok"} while the process serves requests. No authentication and no database round trip: a slow database shows as failing requests, not as a failing check.

No authentication.

Responses

StatusDescription
200The process is serving requests.

application/json object

FieldTypeDescription
status requiredstring ok
500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/

The developer portal's landing page (no authentication; proposed, may change).

The entry to Borrou's partner documentation: what the API does, how a loan runs, the conventions every endpoint keeps, and links to the guides, this reference and this document. One HTML page with no script and nothing loaded from elsewhere. Served only where Borrou publishes its documentation; elsewhere 404 not_found.

No authentication.

Responses

StatusDescription
200The landing page.

text/html string

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/guides/{slug}

One partner guide as an HTML page (no authentication; proposed, may change).

The guides handed to partners, each as one page of the developer portal: the integration guide, the sandbox quick-starts, the integration rules, the error codes, address verification, the sandbox, versioning and the changelog. No script and nothing loaded from elsewhere. A slug that is not a guide is a 404 page of the portal. Served only where Borrou publishes its documentation; elsewhere 404 not_found.

No authentication.

Parameters

NameInTypeDescription
slug requiredpathstring: integration-guide, quickstart, channel-flow, integration-rules, errors, address-verification, sandbox, versioning, changelog

Responses

StatusDescription
200The guide.

text/html string

404No such guide (a page of the portal), or the documentation is not published here (not_found).

text/html string

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/snippets

The code samples, as one HTML page (no authentication; proposed, may change).

The partner snippets by folder (TypeScript, Python, Java) and the test vectors, each linked to its text. No script and nothing loaded from elsewhere. Served only where Borrou publishes its documentation; elsewhere 404 not_found.

No authentication.

Responses

StatusDescription
200The page.

text/html string

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/snippets/{dir}/{file}

One code sample or test vector, as it is (no authentication; proposed, may change).

The file byte for byte: text/plain for code, application/json for a test vector. The test vectors' secrets and keys are test values: they sign nothing real. A file that is not served is a 404 page of the portal. Served only where Borrou publishes its documentation; elsewhere 404 not_found.

No authentication.

Parameters

NameInTypeDescription
dir requiredpathstring: typescript, python, java, fixtures
file requiredpathstring

Responses

StatusDescription
200The file.

text/plain string

application/json object

404No such file (a page of the portal), or the documentation is not published here (not_found).

text/html string

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/llms.txt

An index of the documentation for coding agents (no authentication; proposed, may change).

The llms.txt convention: what the API is, then a list of the guides and this document with their paths on this host. Plain text. Served only where Borrou publishes its documentation; elsewhere 404 not_found.

No authentication.

Responses

StatusDescription
200The index.

text/plain string

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/docs

This contract as one reference page (no authentication; proposed, may change).

A single HTML page rendered from this document: every operation with its parameters, request body and responses, the schemas, the webhook events and the error codes. Self-contained: no script, no external font, stylesheet or image. Served only where Borrou publishes the contract; elsewhere 404 not_found. It reads no partner data and is limited per source address like every request.

No authentication.

Responses

StatusDescription
200The reference page.

text/html string

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

get/openapi.yaml

This contract, as the OpenAPI 3.1 document (no authentication; proposed, may change).

The document the service is built and tested against, byte for byte, for code generators and API tools. X-Contract-Version is its info.version. A request that accepts text/html (a browser) gets the same bytes as text/plain, which a browser shows rather than downloads. Served only where Borrou publishes the contract; elsewhere 404 not_found.

No authentication.

Responses

StatusDescription
200The OpenAPI document.

application/yaml string

text/plain string

404not_found: no such resource for this partner.

application/json Error

429rate_limited: the partner's per-minute budget, the token endpoint's per-client budget, the per-address limit, or the borrower's one-time codes an hour (an increase's or a contract's).

application/json Error

500internal_error: something went wrong on Borrou's side and nothing was saved. Retry with the same Idempotency-Key; quote X-Request-Id to TFG if it persists.

application/json Error

Webhook events

Each event is sent as a signed POST to your subscription's URL, and is also in GET /v1/events.

EventDataNote
application.submittedApplicationEventData
application.approved minimum setApplicationEventData
application.rejected minimum setApplicationEventData
application.cancelledApplicationEventData
kyc.startedKycEventDataYou started KYC for an application's borrower (POST /v1/applications/{id}/kyc-handoff).
kyc.completedKycEventDataThe borrower finished the KYC provider's flow and the file moved on (to TFG, for a hand-off through the API). Never the provider's answer.
kyc.status_changedKycEventDataTFG's decision on the borrower's file in its review, more information requested included.
client.wallet_activeClientWalletEventData
client.wallet_closedClientWalletEventData
loan.createdLoanEventData
contract.sentContractEventDataThe contract was issued (POST /v1/loans/{reference}/contract, or on the console). GET /v1/loans/{reference}/contract has the signing link.
contract.signedLoanStatusEventData
contract.expiredContractEventDataA contract sent and never signed, its loan cancelled. Beside loan.cancelled.
collateral.wallet_assignedLoanEventData
collateral.deposit_received minimum setDepositEventData
collateral.deposit_heldDepositEventDataHeld by the custodian and not counted as collateral. Never why.
collateral.deposit_released minimum setDepositEventData
collateral.requirement_metLoanStatusEventData
loan.activated minimum setLoanStatusEventData
loan.disbursedMoneyEventData
loan.state_changedLoanStatusEventDataEvery transition, after the transition's own event where it has one.
loan.coverage_warning minimum setCoverageEventData
loan.margin_call_issued minimum setMarginCallEventData
loan.margin_call_cured minimum setMarginCallEventData
loan.margin_call_extendedMarginCallEventDataTFG extended an open call's deadline; the borrower is told the new one.
loan.margin_call_expiredMarginCallEventData
loan.liquidation_levelCoverageEventData
loan.upper_limit_reachedUpperLimitEventData
loan.interest_billedInterestEventData
loan.interest_overdueInterestEventData
loan.interest_paidMoneyEventData
loan.repayment_received minimum setMoneyEventData
loan.partial_repayment_appliedMoneyEventData
repayment.seenRepaymentEventDataProposed: a repayment transfer the custodian saw at the loan's receiving reference, or one you announced. Nothing is recorded as paid yet.
repayment.appliedMoneyEventDataProposed: the repayment is done, entered and approved by two TFG people; sent with loan.repayment_received, the same data.
repayment.shortRepaymentEventDataProposed: a detected transfer below what the loan owed, on a product that takes no partial repayment; it cannot be entered as the repayment.
loan.maturity_approachingMaturityEventDataA bullet loan matures soon; the borrower was reminded a week and a day before.
loan.maturity_defaultedMaturityEventDataA bullet loan was not repaid at its maturity; the event of default (non-payment) is recorded. Nothing is sold or moved on it.
loan.increase_offeredIncreaseEventData
loan.increase_acceptedIncreaseEventData
loan.increasedMoneyEventData
loan.increase_expiredIncreaseEventData
loan.increase_cancelledIncreaseEventData
loan.surplus_return_requestedSurplusRequestEventDataThe borrower's surplus-return request, made through POST /v1/loans/{reference}/surplus-return-requests.
loan.surplus_return_request_enteredSurplusRequestEventDataTFG entered the return, which waits for a second TFG approver; loan.surplus_collateral_returned once the custodian has executed it.
loan.surplus_return_request_endedSurplusRequestEventDataCancelled by you, declined by TFG, or expired, without a return entered.
loan.surplus_collateral_returnedMoneyEventData
loan.collateral_released minimum setMoneyEventData
loan.liquidation_started minimum setLiquidationEventDataOne per order sent to the execution route; a remainder that did not fill is a new order, so it can repeat for one loan.
loan.liquidation_order_filledLiquidationEventData
loan.liquidation_completed minimum setLiquidationEventData
loan.shortfall_recordedLiquidationEventData
loan.terms_amendment_scheduledTermsEventDataThe 30-day notice; the new ladder applies from effective_at.
loan.terms_amendedTermsEventData
loan.closedLoanEventData
loan.cancelledLoanStatusEventData

Error codes

Every error has the body { "error": { "code", "message", "request_id" } }. Branch on code, never on message. What each one means and what to do: Error codes.

  • invalid_request
  • invalid_client
  • unsupported_grant_type
  • invalid_scope
  • invalid_token
  • insufficient_scope
  • not_found
  • unsupported_media_type
  • payload_too_large
  • idempotency_key_required
  • idempotency_key_mismatch
  • amount_above_limit
  • amount_below_minimum
  • product_unavailable
  • duplicate_external_reference
  • borrower_mismatch
  • application_not_cancellable
  • application_not_approved
  • application_not_open
  • exposure_limit_reached
  • network_not_accepted
  • destination_not_accepted
  • payout_destination_required
  • collateral_return_destination_required
  • destination_address_invalid
  • quant_platform_unavailable
  • invalid_destination
  • subscription_inactive
  • price_unavailable
  • rate_limited
  • sandbox_only
  • internal_error
  • kyc_handoff_not_open
  • reliance_not_approved
  • contract_not_issuable
  • contract_not_awaiting_signature
  • deposit_address_unavailable
  • loan_not_cancellable
  • invalid_quote_token
  • quote_expired
  • quote_mismatch
  • quote_terms_changed
  • provider_unavailable
  • kyc_link_not_replayable
  • loan_not_active
  • nothing_to_repay
  • repayment_address_not_configured
  • loan_repaid_in_full
  • address_verification_pending
  • upper_limit_unavailable
  • increase_in_progress
  • surplus_return_in_progress
  • increase_not_open
  • increase_expired
  • increase_not_cancellable
  • surplus_return_not_cancellable
  • acceptance_text_mismatch
  • acceptance_text_outdated
  • invalid_accepted_at
  • otp_not_issued
  • otp_invalid
  • otp_expired
  • otp_used
  • otp_attempts_exhausted
  • sandbox_step_unavailable
  • price_move_out_of_band
  • lender_of_record_not_configured
  • country_not_accepted
  • borrower_not_eligible
  • sandbox_test_email_required
  • contract_not_awaiting_acceptance
  • contract_document_mismatch
  • acceptance_code_rejected
  • legal_clearance_pending
  • partner_kyc_not_accepted
  • kyc_evidence_not_accepted
  • repayment_detection_off
  • repayment_announced_differently
  • asset_not_accepted
  • collateral_announcement_not_taken
  • collateral_transfer_already_announced

Schemas

Error

object

FieldTypeDescription
error requiredobject
error.code requiredstring: invalid_request, invalid_client, unsupported_grant_type, invalid_scope, invalid_token, insufficient_scope, not_found, unsupported_media_type, payload_too_large, idempotency_key_required, idempotency_key_mismatch, amount_above_limit, amount_below_minimum, product_unavailable, duplicate_external_reference, borrower_mismatch, application_not_cancellable, application_not_approved, application_not_open, exposure_limit_reached, network_not_accepted, destination_not_accepted, payout_destination_required, collateral_return_destination_required, destination_address_invalid, quant_platform_unavailable, invalid_destination, subscription_inactive, price_unavailable, rate_limited, sandbox_only, internal_error, kyc_handoff_not_open, reliance_not_approved, contract_not_issuable, contract_not_awaiting_signature, deposit_address_unavailable, loan_not_cancellable, invalid_quote_token, quote_expired, quote_mismatch, quote_terms_changed, provider_unavailable, kyc_link_not_replayable, loan_not_active, nothing_to_repay, repayment_address_not_configured, loan_repaid_in_full, address_verification_pending, upper_limit_unavailable, increase_in_progress, surplus_return_in_progress, increase_not_open, increase_expired, increase_not_cancellable, surplus_return_not_cancellable, acceptance_text_mismatch, acceptance_text_outdated, invalid_accepted_at, otp_not_issued, otp_invalid, otp_expired, otp_used, otp_attempts_exhausted, sandbox_step_unavailable, price_move_out_of_band, lender_of_record_not_configured, country_not_accepted, borrower_not_eligible, sandbox_test_email_required, contract_not_awaiting_acceptance, contract_document_mismatch, acceptance_code_rejected, legal_clearance_pending, partner_kyc_not_accepted, kyc_evidence_not_accepted, repayment_detection_off, repayment_announced_differently, asset_not_accepted, collateral_announcement_not_taken, collateral_transfer_already_announcedStable. New codes may be added.
error.message requiredstringFor people. May change.
error.request_id requiredstring (uuid)

UsdtAmount

string

BtcAmount

string

DepositTolerance

The loan's own deposit tolerance, fixed when the loan was created: the cumulative deposit may fall short of required_btc by up to short_by_up_to_btc and still count. A larger shortfall, or a deposit after the window, waits for TFG's review. More than required_btc is kept as collateral buffer, not returned. Show it beside the amount you ask the borrower for.

object

FieldTypeDescription
bps requiredBpsThe tolerance in basis points of required_btc (50 = 0.5%).
short_by_up_to_btc requiredBtcAmountbps of required_btc, rounded down to the satoshi.

UsdAmount

string

Bps

integer

Reference

string

TokenRequest

object

FieldTypeDescription
grant_type requiredstring client_credentials
scopestringSpace-separated subset of the credential's scopes. Defaults to all of them.
client_idstring
client_secretstring

TokenResponse

object

FieldTypeDescription
access_token requiredstringOpaque. Send it as Authorization: Bearer <token>; never parse or verify it.
token_type requiredstring Bearer
expires_in requiredinteger
scope requiredstring

InterestTerms

Simple interest, never compounded. With periodic interest (accrual: DAILY_ACT_360) it accrues daily, actual/360, on the principal outstanding that day, from the day after the payout up to and including today; it is billed per calendar period and payable within payable_days_after_period days of its end, and billed interest unpaid after that bears the loan rate plus default_interest_margin_bps. The principal is repaid at closure, or in part where partial_repayments allows. A bullet loan (accrual: SECOND_ACT_360) accrues by the second from the payout's done instant, is billed nothing (its period and payable_days_after_period are null), and is repaid with its interest by the maturity.

object

FieldTypeDescription
method requiredstring SIMPLE
accrual requiredstring: DAILY_ACT_360, SECOND_ACT_360DAILY_ACT_360 with periodic interest; SECOND_ACT_360 for a bullet loan: the rate × seconds / (360 × 86,400), from the payout's done instant, nothing billed, due with the principal at the maturity, and from the maturity the whole debt bears the rate plus default_interest_margin_bps.
period requiredstring or null: MONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL, The billing period; null for a bullet loan.
payable_days_after_period requiredinteger or nullNull for a bullet loan.
default_interest_margin_bps requiredBps

RepaymentProfile

PERIODIC (interest billed per calendar period, no maturity) or BULLET (a fixed term; principal and interest repaid together, at any time up to the maturity).

string: PERIODIC, BULLET

AccrualBasis

How interest accrues. DAILY_ACT_360 goes with PERIODIC, SECOND_ACT_360 with BULLET.

string: DAILY_ACT_360, SECOND_ACT_360

PartialRepayments

Whether the principal can be repaid in part before closure, and when (CURE_ONLY to cure a margin call).

string: NONE, CURE_ONLY, ANY

Ladder

The coverage ladder. Collateralisation (collateral value ÷ principal plus accrued interest) is what decides, compared exactly: a loan at exactly margin_call_collateral_bps is at the margin-call level. The *_ltv_bps fields are the same levels as LTV, rounded to whole bps, for display. The warning level is optional.

object

FieldTypeDescription
ltv_basis requiredstring PRINCIPAL_PLUS_INTERESTThe debt every level is measured against.
initial_margin_collateral_bps requiredBps
warning_collateral_bps requiredinteger or null
margin_call_collateral_bps requiredBps
liquidation_collateral_bps requiredBps
warning_ltv_bps requiredinteger or null
margin_call_ltv_bps requiredBps
liquidation_ltv_bps requiredBps
cure_rule requiredstring: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGINWhat closes a margin call on price alone.
margin_call_cure_hours requiredinteger
upper_limit_collateral_bps requiredBpsAt or above it TFG may offer the borrower more principal, back down to the initial margin.

Quote

object

FieldTypeDescription
principal_usdt requiredUsdtAmount
btc_price_usd requiredUsdAmount
price_fetched_at requiredstring (date-time)
price_divergence_flagged requiredbooleanThe price sources diverged and the lower price was used.
required_collateral_btc requiredBtcAmount
collateral_ratio_bps requiredBps
opening_ltv_bps requiredBps
annual_rate_bps requiredBps
interest requiredInterestTerms
partial_repayments requiredPartialRepayments
repayment_profile requiredRepaymentProfile
term_days requiredinteger or nullA bullet loan's term in whole days, from the payout to the maturity; null with periodic interest.
accrual_basis requiredAccrualBasis
fees requiredarray of objectFees the product type has configured; none today.
fees[].kind requiredstring: ORIGINATION, LIQUIDATION
fees[].bps requiredBps
ladder requiredLadder
deposit_window_hours requiredinteger
limits requiredobject
limits.min_loan_usdt requiredUsdtAmount
limits.max_loan_usdt requiredUsdtAmount
limits.min_principal_usdt requiredUsdtAmountThe same as min_loan_usdt, under the name the product's limits use.
limits.max_principal_usdt requiredUsdtAmountThe same as max_loan_usdt, under the name the product's limits use.
parameter_source requiredstring PRODUCT_TYPE
product_type_id requiredstring (uuid)
product requiredProductCode
indicative requiredbooleanTrue unless the token pins the price (price_pinned); then the collateral is the loan's while the quote lasts.
price_pinned requiredbooleanWhether quote_token also pins this checked price for POST /v1/loans (a deployment setting; an open decision, off unless set).
quoted_at requiredstring (date-time)
quote_token requiredstringPins this quote's product terms and principal for POST /v1/loans until quote_expires_at, and the price as well when price_pinned is true. Opaque, like an access token.
quote_expires_at requiredstring (date-time)

ApplicationStatus

string: SUBMITTED, IN_REVIEW, APPROVED, REJECTED, CANCELLED, LOAN_CREATED

ApplicationCreate

object

FieldTypeDescription
principal_usdt requiredUsdtAmount
external_referenceReferenceYour id for the application. Unique per partner.
borrower requiredobjectWrite-only. Never returned, never sent in webhooks. Identity documents are not accepted here.
borrower.referenceReferenceYour id for the borrower. Returned.
borrower.full_name requiredstring
borrower.email requiredstring (email)
borrower.country requiredstringThe borrower's country of residence, ISO 3166-1 alpha-2. Required: TFG's review checks it against your product's countries, the countries your agreement with TFG covers, and TFG's block-list (422 country_not_accepted, stored). A returning borrower keeps the country on file; one sent now fills it only when none is on file.
kyc_evidenceKycEvidenceCreate

KycEvidenceCreate

Your own KYC's result for this borrower (proposed, pending TFG). References only: never a document or its bytes. Only for a partner TFG has set to accept it.

object

FieldTypeDescription
provider_name requiredstringThe KYC provider you used.
applicant_reference requiredstringYour provider's reference for the borrower.
checks requiredarray of objectThe checks that passed, each once, with the calendar day it passed (not in the future).
checks[].check requiredstring: IDENTITY_DOCUMENT, LIVENESS, SCREENING, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS
checks[].passed_on requiredstring (date)
documentsarray of objectReferences to the documents you hold, which TFG may ask for. Never the documents.
documents[].kind requiredstring: IDENTITY_DOCUMENT, SELFIE, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS, OTHER
documents[].reference requiredstring
residence_country requiredstringThe country your checks established; must equal borrower.country.
attestation_version requiredstring partner-kyc-attestation-v0.1-draftThe version of TFG's attestation text you attest. Borrou stores it with the text's SHA-256.

ApplicationCancel

object

FieldTypeDescription
reason requiredstring: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER

Application

object

FieldTypeDescription
id requiredstring (uuid)
external_reference requiredstring or null
client_id requiredstring (uuid)The borrower as your client (GET /v1/clients/{id}), shared by its applications.
borrower requiredobject
borrower.reference requiredstring or null
principal_usdt requiredUsdtAmount
status requiredApplicationStatus
status_changed_at requiredstring (date-time)When status last changed: the cancellation or the loan's creation; before either, when the borrower's KYC file last moved (sent to TFG for review, or TFG's decision), and never before the application was submitted.
kyc_evidenceobjectPresent only when you sent kyc_evidence with the application (on creation, and on GET /v1/applications/{id}): what Borrou recorded, by reference, and what the borrower still completes with Borrou's KYC provider, read now on a GET.
kyc_evidence.id requiredstring (uuid)
kyc_evidence.checks requiredarray of object
kyc_evidence.checks[].check requiredstring: IDENTITY_DOCUMENT, LIVENESS, SCREENING, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS
kyc_evidence.checks[].passed_on requiredstring (date)
kyc_evidence.tier_one_accepted requiredbooleanThe same as identity_checks_accepted; kept for integrations that read it.
kyc_evidence.identity_checks_accepted requiredbooleanWhether your evidence stands for the identity checks (document, liveness, screening), so the borrower does not repeat them with Borrou's KYC provider.
kyc_evidence.attestation_version requiredstring
kyc_evidence.attestation_sha256 requiredstring
kyc_evidence.checks_left_for_provider requiredarray of stringWhat the borrower still completes with Borrou's KYC provider (a KYC hand-off, mode PROVIDER).
kyc_evidence.created_at requiredstring (date-time)
quote requiredobjectThe indicative quote at submission.
quote.btc_price_usdUsdAmount
quote.price_fetched_atstring (date-time)
quote.annual_rate_bpsBps
quote.collateral_ratio_bpsBps
quote.opening_ltv_bpsBps
quote.required_collateral_btcBtcAmount
quote.parameter_sourcestring PRODUCT_TYPE
quote.product_type_idstring (uuid)
quote.indicativeboolean true
loan_reference requiredstring or nullSet once the application has become a loan.
cancellation_reason requiredstring or null: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER,
cancelled_at requiredstring or null (date-time)
created_at requiredstring (date-time)
updated_at requiredstring (date-time)

KycHandoffRequest

object or object

One of: object, object

FieldTypeDescription
mode requiredstring PROVIDER
FieldTypeDescription
mode requiredstring RELIANCE
reliance requiredobjectReferences only; no documents and no personal data.
reliance.attestation_reference requiredstringYour reference for the KYC file you hold.
reliance.provider_name requiredstringThe KYC provider you used.
reliance.completed_on requiredstring (date)When your KYC was completed; not in the future.

KycHandoff

object

FieldTypeDescription
id requiredstring (uuid)
application_id requiredstring (uuid)
client_id requiredstring (uuid)
mode requiredstring: PROVIDER, RELIANCE
kyc_status requiredKycStatus
link requiredobject or nullPROVIDER only, and only in the first answer. Short-lived; Borrou's identity verification page, to open for the borrower in your app. Borrou does not keep it.
link.url requiredstring (uri)
link.expires_at requiredstring (date-time)
reliance requiredobject or nullRELIANCE only. What you attested, as Borrou keeps it.
reliance.attestation_referencestring
reliance.provider_namestring
reliance.completed_onstring (date)
created_at requiredstring (date-time)

LoanCreate

No principal (the application's amount), no collateral amount (quoted from the product type) and no destination: payouts and collateral returns go only to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your partner to it. An address field is refused with 422 destination_not_accepted, payout and collateral_return included: they are for a product that takes an address from the partner, which is not offered.

object

FieldTypeDescription
application_id requiredstring (uuid)One of your applications, in status APPROVED.
collateral_sender requiredstring: CLIENT, FINTECHWho sends the BTC collateral.
usdt_network requiredstringThe USDT network of the payout: one of the configured networks (today: TRON (TRC-20), Ethereum (ERC-20)), and accepted by the product type.
quote_tokenstringFrom GET /v1/quote: holds the loan to that quote's product terms.
payoutobjectNot offered. Only for a product whose destinations.payout is PARTNER_PROVIDED_ADDRESS, which no product is: the borrower's own account with you.
payout.assetstring: USDT, USDCThe loan's payout asset.
payout.network requiredstringThe loan's usdt_network.
payout.address requiredstringAn address on that network; TRON's and EIP-55 checksums are verified.
collateral_returnobjectNot offered. Only for a product whose destinations.collateral_return is PARTNER_PROVIDED_ADDRESS, which no product is.
collateral_return.network requiredstring: Bitcoin
collateral_return.address requiredstringA Bitcoin mainnet address.

LoanStatus

string: LOAN_CREATED, CONTRACT_SENT, SIGNED_WALLET_READY, COLLATERAL_DEPOSITED, ACTIVE, CLOSED, LIQUIDATED, REJECTED, CANCELLED

HealthFlag

Set only while the loan is ACTIVE and not repaid in full (repaid_in_full).

string or null: HEALTHY, WARNING, MARGIN_CALL, LIQUIDATION_LEVEL,

Loan

object

FieldTypeDescription
id requiredstring (uuid)
reference requiredstring
application_id requiredstring or null (uuid)The application it was created from; null for a loan created in the console.
status requiredLoanStatus
health_flag requiredHealthFlag
repaid_in_full requiredbooleanTrue for an ACTIVE loan whose full repayment is confirmed: it waits only for its collateral to go back, owes nothing and has no band (health_flag is null); next_action says where the return stands. False otherwise.
principal_usdt requiredUsdtAmountThe principal outstanding, after any increase or partial repayment.
annual_rate_bps requiredBps
interest requiredInterestTerms
partial_repayments requiredPartialRepayments
repayment_profile requiredRepaymentProfile
term_days requiredinteger or nullA bullet loan's term in whole days, from the payout to the maturity; null with periodic interest.
accrual_basis requiredAccrualBasis
risk_policies requiredRiskPolicies
operatingOperatingSettings
collateral_ratio_bps requiredBps
channel requiredstring: WHITE_LABEL, API, DIRECT, INSTITUTIONAL
product_type_id requiredstring (uuid)
productstring or nullThe product's code (GET /v1/products/{code}).
ladder requiredLadderThe loan's own ladder, copied from its product type at creation and changed only by a threshold amendment TFG approved and gave the borrower notice of.
required_collateral_btc requiredstringFixed at creation; never recalculated.
origination_btc_price_usd requiredUsdAmount
origination_price_fetched_at requiredstring (date-time)
collateral_sender requiredstring: CLIENT, FINTECH
usdt_network requiredstring
principal_assetstring: USDT, USDCThe stablecoin the principal is paid out and repaid in, fixed at creation. USDT unless the product pays the borrower's region in another (proposed, may change). The *_usdt amounts are in this asset.
deposit_window_hours requiredintegerThe deposit window opens at signature.
borrower_wallet requiredobjectThe borrower's wallet at the custodian, where the payout and the collateral's return go (unless TFG has set your partner to its settlement account, where they go instead and this wallet is not needed for them). Opened when TFG approves the borrower; shown by status only. NONE means no wallet is open (TFG has to request one); nothing is paid or returned to it until ACTIVE. In a stored creation response it is the status at creation; read the loan for the current one.
borrower_wallet.status requiredstring: NONE, REQUESTED, PENDING, ACTIVE
deposit_window_ends_atstring or null (date-time)
contract_sent_atstring or null (date-time)
signed_atstring or null (date-time)
activated_atstring or null (date-time)
matures_at requiredstring or null (date-time)A bullet loan's maturity, set at activation as the payout's done instant plus the term; null otherwise.
maturity_defaulted_at requiredstring or null (date-time)When Borrou recorded a bullet loan unpaid at its maturity as in default (non-payment); null otherwise. Nothing is sold or moved on it.
strike_price requiredStrikePrice
trigger_prices requiredTriggerPrices
closed_atstring or null (date-time)
created_at requiredstring (date-time)
updated_at requiredstring (date-time)

StrikePrice

The checked BTC price when the payout activated the loan (its strike), with the collateral and the debt the trigger prices at the strike are worked out from. Recorded once and never changed. Null before the payout, and for a loan paid out before strikes were recorded or without a checked price near the payout ("strike price not recorded").

object or null

FieldTypeDescription
price_usd requiredUsdAmount
basis requiredstring: CORROBORATED, PRIMARY_ONLY, FALLBACK_ONLYWhether both price sources agreed, or the price rests on one of them.
price_at requiredstring (date-time)The price reading's own time.
payout_done_at requiredstring (date-time)When the payout was done (the custodian's execution, else the confirming approval).
collateral_btc requiredstringThe collateral held at the payout, 8 decimals.
debt_usdt requiredstringWhat the loan owed at the payout, 6 decimals.

TriggerPriceLevels

object

FieldTypeDescription
margin_call_price_usd requiredstring or nullThe highest BTC price, to the cent, at which the loan is at or below its margin-call level for this collateral and debt; one cent higher it is above it. Null when no price reaches it.
liquidation_price_usd requiredstring or nullThe same for the liquidation level.
collateral_btc requiredstring
debt_usdt requiredstring

TriggerPrices

The BTC prices at which the loan reaches its margin-call and liquidation levels, worked out exactly from the collateral and the debt on the loan's own ladder. Figures for display: every decision compares the loan's position at a checked price. at_strike uses the collateral and debt recorded with the strike (null without one); now uses the collateral held and what the loan owes now, which grows with interest, so these prices drift up (null unless ACTIVE and holding collateral). Null before the payout.

object or null

FieldTypeDescription
at_strike requiredTriggerPriceLevels or null
now requiredTriggerPriceLevels or null

LoanBalance

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
principal_usdt requiredUsdtAmount
annual_rate_bps requiredBps
interest requiredInterestTerms
outstanding requiredobjectWhat an ACTIVE loan owes today, from its records (zero in every other status).
outstanding.principal_usdt requiredstring
outstanding.accrued_interest_usdt requiredstringInterest accrued and not paid, default interest included: to the day for periodic interest, to the second for a bullet loan.
outstanding.total_usdt requiredstringPrincipal plus unpaid interest, the debt every ratio is measured on.
outstanding.days_accrued requiredintegerWhole days of interest since the payout (for a bullet loan, whole days elapsed; its interest runs by the second regardless).
interest_due requiredobject
interest_due.interest_paid_usdt requiredstring
interest_due.overdue_usdt requiredstringBilled interest past its due date and unpaid.
interest_due.oldest_overdue_due_on requiredstring or null (date)
interest_due.next_due requiredobject or null
interest_due.next_due.due_onstring (date)
interest_due.next_due.amount_usdtstring
interest_due.overdue_since requiredstring or null (date-time)Set once billed interest is unpaid past its grace, a breach of the loan's terms.

LoanCoverage

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
health_flag requiredHealthFlag
as_of requiredstring (date-time)
btc_price_usd requiredstring or null
price_fetched_at requiredstring or null (date-time)
price_divergence_flagged requiredboolean or null
debt_usdt requiredstring or nullWhat the loan owes (principal plus unpaid interest), while collateral is held.
cure_rule requiredstring: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGIN
cure_window_hours requiredinteger
collateral requiredobject
collateral.required_btc requiredstring
collateral.confirmed_btc requiredstringDeposits the custodian released to the loan.
collateral.held_btc requiredstringWhat the loan holds: released deposits less anything that has left its wallet. The ratios use this.
collateral.value_usd requiredstring or nullheld_btc at the display price.
collateralisation requiredobjectWhat the ladder compares, at the display price; current_bps is rounded down. The health flag is the monitor's, on a checked price.
collateralisation.basis requiredstring PRINCIPAL_PLUS_INTEREST
collateralisation.current_bps requiredinteger or null
collateralisation.initial_margin_bps requiredBps
collateralisation.warning_bps requiredinteger or null
collateralisation.margin_call_bps requiredBps
collateralisation.liquidation_bps requiredBps
ltv requiredobjectThe same position as LTV, for display; the levels are rounded to whole bps.
ltv.basis requiredstring PRINCIPAL_PLUS_INTEREST
ltv.current_bps requiredinteger or null
ltv.warning_bps requiredinteger or null
ltv.margin_call_bps requiredBps
ltv.liquidation_bps requiredBps
open_margin_call requiredobject or null
open_margin_call.issued_atstring (date-time)
open_margin_call.deadlinestring (date-time)
open_margin_call.required_topup_btcstring

CollateralStatus

Interface-level custody data only (amounts, confirmations, screening and Travel Rule status, release). No origin address, no custody reference.

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
required_btc requiredBtcAmount
deposit_tolerance requiredDepositTolerance
position requiredobjectCumulative over every deposit, against the required BTC.
position.released_btc requiredBtcAmountReleased to the loan by the custodian; only these count.
position.pending_btc requiredBtcAmountSeen, still confirming or being screened.
position.held_btc requiredBtcAmountHeld by the custodian (screening or Travel Rule).
position.remaining_btc requiredBtcAmountStill missing against the required BTC.
position.excess_btc requiredBtcAmountReleased beyond the required BTC; kept as buffer.
position.requirement_met requiredboolean
position.collateral_held_btc requiredBtcAmountWhat the loan holds now, released deposits less anything that left its wallet.
tfg_review requiredstring: NOT_REQUIRED, PENDING, GO, NO_GOTFG's go/no-go on a short or late deposit.
deposits requiredarray of object
deposits[].id requiredstring (uuid)
deposits[].amount_btc requiredBtcAmount
deposits[].tx_hash requiredstring
deposits[].confirmations requiredinteger
deposits[].detected_at requiredstring (date-time)
deposits[].screening requiredstring: PENDING, OK, HELDThe custodian's screening, as held or not; never why.
deposits[].travel_rule requiredstring or null: OK, HELD, PENDING,
deposits[].release requiredstring: PENDING, RELEASED, HELD, RETURNED
deposits[].counts_as_collateral requiredboolean
deposits[].released_at requiredstring or null (date-time)
deposits[].flag requiredstring: EXACT, SHORT_WITHIN_TOLERANCE, SHORT, OVERDEPOSIT, LATE
collateral_return requirednull or CollateralReturnCancelled loans only.

DebtEnded

What ended the debt, once it has; figures run to at.

object or null

FieldTypeDescription
kind requiredstring: FULL_REPAYMENT, LIQUIDATION
at requiredstring (date-time)

InterestPeriods

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
figures_to requiredstring or null (date-time)Now, or when the debt ended. Null for a loan never paid out.
debt_ended requiredDebtEnded
annual_rate_bps requiredBps
interest requiredInterestTerms
default_interest requiredobject
default_interest.annual_rate_bps requiredBps
default_interest.accrued_usdt requiredUsdtAmount
default_interest.unpaid_usdt requiredUsdtAmount
current_period requiredobject or nullThe period running now, not billed yet.
current_period.period_startstring (date)
current_period.period_endstring (date)
current_period.accrued_usdtUsdtAmount
totals requiredobject
totals.billed_usdt requiredUsdtAmount
totals.paid_usdt requiredUsdtAmount
totals.unpaid_usdt requiredUsdtAmount
totals.overdue_usdt requiredUsdtAmount
overdue_since requiredstring or null (date-time)Billed interest unpaid past its grace since then, a breach.
data requiredarray of object
data[].period_start requiredstring (date)
data[].period_end requiredstring (date)
data[].interest_usdt requiredUsdtAmount
data[].paid_usdt requiredUsdtAmount
data[].unpaid_usdt requiredUsdtAmount
data[].due_on requiredstring (date)
data[].grace_ends_on requiredstring (date)The last of 3 business days after the due date.
data[].status requiredstring: PAID, DUE, OVERDUE, SETTLED
data[].past_grace requiredboolean

LoanSchedule

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
interest requiredInterestTerms
maturity requiredobject or nullA bullet loan's maturity; null with periodic interest, whose principal is due on full repayment.
maturity.matures_at requiredstring (date-time)
maturity.term_days requiredinteger
maturity.defaulted_at requiredstring or null (date-time)When it was recorded unpaid at the maturity.
principal requiredobject or null
principal.outstanding_usdtUsdtAmount
principal.duestring: ON_FULL_REPAYMENT, AT_MATURITY
upcoming requiredarray of object
upcoming[].kind requiredstring: BILLED, AWAITING_BILLING, CURRENT, FUTURE, MATURITYMATURITY: a bullet loan's principal and interest, due together at its maturity.
upcoming[].period_start requiredstring (date)
upcoming[].period_end requiredstring (date)
upcoming[].due_on requiredstring (date)
upcoming[].amount_usdt requiredUsdtAmount
upcoming[].estimated requiredbooleanTrue for a period not billed yet (awaiting billing included), assuming nothing changes.

MarginCalls

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
cure_rule requiredstring: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGIN
cure_window_hours requiredinteger
data requiredarray of object
data[].id requiredstring (uuid)
data[].status requiredstring: OPEN, EXPIRED, RESOLVED, CANCELLED
data[].resolution requiredstring or null: TOPPED_UP, PRICE_RECOVERED, LIQUIDATED, WAIVED, PARTIALLY_REPAID, REPAID, REPAID: the loan was repaid in full while the call was open or expired.
data[].trigger requiredobjectThe position the call was issued at, as in loan.margin_call_issued.
data[].trigger.collateral_bpsinteger or null
data[].trigger.ltv_bpsinteger
data[].target_collateral_bps requiredBpsThe initial margin the top-up restores.
data[].required_top_up_btc requiredBtcAmount
data[].collateral_btc_at_issue requiredBtcAmount
data[].issued_at requiredstring (date-time)
data[].issued_by requiredstring: TFG, BORROUWho issued it, never by name: TFG, or Borrou on a product whose margin calls are automatic (risk_policies.margin_call_issuance).
data[].notice_sent_at requiredstring (date-time)The cure window starts here.
data[].deadline requiredstring (date-time)
data[].liquidation_level_reached_at requiredstring or null (date-time)
data[].resolved_at requiredstring or null (date-time)

TopUpInstructions

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
asset requiredstring BTC
network requiredstring bitcoin
address requiredstring
same_as_deposit_address requiredboolean true
qr_payload requiredstring
open_margin_call requiredobject or null
open_margin_call.idstring (uuid)
open_margin_call.required_top_up_btcBtcAmount
open_margin_call.deadlinestring (date-time)
open_margin_call.target_collateral_bpsBps
address_attestation requiredAddressAttestation or nullBorrou's signature on the address, as on the deposit address. Never null in live mode.

AmendedTerms

object

FieldTypeDescription
warning_collateral_bps requiredinteger or null
margin_call_collateral_bps requiredBps
liquidation_collateral_bps requiredBps
warning_ltv_bps requiredinteger or null
margin_call_ltv_bps requiredBps
liquidation_ltv_bps requiredBps
margin_call_cure_hours requiredinteger

TermAmendments

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
data requiredarray of object
data[].id requiredstring (uuid)
data[].status requiredstring: SCHEDULED, APPLIED, LAPSED
data[].notice_sent_at requiredstring (date-time)
data[].effective_on requiredstring (date)The stated date, in the operations time zone.
data[].effective_at requiredstring (date-time)
data[].applied_at requiredstring or null (date-time)
data[].terms requiredAmendedTerms
data[].previous_terms requiredAmendedTerms or nullThe terms it replaced, once applied.

RepaymentOptionReason

Why the option is not available now; null when it is.

string or null: REPAYMENT_BEING_RECORDED, INTEREST_PAYMENT_BEING_RECORDED, LIQUIDATION_UNDERWAY, INCREASE_PAYOUT_IN_FLIGHT, NOT_ALLOWED, NO_OPEN_MARGIN_CALL, NO_CHECKED_PRICE, NOTHING_HELD, BELOW_INITIAL_MARGIN, NOTHING_OWED, NOTHING_BILLED,

RepaymentInstructions

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
valid_until requiredstring (date-time)The end of the UTC day: the amounts hold for a payment TFG records before it.
asset requiredstring USDT
network requiredstringThe loan's USDT network.
destination requiredobject
destination.address requiredstringBorrou's USDT receiving address on that network, its checksum checked when the service starts.
destination.synthetic requiredbooleanTrue in the sandbox: an address shaped like the network's whose checksum fails, so no wallet sends to it.
destination.per_loanboolean trueProposed: present where repayment detection gave the loan its own receiving reference; the address (with memo) is this loan's.
destination.kindstring: ADDRESS, MEMOWith per_loan: an address of the loan's own, or the receiving address with a memo the sender must include.
destination.memostring or nullWith per_loan and kind MEMO: the tag the transfer must carry, or it cannot be matched to the loan.
full requiredobject
full.available requiredboolean
full.unavailable_reason requiredRepaymentOptionReason
full.amount_usdt requiredUsdtAmountWhat the loan owes at the last instant of the UTC day: it repays the loan in full on an entry at any time until valid_until.
full.principal_usdt requiredUsdtAmount
full.interest_usdt requiredUsdtAmount
full.next_day_amount_usdt requiredUsdtAmountThe same figure for a payment recorded the next UTC day: what is owed at that day's last instant.
full.payment_reference requiredstring
partial requiredobject
partial.mode requiredPartialRepayments
partial.available requiredboolean
partial.unavailable_reason requiredRepaymentOptionReason
partial.min_usdt requiredstring or nullWhat brings the loan back to its initial margin at the checked price now (0.000001 if it is there).
partial.max_usdt requiredstring or nullOne micro-USDT less than everything owed.
partial.payment_reference requiredstring
interest requiredobject
interest.available requiredboolean
interest.unavailable_reason requiredRepaymentOptionReason
interest.amount_usdt requiredUsdtAmountClears every billed period, unpaid default interest first.
interest.default_interest_usdt requiredUsdtAmount
interest.periods requiredarray of object
interest.periods[].period_startstring (date)
interest.periods[].period_endstring (date)
interest.periods[].due_onstring (date)
interest.periods[].unpaid_usdtUsdtAmount
interest.periods[].overdueboolean
interest.payment_reference requiredstring

Repayment

object

FieldTypeDescription
id requiredstring (uuid)
kind requiredstring: FULL_REPAYMENT, PARTIAL_REPAYMENT, INTEREST
status requiredstring: PENDING_CONFIRMATION, CONFIRMED, REJECTED
amount_usdt requiredUsdtAmount
interest_usdt requiredstring or nullHow a confirmed payment was applied: an interest payment, a partial repayment, or a full repayment (the interest and principal it settled; anything paid beyond both is excess). Null until confirmed.
principal_usdt requiredstring or null
tx_hash requiredstring or null
recorded_at requiredstring (date-time)
confirmed_at requiredstring or null (date-time)

Repayments

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
data requiredarray of Repayment

CollateralRelease

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
release requiredobject
release.status requiredstring: NOT_DUE, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED
release.basis requiredstring or null: FULL_REPAYMENT, CANCELLATION,
release.amount_btc requiredstring or null
release.destination requiredstring or null: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS, Where the release goes, by kind; destination_detail gives it in the payout's shape.
release.destination_detail requiredMovementDestination or nullThe same destination in the shape of GET /v1/loans/{reference}/disbursement's destination; null while not due.
release.entered_at requiredstring or null (date-time)
release.instructed_at requiredstring or null (date-time)
release.executed_at requiredstring or null (date-time)
release.tx_hash requiredstring or null

StatementSummary

object

FieldTypeDescription
period requiredstring
from requiredstring (date-time)
to requiredstring (date-time)Exclusive.
provisional requiredbooleanThe month has not ended.

LenderOfRecord

The loan's lender of record. Until the lender's record is approved and in force, status is TO_BE_CONFIRMED and every other field is null, and nothing names an entity in its place. Your borrower-facing copy should say "Lender: to be confirmed" until then. The partner distributes the loan and is never the lender of record.

object

FieldTypeDescription
status requiredstring: TO_BE_CONFIRMED, SET
legal_name requiredstring or null
jurisdiction requiredstring or null
registration_reference requiredstring or null

Statement

object

FieldTypeDescription
reference requiredstring
lender_of_record requiredLenderOfRecord
period requiredstring
from requiredstring (date-time)
to requiredstring (date-time)
provisional requiredboolean
as_of requiredstring (date-time)The close the figures run to (now, for the current month).
status_at_close requiredLoanStatus or null
debt_ended requiredDebtEnded
principal requiredobjectopening + drawn − repaid − settled = closing.
principal.opening_usdtstring
principal.drawn_usdtstringThe payout and any increase in the month.
principal.repaid_usdtstringThe principal part of partial repayments.
principal.settled_usdtstringSettled by the full repayment or the liquidation.
principal.closing_usdtstring
interest requiredobjectopening_unpaid + accrued + default_accrued − paid − settled = closing_unpaid.
interest.annual_rate_bpsBps
interest.opening_unpaid_usdtstring
interest.accrued_usdtstring
interest.default_accrued_usdtstring
interest.billed_usdtstring
interest.billedarray of object
interest.billed[].period_startstring (date)
interest.billed[].period_endstring (date)
interest.billed[].due_onstring (date)
interest.billed[].interest_usdtstring
interest.paid_usdtstring
interest.settled_usdtstring
interest.closing_unpaid_usdtstring
interest.closing_default_unpaid_usdtstring
owed requiredobject
owed.opening_usdtstring
owed.closing_usdtstring
liquidation_shortfall_usdt requiredstring or nullStill owed after a liquidation (full recourse).
payments requiredarray of object
payments[].kindstring: INTEREST, PARTIAL_REPAYMENT, FULL_REPAYMENT
payments[].amount_usdtstring
payments[].interest_usdtstring
payments[].principal_usdtstring
payments[].paid_atstring (date-time)
payments[].tx_hashstring or null
collateral requiredobject
collateral.opening_btcstring
collateral.closing_btcstring
collateral.movementsarray of object
collateral.movements[].kindstring: DEPOSIT, RETURN, LIQUIDATION
collateral.movements[].amount_btcstringSigned.
collateral.movements[].atstring (date-time)
collateral.movements[].tx_hashstring or nullNull for collateral that left for a sale.
coverage_at_close requiredobject or nullOn an active loan at the close, on the collateral monitor's last checked price for it.
coverage_at_close.basisstring PRINCIPAL_PLUS_INTEREST
coverage_at_close.btc_price_usdUsdAmount
coverage_at_close.price_as_ofstring (date-time)
coverage_at_close.price_basisstring CHECKED_MONITOR_TICK
coverage_at_close.debt_usdtstring
coverage_at_close.collateral_btcstring
coverage_at_close.collateralisation_bpsintegerRounded down.
coverage_at_close.ltv_bpsintegerDerived, rounded.
coverage_at_close.bandHealthFlag

LoanLiquidation

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
liquidation requiredobject or null
liquidation.statestring: PROPOSED, APPROVED, SELLING, SETTLED, COMPLETED, ENDED
liquidation.triggerstring or null: LIQUIDATION_LEVEL, MARGIN_CALL_EXPIRED, NON_PAYMENT, INSOLVENCY, MISREPRESENTATION, REPUDIATION, ILLEGALITY, SECURITY_INEFFECTIVE, OTHER_BREACH,
liquidation.started_atstring or null (date-time)
liquidation.ordersarray of object
liquidation.orders[].sequenceinteger
liquidation.orders[].statestring: PROPOSED, APPROVED, SELLING, SETTLED, COMPLETED, ENDED
liquidation.orders[].size_btcstring
liquidation.orders[].filled_btcstring
liquidation.orders[].unfilled_btcstring or null
liquidation.orders[].average_price_usdstring or null
liquidation.orders[].reference_price_usdstring or nullThe independent reference price the order was sent against.
liquidation.orders[].price_vs_reference_bpsnumber or nullTo 0.01 bps; negative when sold below the reference (read again at the second approval, else the proposal's).
liquidation.orders[].proposed_atstring (date-time)
liquidation.orders[].approved_atstring or null (date-time)
liquidation.orders[].settled_atstring or null (date-time)
liquidation.saleobject or null
liquidation.sale.btc_soldstring
liquidation.sale.average_price_usdstring or null
liquidation.sale.reference_price_usdstring or null
liquidation.sale.price_vs_reference_bpsnumber or null
liquidation.sale.gross_proceeds_usdtstring
liquidation.sale.execution_fees_usdtstring
liquidation.sale.proceeds_usdtstringWhat the execution route paid out.
liquidation.waterfallobject or nullOnce a second TFG user approved the settlement.
liquidation.waterfall.proceeds_usdtstring
liquidation.waterfall.principal_usdtstring or null
liquidation.waterfall.interest_usdtstring or null
liquidation.waterfall.debt_settled_usdtstring
liquidation.waterfall.fees_usdtstring
liquidation.waterfall.surplus_usdtstringTo the borrower; zero on a loan whose terms keep the surplus.
liquidation.waterfall.shortfall_usdtstring or nullStill owed by the borrower; zero on a non-recourse loan.
liquidation.waterfall.surplus_retained_usdtstring or nullKept by the lender on a loan whose terms keep the surplus; null otherwise.
liquidation.waterfall.shortfall_not_owed_usdtstring or nullOn a non-recourse loan, what the sale did not cover, which the borrower does not owe; null otherwise.
liquidation.waterfall.approved_atstring (date-time)
liquidation.shortfall_owed_usdtstring or nullStill owed after the sale (full recourse).
liquidation.shortfall_not_owed_usdtstring or nullOn a non-recourse loan, what the sale did not cover: the borrower does not owe it. Null otherwise.
liquidation.surplus_retained_usdtstring or nullWhat the lender kept of the sale surplus on a loan whose terms keep it. Null otherwise.
liquidation.surplus_payoutobject or null
liquidation.surplus_payout.statusstring: AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED
liquidation.surplus_payout.amountstring
liquidation.surplus_payout.executed_atstring or null (date-time)
liquidation.surplus_payout.tx_hashstring or null
liquidation.leftover_collateralobject or nullWhat a smaller liquidation left in the loan's wallet, and its return to the borrower.
liquidation.leftover_collateral.left_btcstring
liquidation.leftover_collateral.returnedobject or null
liquidation.leftover_collateral.returned.statusstring: AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED
liquidation.leftover_collateral.returned.amountstring
liquidation.leftover_collateral.returned.executed_atstring or null (date-time)
liquidation.leftover_collateral.returned.tx_hashstring or null

ProductCode

string

Product

An API product type, by its code only. No product type id; the lender is on each loan's statements.

object

FieldTypeDescription
code requiredProductCode
name requiredstring
status requiredstring: ACTIVE, INACTIVE
channel requiredstring API
annual_rate_bps requiredBps
interest requiredInterestTerms
ladder requiredLadder and object
cure_window_hours requiredinteger
partial_repayments requiredPartialRepayments
repayment_profile requiredRepaymentProfile
term_days requiredinteger or nullA bullet loan's term in whole days, from the payout to the maturity; null with periodic interest.
accrual_basis requiredAccrualBasis
collateral_sizing requiredstring: QUOTED, MANUALQUOTED: from the initial margin at a checked price. MANUAL products cannot lend through the API.
api_lendable requiredbooleanActive and quoted, so a quote and a loan can use it.
deposit_window_hours requiredinteger
signature_mode requiredSignatureMode
risk_policies requiredRiskPolicies
operatingOperatingSettings
limits requiredobject
limits.min_principal_usdt requiredUsdtAmount
limits.max_principal_usdt requiredUsdtAmount
fees requiredarray of objectConfigured fees; none today.
fees[].kind requiredstring: ORIGINATION, LIQUIDATION
fees[].bps requiredBps
usdt_networks requiredarray of stringThe networks a payout may use with this product.

CheckedPrice

object

FieldTypeDescription
pair requiredstring BTC-USD
checked requiredbooleanFalse while the breaker is open or the reading failed its checks; there is no price then.
price_usd requiredstring or null
as_of requiredstring or null (date-time)When the source reading the checks ran on was taken.
age_seconds requiredinteger or null
basis requiredstring or null: CORROBORATED, PRIMARY_ONLY, FALLBACK_ONLY,
circuit_breaker requiredobject
circuit_breaker.status requiredstring: OPEN, CLOSED
refusal requiredobject or null
refusal.codestring: CIRCUIT_OPEN, CHECK_FAILED
refusal.reasonsarray of string
read_at requiredstring (date-time)

KycStatus

The borrower's KYC as TFG decided it on its review; until then in progress (with the borrower or the provider) or with TFG.

string: NOT_STARTED, IN_PROGRESS, IN_TFG_REVIEW, APPROVED, REJECTED, MORE_INFO_REQUESTED

Client

One of your borrowers. No personal field is ever returned.

object

FieldTypeDescription
id requiredstring (uuid)
references requiredarray of stringThe borrower references you sent on its applications.
kyc requiredobject
kyc.status requiredKycStatus
kyc.decided_at requiredstring or null (date-time)
kyc.handoff requiredobject or null
kyc.handoff.modestring: PROVIDER, RELIANCE
kyc.handoff.started_atstring (date-time)
borrower_wallet requiredobjectThe borrower's wallet at the custodian, by status only.
borrower_wallet.status requiredstring: NONE, REQUESTED, PENDING, ACTIVE, CLOSED
loans requiredarray of object
loans[].reference requiredstring
loans[].status requiredLoanStatus
created_at requiredstring (date-time)

Page

object

FieldTypeDescription
has_more requiredboolean
next_cursor requiredstring or nullPass as starting_after for the next page.

ClientList

Page and object

All of: Page, object

FieldTypeDescription
data requiredarray of Client

ApplicationList

Page and object

All of: Page, object

FieldTypeDescription
data requiredarray of Application

LoanList

Page and object

All of: Page, object

FieldTypeDescription
data requiredarray of Loan

NextAction

What has to happen next for the loan to move, and who does it. Only ISSUE_CONTRACT is yours. On an active loan: BORROWER_TOPS_UP_COLLATERAL while a margin call is open; BORROWER_REPAYS_BY_MATURITY on a bullet loan, which the borrower repays in full by its matures_at (until it is recorded in default at it); and once a loan is repaid in full (repaid_in_full), the return of its collateral: TFG_RETURNS_COLLATERAL, then TFG_SENDS_RETURN_INSTRUCTION and CUSTODIAN_EXECUTES_RETURN. TFG_REQUESTS_BORROWER_WALLET never applies where the payout goes to your settlement account.

object

FieldTypeDescription
code requiredstring: ISSUE_CONTRACT, BORROWER_SIGNS_CONTRACT, BORROWER_SENDS_COLLATERAL, CUSTODIAN_CONFIRMS_DEPOSIT, TFG_REVIEWS_DEPOSIT, TFG_REQUESTS_BORROWER_WALLET, TFG_APPROVES_PAYOUT, TFG_SENDS_PAYOUT_INSTRUCTION, CUSTODIAN_EXECUTES_PAYOUT, BORROWER_TOPS_UP_COLLATERAL, BORROWER_REPAYS_BY_MATURITY, TFG_RETURNS_COLLATERAL, TFG_SENDS_RETURN_INSTRUCTION, CUSTODIAN_EXECUTES_RETURN, NONE
by requiredstring: PARTNER, BORROWER, TFG, CUSTODIAN, NONE

LoanDetail

Loan and object

All of: Loan, object

FieldTypeDescription
next_action requiredNextAction
receiving_referencesarray of ReceivingReferenceProposed; present only where repayment detection is on. Where the borrower sends repayments for this loan, one per network: given by the custodian after activation.

Contract

object

FieldTypeDescription
reference requiredstring
status requiredstring: NOT_ISSUED, SENT, SIGNED, EXPIRED
template_version requiredstring or null
sent_at requiredstring or null (date-time)
document requiredobject or nullThe contract document Borrou generated and stored when the contract was issued, which the borrower signs unchanged: its template, when it was generated, its length and its SHA-256. Never the document itself, which carries the borrower's name. Null before POST .../contract, and for a contract issued before Borrou kept documents.
document.template_version requiredstring
document.generated_at requiredstring (date-time)
document.byte_length requiredinteger
document.sha256 requiredstring
signing_link requiredobject or nullSENT only: Borrou's e-signature link, for your app to open for the borrower.
signing_link.urlstring (uri)
signed requiredobject or nullSIGNED only.
signed.signed_onstring (date)
signed.contract_referencestring
signed.recorded_atstring (date-time)
expired_at requiredstring or null (date-time)EXPIRED only: when the loan was cancelled unsigned.
signature_mode requiredSignatureMode
acceptance requiredobject or nullCLICKWRAP_OTP only (null for ESIGN): what to show the borrower while the contract awaits their acceptance, and the acceptance once recorded. Never the code.
acceptance.text requiredobject or nullSENT only: the words the borrower accepts, to show beside the contract's SHA-256.
acceptance.text.version requiredstring
acceptance.text.text requiredstring
acceptance.text.text_sha256 requiredstring
acceptance.code requiredobject or nullSENT only: when the latest code was emailed and until when it can be used; null before one is sent.
acceptance.code.sent_at requiredstring (date-time)
acceptance.code.expires_at requiredstring (date-time)
acceptance.accepted requiredobject or nullThe recorded acceptance, the evidence the signature rests on.
acceptance.accepted.accepted_at requiredstring (date-time)
acceptance.accepted.text_version requiredstring
acceptance.accepted.text_sha256 requiredstring
acceptance.accepted.document_sha256 requiredstring
acceptance.accepted.partner_session_ref requiredstring

OperatingSettings

How the product operates. Every product offered today has the first value of each: destinations CLIENT_CUSTODIAN_WALLET (the borrower's wallet at the custodian), or PARTNER_SETTLEMENT_ACCOUNT where TFG has set your partner to its settlement account at the custodian; pricing_source PRODUCT (the product's rate and ladder); liquidation_execution TFG_PROPOSES (one person at TFG proposes a liquidation and a second approves the order); maturity_action DEFAULT (a bullet loan unpaid at its maturity is in default). The other values are not offered: no product takes an address from you (PARTNER_PROVIDED_ADDRESS) or returns collateral to where it came from (ORIGIN_ADDRESS), none is priced per loan (QUANT), none is liquidated by the execution route on its own (ROUTE_EXECUTES), and none offers a new term at its maturity (OFFER_ROLLOVER).

object

FieldTypeDescription
destinations requiredobject
destinations.payout requiredstring: CLIENT_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS
destinations.collateral_return requiredstring: CLIENT_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS
pricing_source requiredstring: PRODUCT, QUANT
liquidation_execution requiredstring: TFG_PROPOSES, ROUTE_EXECUTES
maturity_action requiredstring: DEFAULT, OFFER_ROLLOVER

RiskPolicies

The product's risk policies, copied onto each loan at creation and never changed there. margin_call_issuance: MANUAL, TFG issues a margin call; 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 (a notice only: nothing is sold or moved, and the cure window starts with the notice). liquidation_surplus_policy: RETURN, what a liquidation raises beyond the debt goes back to the borrower; RETAIN, the lender keeps it. recourse: FULL, what a liquidation does not cover stays owed; NON_RECOURSE, the borrower owes nothing more.

object

FieldTypeDescription
margin_call_issuance requiredstring: MANUAL, AUTOMATIC
liquidation_surplus_policy requiredstring: RETURN, RETAIN
recourse requiredstring: FULL, NON_RECOURSE

SignatureMode

How the borrower signs the contract: ESIGN, through Borrou's e-signature link; CLICKWRAP_OTP, in your app with a one-time code Borrou emails them (where Borrou is live, once legal clearance is recorded).

string: ESIGN, CLICKWRAP_OTP

DepositAddress

object

FieldTypeDescription
reference requiredstring
asset requiredstring BTC
network requiredstring bitcoin
address requiredstringThe loan's own collateral wallet at the custodian. Never the borrower's wallet.
required_btc requiredBtcAmount
received_btc requiredBtcAmountReleased to the loan so far.
remaining_btc requiredBtcAmount
deposit_tolerance requiredDepositTolerance
qr_payload requiredstringA BIP 21 URI: bitcoin:<address>?amount=<remaining>&label=<reference>.
announce_transfersbooleanProposed. True where this is your shared collateral address, the same on every one of your loans: say which loan each transfer is for with POST /v1/loans/{reference}/collateral/announcements, or it reaches no loan.
memo requiredstringThe loan reference, for the borrower's records.
memo_required requiredboolean falseBitcoin carries no memo; nothing has to travel with the transfer.
deposit_window_ends_at requiredstring or null (date-time)
collateral_sender requiredstring: CLIENT, FINTECH
address_attestation requiredAddressAttestation or nullBorrou's signature on the address. Never null in live mode; null only in the development sandbox, for an unsigned address your app must show as unsigned.

AddressAttestation

Borrou's Ed25519 signature on a collateral address. Verify signature (base64url, 64 bytes) over the UTF-8 bytes of statement exactly as received, with the key GET /v1/address-keys lists under key_id; then read the statement's lines and check its address and loan_reference against what you show.

object

FieldTypeDescription
algorithm requiredstring Ed25519
key_id requiredstring
signed_at requiredstring (date-time)
statement requiredstringEight LF-separated name=value lines, no trailing newline: purpose, asset, network, address, loan_reference, wallet, key_id, signed_at.
signature requiredstring
verification_code requiredstringThe first eight RFC 4648 base32 characters of the SHA-256 of the signature's bytes. Show it beside the address; the borrower's loan page shows the same one.

AddressKeys

object

FieldTypeDescription
algorithm requiredstring Ed25519
statement_purpose requiredstring BORROU_COLLATERAL_ADDRESS_V1
current_key_id requiredstring or nullThe key new addresses are signed with; null while none is configured.
keys requiredarray of object
keys[].key_id requiredstring
keys[].public_key requiredstringThe 32 raw public-key bytes in base64url (a JWK's x).
keys[].public_key_pem requiredstringThe same key as an SPKI PEM.

CollateralReturn

object

FieldTypeDescription
status requiredstring: NOT_REQUIRED, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED
amount_btc requiredBtcAmount
destination requiredobject
destination.kindstring: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS
executed_at requiredstring or null (date-time)
tx_hash requiredstring or null

Disbursement

object

FieldTypeDescription
reference requiredstring
status requiredstring: NOT_DUE, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED, NOT_APPLICABLE
amount_usdt requiredUsdtAmount
usdt_network requiredstring
destination requiredMovementDestinationWhere the payout goes, by kind only: the borrower's wallet at the custodian, or your settlement account at the custodian if TFG has set your loans to be paid there. A payout already instructed says where it was sent.
instructed_at requiredstring or null (date-time)
executed_at requiredstring or null (date-time)
tx_hash requiredstring or null

MovementDestination

Where a payout or a return goes, by kind only, never a reference. wallet_status is the borrower's own wallet's status where it goes to that wallet, and null otherwise: a payout or a return to your settlement account does not wait for the borrower's wallet.

object

FieldTypeDescription
kind requiredstring: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS
wallet_status requiredstring or null: NONE, REQUESTED, PENDING, ACTIVE,

LoanCancel

object

FieldTypeDescription
reason requiredstring: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER

LoanCancellation

object

FieldTypeDescription
reference requiredstring
status requiredstring CANCELLED
from_status requiredLoanStatus
reason requiredstring: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER
cancelled_at requiredstring (date-time)
contract requiredobject
contract.signing_link_withdrawn requiredbooleanTrue when the loan had a signing link. It is withdrawn at the e-signature provider once the cancellation is recorded, and Borrou asks again until the provider confirms; until then the link may still open, but a signature on it is not recorded.
collateral_return requiredobjectCollateral released to the loan goes back to the borrower's custodian wallet, or to your settlement account at the custodian if TFG has set your partner to it, once two people at TFG approve the return.
collateral_return.status requiredstring: NOT_REQUIRED, AWAITING_APPROVAL
collateral_return.amount_btc requiredBtcAmount
collateral_return.destination requiredobject
collateral_return.destination.kindstring: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS

WebhookEventType

string: application.submitted, application.approved, application.rejected, application.cancelled, kyc.started, kyc.completed, kyc.status_changed, client.wallet_active, client.wallet_closed, loan.created, contract.sent, contract.signed, contract.expired, collateral.wallet_assigned, collateral.deposit_received, collateral.deposit_held, collateral.deposit_released, collateral.requirement_met, loan.activated, loan.disbursed, loan.state_changed, loan.coverage_warning, loan.margin_call_issued, loan.margin_call_cured, loan.margin_call_extended, loan.margin_call_expired, loan.liquidation_level, loan.upper_limit_reached, loan.interest_billed, loan.interest_overdue, loan.interest_paid, loan.repayment_received, loan.partial_repayment_applied, repayment.seen, repayment.applied, repayment.short, loan.maturity_approaching, loan.maturity_defaulted, loan.increase_offered, loan.increase_accepted, loan.increased, loan.increase_expired, loan.increase_cancelled, loan.surplus_return_requested, loan.surplus_return_request_entered, loan.surplus_return_request_ended, loan.surplus_collateral_returned, loan.collateral_released, loan.liquidation_started, loan.liquidation_order_filled, loan.liquidation_completed, loan.shortfall_recorded, loan.terms_amendment_scheduled, loan.terms_amended, loan.closed, loan.cancelled

WebhookSubscriptionCreate

object

FieldTypeDescription
url requiredstring (uri)
event_types requiredarray of WebhookEventType

WebhookSubscription

object

FieldTypeDescription
id requiredstring (uuid)
url requiredstring
event_types requiredarray of WebhookEventType
status requiredstring: ACTIVE, DISABLED
created_at requiredstring (date-time)
updated_at requiredstring (date-time)
disabled_at requiredstring or null (date-time)

WebhookDeliveryStatus

string: PENDING, SUCCEEDED, FAILED, CANCELLED

WebhookDelivery

object

FieldTypeDescription
id requiredstring (uuid)
subscription_id requiredstring (uuid)
event_id requiredstring (uuid)
event_type requiredWebhookEventType
status requiredWebhookDeliveryStatus
attempt_count requiredintegerAt most 8 attempts, after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h. A delay on Borrou's side (last_error signing_unavailable) uses none: the delivery waits 5 min and is tried again.
next_attempt_atstring or null (date-time)
last_attempt_atstring or null (date-time)
last_response_statusinteger or null
last_errorstring or null: http_status, timeout, dns_error, tls_error, connection_error, destination_rejected, subscription_disabled, signing_unavailable, partner_refused, Error class. subscription_disabled and partner_refused cancel the delivery unsent: the subscription was disabled, or the API was not serving your partner (disabled, console only, or every credential revoked); replay it once it is served again.
delivered_atstring or null (date-time)
replay_ofstring or null (uuid)
created_at requiredstring (date-time)

WebhookHealth

object

FieldTypeDescription
as_of requiredstring (date-time)The instant the figures were read at.
window_hours requiredinteger 24
data requiredarray of WebhookSubscriptionHealth

WebhookSubscriptionHealth

object

FieldTypeDescription
subscription_id requiredstring (uuid)
status requiredstring: ACTIVE, DISABLED
state requiredstring: DELIVERING, FAILING, NO_ATTEMPTS, DISABLEDDISABLED for a disabled subscription; otherwise whether the latest attempt went through (DELIVERING) or failed (FAILING); NO_ATTEMPTS before the first.
disabled_at requiredstring or null (date-time)
last_success_at requiredstring or null (date-time)When the last delivery that went through was delivered.
latest_attempt requiredobject or null
latest_attempt.at requiredstring (date-time)
latest_attempt.outcome requiredstring: SUCCEEDED, FAILED
latest_attempt.error requiredstring or nullThe failed attempt's error class, as in WebhookDelivery.last_error.
latest_attempt.http_status requiredinteger or nullThe status your endpoint answered with, when it answered.
failed_deliveries requiredintegerDeliveries whose latest attempt, in the window, failed: still being retried or given up.
given_up_deliveries requiredintegerOf those, the deliveries that used every attempt and will not be tried again.
pending_deliveries requiredintegerDeliveries waiting to go out now.
oldest_pending requiredobject or null
oldest_pending.delivery_id requiredstring (uuid)
oldest_pending.created_at requiredstring (date-time)When it was queued.
oldest_pending.attempt_count requiredinteger
oldest_pending.next_attempt_at requiredstring or null (date-time)

WebhookEvent

Every event is derived from Borrou's transactional outbox, so it exists if and only if the change it describes committed, and GET /v1/events returns the same events. Delivery is at least once and not in the order events happened: retries come later, and your risk events (loan.margin_call_*, loan.liquidation_*, loan.coverage_warning) are sent before the rest of what is waiting for you. De-duplicate on id, and order by occurred_at, or read the feed, whose position is the order Borrou published them in.

object

FieldTypeDescription
id requiredstring (uuid)Same value as the Borrou-Event-Id header. The outbox event's id (UUIDv7) for the first event derived from a change; a second one from the same change (loan.state_changed beside contract.signed, contract.expired beside loan.cancelled, loan.shortfall_recorded beside loan.liquidation_completed) has an id derived from it, which sorts right after it.
type requiredWebhookEventType
api_version requiredstring v1
occurred_at requiredstring (date-time)When the change happened in Borrou.
created_at requiredstring (date-time)When Borrou recorded it.
data requiredobject

FeedEvent

A webhook event, field for field, with its position in the feed. Webhook deliveries carry no position.

WebhookEvent and object

All of: WebhookEvent, object

FieldTypeDescription
position requiredintegerWhere the event sits in GET /v1/events: larger for every event published after it, never reused. Pass it as after to read what follows. Two events of one change have neighbouring positions.

EventPage

object

FieldTypeDescription
data requiredarray of FeedEvent
next_cursor requiredinteger or nullA position: pass it as after for the next page, now or later. At or past the last event of the page (past rows that held nothing for you). Null only when nothing has been read yet.
has_more requiredbooleanMore events are waiting now; false means you have reached the newest.

LoanKeys

object

FieldTypeDescription
id requiredstring (uuid)
reference requiredstring

ApplicationEventData

object

FieldTypeDescription
application requiredobject
application.id requiredstring (uuid)
client requiredobjectBorrou's id for the borrower, your client.
client.id requiredstring (uuid)
principal_usdtstringapplication.submitted only.
statusstring: APPROVED, REJECTEDapplication.approved and application.rejected: TFG's decision on the borrower.
reason_codestring: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHERapplication.cancelled only.

KycEventData

object

FieldTypeDescription
client requiredobject
client.id requiredstring (uuid)
applicationobject or nullkyc.started, and kyc.completed for a hand-off through the API (null otherwise).
application.id requiredstring (uuid)
handoff_idstring or null (uuid)kyc.started and kyc.completed: the hand-off's id, as POST /v1/applications/{id}/kyc-handoff returned it; null on kyc.completed for a file started on the console.
modestring: PROVIDER, RELIANCEkyc.started only.
kyc_statusstring: APPROVED, REJECTED, MORE_INFO_REQUESTEDkyc.status_changed: TFG's decision in its review.

ClientWalletEventData

The borrower's wallet at the custodian, where payouts and returns go unless TFG has set your partner to its settlement account; by status only, its reference never shown.

object

FieldTypeDescription
client requiredobject
client.id requiredstring (uuid)
status requiredstring: ACTIVE, CLOSED
from_statusstring: PENDING, ACTIVE, CLOSED

LoanEventData

loan.created adds the loan's terms; collateral.wallet_assigned and loan.closed carry the loan only.

object

FieldTypeDescription
loan requiredLoanKeys
product_type_idstring (uuid)
channelstring: WHITE_LABEL, API, DIRECT, INSTITUTIONAL
principal_usdtstring
annual_rate_bpsBps
collateral_ratio_bpsBps
required_collateral_btcstring

ContractEventData

The e-signature provider's agreement reference stays in Borrou.

object

FieldTypeDescription
loan requiredLoanKeys
template_versionstringcontract.sent: the contract template's version.
issued_viastring: API, CONSOLEcontract.sent: through the API, or on the console.
reason_codestring: PARTNER_REQUEST, TFG_DECISION, TTL_EXPIREDcontract.expired: why the loan was cancelled.

LoanStatusEventData

object

FieldTypeDescription
loan requiredLoanKeys
from_status requiredLoanStatus
statusLoanStatusThe new status (every event here but loan.cancelled).
reason_codestring: PARTNER_REQUEST, TFG_DECISION, TTL_EXPIREDloan.cancelled only.

DepositEventData

No addresses, and for collateral.deposit_held no reason.

object

FieldTypeDescription
loan requiredLoanKeys
deposit_id requiredstring (uuid)
amount_btc requiredstring
tx_hashstringcollateral.deposit_received only.
confirmationsintegercollateral.deposit_received only.

CollateralAnnouncementRequest

object

FieldTypeDescription
tx_hash requiredstringThe Bitcoin transaction's id.

CollateralAnnouncement

object

FieldTypeDescription
id requiredstring (uuid)
loan_reference requiredstring
tx_hash requiredstring
announced_at requiredstring (date-time)When Borrou recorded the announcement.
status requiredstring AWAITING_CUSTODIANRecorded only: the collateral counts once the custodian reports this transaction and releases it.

RepaymentAnnouncementRequest

object

FieldTypeDescription
tx_hash requiredstringThe transfer's hash on its network.
network requiredstringOne of Borrou's USDT networks, as usdt_network spells it.
assetstring USDT
amountUsdtAmount

RepaymentAnnouncement

object

FieldTypeDescription
id requiredstring (uuid)
loan_reference requiredstring
source requiredstring ANNOUNCED
asset requiredstring USDT
network requiredstring
amount requiredstring or nullAs announced; null when no amount was named.
tx_hash requiredstring
seen_at requiredstring (date-time)When Borrou recorded the announcement.
status requiredstring AWAITING_TFG_ENTRYA TFG person enters the repayment from it; a different one approves it.

ReceivingReference

object

FieldTypeDescription
network requiredstring
asset requiredstring USDT
kind requiredstring: ADDRESS, MEMO
address requiredstringBorrou's receiving address for this loan: its own (ADDRESS), or the shared one with memo (MEMO). Never the borrower's.
memo requiredstring or null
assigned_at requiredstring (date-time)

RepaymentEventData

repayment.seen and repayment.short (proposed). No addresses.

object

FieldTypeDescription
loan requiredLoanKeys
sourcestring: DETECTED, ANNOUNCEDrepayment.seen: seen by the custodian at the loan's receiving reference, or announced by you.
assetstring: USDT, USDC
networkstring
amountstring or nullThe amount seen; null on an announcement that named none.
tx_hashstring
seen_atstring (date-time)
owed_usdtstringrepayment.short: what the loan owed when the transfer was seen.
short_usdtstringrepayment.short: how much is missing for a full repayment.
as_ofstring (date-time)

MoneyEventData

loan.disbursed, loan.repayment_received, loan.partial_repayment_applied, loan.interest_paid and loan.increased in USDT; loan.collateral_released and loan.surplus_collateral_returned in BTC. No addresses. loan.collateral_released is sent for every release of collateral to the borrower's wallet, a surplus return included; loan.surplus_collateral_returned says why, with the same tx_hash. A partial repayment is loan.repayment_received and loan.partial_repayment_applied, with one tx_hash.

object

FieldTypeDescription
loan requiredLoanKeys
amount_usdtstring
amount_btcstring
kindstring: FULL, PARTIALloan.repayment_received only; PARTIAL where the loan's product allows it.
interest_usdtstring or nullThe part that paid interest; null on a full repayment confirmed before the split was carried.
principal_usdtstring or nullloan.repayment_received and loan.partial_repayment_applied: the part that repaid principal (null on a full repayment confirmed before the split was carried); loan.increased: the new principal outstanding.
principal_outstanding_usdtstringloan.partial_repayment_applied: the principal left after it.
matures_atstring or null (date-time)loan.disbursed only: a bullet loan's maturity, set by the activation this payout caused; null for a periodic loan.
destinationobject or nullloan.disbursed only: where the payout went, by kind, never a reference, when that was not the borrower's wallet at the custodian: your settlement account (PARTNER_SETTLEMENT_ACCOUNT) if TFG has set your partner to it. Null means the borrower's wallet.
destination.kind requiredstring: PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS
increase_request_idstring (uuid)loan.increased only.
tx_hashstring
strike_priceobject or nullloan.disbursed only: the strike recorded when the payout activated the loan (the checked BTC price at the payout) and the trigger prices at the strike; null when none was recorded.
strike_price.price_usdUsdAmount
strike_price.margin_call_price_usdstring or nullThe highest price, to the cent, at which the loan is at or below its margin-call level at the strike.
strike_price.liquidation_price_usdstring or nullThe highest price, to the cent, at which the loan is at or below its liquidation level at the strike.

CoverageEventData

The collateral monitor's flag, on a checked price: loan.coverage_warning at WARNING, loan.liquidation_level at LIQUIDATION_LEVEL.

object

FieldTypeDescription
loan requiredLoanKeys
health_flag requiredHealthFlag
from_health_flagHealthFlag or null
collateral_bpsinteger or nullThe collateralisation the monitor judged, rounded down.

MarginCallEventData

object

FieldTypeDescription
loan requiredLoanKeys
margin_call_id requiredstring (uuid)
collateral_bpsinteger or nullloan.margin_call_issued: the collateralisation the call was issued at; loan.margin_call_expired: where it stood at the deadline.
ltv_bpsintegerloan.margin_call_issued only: the same, as LTV.
required_top_up_btcstringloan.margin_call_issued and loan.margin_call_expired.
notice_sent_atstring (date-time)loan.margin_call_issued only: the cure window runs from here to the deadline.
deadlinestring (date-time)loan.margin_call_issued, loan.margin_call_extended (the new deadline) and loan.margin_call_expired.
issued_bystring or null: BORROU, TFG, loan.margin_call_issued only: who issued the call, Borrou's monitor (a product whose margin calls are automatic) or TFG; null on a call issued before this was carried.
previous_deadlinestring (date-time)loan.margin_call_extended only: the deadline the extension replaced.
resolutionstring: TOPPED_UP, PRICE_RECOVERED, WAIVED, PARTIALLY_REPAIDloan.margin_call_cured only.

UpperLimitEventData

The loan is at or above its upper limit with no breach, on a checked price; an increase can be offered.

object

FieldTypeDescription
loan requiredLoanKeys
collateral_bps requiredinteger
upper_limit_collateral_bps requiredinteger
available_increase_usdt requiredstring

InterestEventData

object

FieldTypeDescription
loan requiredLoanKeys
period_startstring (date)loan.interest_billed only.
period_endstring (date)loan.interest_billed only.
annual_rate_bpsintegerloan.interest_billed only.
amount_usdtstringloan.interest_billed: the period's interest.
due_onstring or null (date)When it is payable (null on periods billed before it was carried).
overdue_usdtstringloan.interest_overdue only: billed interest unpaid past its grace.
grace_ended_onstring (date)loan.interest_overdue only.
default_interest_usdtstringloan.interest_overdue only.

MaturityEventData

A bullet loan's maturity.

object

FieldTypeDescription
loan requiredLoanKeys
matures_at requiredstring (date-time)
owed_usdt requiredstringloan.maturity_approaching: owed at the notice; loan.maturity_defaulted: owed at the maturity.
days_beforeintegerloan.maturity_approaching only: 7 or 1.
recorded_atstring (date-time)loan.maturity_defaulted only: when the default was recorded.
principal_usdtstringloan.maturity_defaulted only.
interest_usdtstringloan.maturity_defaulted only: unpaid interest at the maturity.
default_rate_bpsintegerloan.maturity_defaulted only: what the debt bears from the maturity.

IncreaseEventData

object

FieldTypeDescription
loan requiredLoanKeys
increase_request_id requiredstring (uuid)
amount_usdtstring
principal_before_usdtstringloan.increase_offered only.
expires_atstring (date-time)loan.increase_offered only: when the offer lapses unaccepted.
requested_viastring: API, CONSOLEloan.increase_offered only: through the API, or on the console.
channelstring: CLIENT_PORTAL, APIloan.increase_accepted only: where the borrower accepted.
text_versionstringloan.increase_accepted only: the version of the text the borrower accepted.
text_sha256stringloan.increase_accepted only: the SHA-256 of that text, as the request shows it.
accepted_atstring (date-time)loan.increase_accepted only.
reason_codestring: TIMEOUT, RATIO_BELOW_UPPER_LIMIT, AMOUNT_UNAVAILABLE, BREACH, LOAN_NOT_ACTIVE, LOAN_CHANGED, REPAID, SURPLUS_RETURN_IN_FLIGHT, CODE_ATTEMPTS_EXCEEDED, CANCELLED_BY_PARTNER, CANCELLED_BY_TFGloan.increase_expired and loan.increase_cancelled.

SurplusRequestEventData

The borrower's surplus-return request. TFG's entry is reported by its amount, never by the movement it created.

object

FieldTypeDescription
loan requiredLoanKeys
surplus_return_request_id requiredstring (uuid)
amount_btcstring or nullloan.surplus_return_requested: what the borrower asked for, null for as much as may go back; loan.surplus_return_request_entered: what TFG entered.
cap_btcstringloan.surplus_return_requested only: the most that could go back when it was made.
expires_atstring (date-time)loan.surplus_return_requested only: when it lapses unentered.
statusstring: CANCELLED, DECLINED, EXPIREDloan.surplus_return_request_ended only.
reason_codestringloan.surplus_return_request_ended only: CANCELLED_BY_PARTNER, DECLINED_BY_TFG, TIMEOUT, or why the loan's position no longer allowed it.

TermsEventData

A threshold amendment TFG approved, with the borrower's written notice (loan.terms_amendment_scheduled), and the same when it takes effect (loan.terms_amended).

object

FieldTypeDescription
loan requiredLoanKeys
amendment_id requiredstring (uuid)
warning_collateral_bpsinteger or null
margin_call_collateral_bps requiredinteger
liquidation_collateral_bps requiredinteger
cure_window_hours requiredinteger
notice_sent_at requiredstring (date-time)
effective_at requiredstring (date-time)

LiquidationEventData

object

FieldTypeDescription
loan requiredLoanKeys
amount_btcstringloan.liquidation_started: the BTC in the order sent.
filled_btcstringloan.liquidation_order_filled: the BTC in one fill.
price_usdstringloan.liquidation_order_filled: its price.
btc_soldstring
proceeds_usdtstring
debt_settled_usdtstring
surplus_usdtstringloan.liquidation_completed: what goes back to the borrower; zero on a loan whose terms keep the surplus.
shortfall_usdtstring or nullloan.liquidation_completed: still owed after the sale on a full-recourse loan (zero on a non-recourse one), null for a sale recorded without one; loan.shortfall_recorded: the amount, sent only when there is one.
surplus_retained_usdtstring or nullloan.liquidation_completed: what the lender kept of the surplus on a loan whose terms keep it; null otherwise.
shortfall_not_owed_usdtstring or nullloan.liquidation_completed: on a non-recourse loan, what the sale did not cover, which the borrower does not owe; null otherwise.

SandboxKycDecision

object

FieldTypeDescription
decision requiredstring: APPROVE, REJECT

SandboxDeposit

amount_btc for a new deposit, or deposit_id to move one on.

object

FieldTypeDescription
amount_btcBtcAmount
confirmationsintegerThe custodian's requirement when absent.
travel_rule_statusstring: OK, HELD, PENDING
deposit_idstring (uuid)
tx_hashstringA new deposit's transaction id: the one you announced, for a loan funded at your shared collateral address. One of the sandbox's own when absent.

SandboxPriceSet

object

FieldTypeDescription
btc_usd requiredUsdAmount

SandboxPrice

object

FieldTypeDescription
btc_usd requiredstring
previous_btc_usd requiredstring
reference_btc_usd requiredstringThe price the checks last accepted, the step was measured from.
max_step_bps requiredinteger
set_at requiredstring (date-time)

SandboxResult

object

FieldTypeDescription
simulated requiredstring: SIGNATURE, DEPOSIT, ADVANCE, REPAYMENT
stepsarray of string: DISBURSEMENT_ENTERED, DISBURSEMENT_APPROVED, COLLATERAL_RETURN_ENTERED, COLLATERAL_RETURN_APPROVED, CUSTODIAN_EXECUTED, TRANSFER_SEEN, REPAYMENT_ENTERED, REPAYMENT_CONFIRMEDadvance and repayment only, in order.
repaymentobjectrepayment only: the transfer played at the simulated custodian.
repayment.amount_usdt requiredstringThe full amount, 6 decimals.
repayment.network requiredstring
repayment.tx_hash requiredstringShaped like a hash; nothing moved.
depositobjectdeposit only.
deposit.idstring or null (uuid)Borrou's record of the deposit once the custody sync has applied it (as deposits[].id in GET /v1/loans/{reference}/collateral); null only if the sync has not reached it yet.
deposit.amount_btcstring or null
deposit.confirmationsintegerWhat the simulated custodian reports for the deposit.
deposit.travel_rule_statusstring
loan requiredobjectThe loan as it stands after the step and the custody sync.
loan.referencestring
loan.statusLoanStatus

UpperLimitReason

Why the loan is not at or above its upper limit without a breach, or why one side cannot be requested now. Codes; new ones may be added.

string: NOT_ACTIVE, REPAID, LIQUIDATION_UNDERWAY, DEFAULT_ATTESTED, PRICE_UNCHECKED, MARGIN_CALL_OPEN, LIQUIDATION_LEVEL, INTEREST_OVERDUE, BELOW_UPPER_LIMIT, NOTHING_AVAILABLE, INCREASE_IN_PROGRESS, SURPLUS_RETURN_IN_PROGRESS

UpperLimit

object

FieldTypeDescription
reference requiredstring
status requiredLoanStatus
as_of requiredstring (date-time)
btc_price_usdstring or nullThe checked price the position was judged at; null when there is none.
price_checked requiredboolean
collateralisation requiredobject
collateralisation.basisstring: PRINCIPAL_PLUS_INTEREST
collateralisation.current_bpsinteger or nullRounded down; null when not judged (no checked price, or a breach continuing).
collateralisation.initial_margin_bpsinteger
collateralisation.upper_limit_bpsinteger
debt_usdtUsdtAmount
collateral_btcstringCollateral still free for a decision, less whatever is already leaving the wallet.
above_upper_limit_without_breach requiredboolean
reasonUpperLimitReason or null
share_bps requiredintegerThe share of to_initial_margin_* that may be requested (9500 = 95%).
increase requiredobject
increase.availableboolean
increase.available_usdtUsdtAmount
increase.to_initial_margin_usdtUsdtAmount
increase.reasonUpperLimitReason or null
increase.open_request_idstring or null (uuid)
surplus_return requiredobject
surplus_return.availableboolean
surplus_return.available_btcstring
surplus_return.to_initial_margin_btcstring
surplus_return.reasonUpperLimitReason or null
surplus_return.open_request_idstring or null (uuid)

IncreaseRequestCreate

object

FieldTypeDescription
amount_usdt requiredUsdtAmount

IncreaseAcceptance

object

FieldTypeDescription
accepted_at requiredstring (date-time)When the borrower clicked: not before the request or the code it carries, and not in the future.
text_version requiredstring
text_sha256 requiredstringThe SHA-256 of the exact text shown, as acceptance_text.text_sha256.
partner_session_ref requiredstringYour opaque reference for the session or device. Not an email, phone number or IP address.
otp requiredstringThe six digits Borrou emailed the borrower.

IncreaseRequest

object

FieldTypeDescription
id requiredstring (uuid)
loan_reference requiredstring
status requiredstring: OFFERED, ACCEPTED, AWAITING_APPROVAL, PAID, EXPIRED, CANCELLEDAWAITING_APPROVAL from TFG entering the payout until the custodian has executed it; PAID once it has, as a return done is RETURNED.
approval_stagestring or null: TFG, CUSTODIAN, While AWAITING_APPROVAL: TFG's second operator, or the custodian's own approval. Never who.
reasonstring or nullWhy it expired or was cancelled (TIMEOUT, RATIO_BELOW_UPPER_LIMIT, AMOUNT_UNAVAILABLE, BREACH, LOAN_NOT_ACTIVE, LOAN_CHANGED, REPAID, SURPLUS_RETURN_IN_FLIGHT, CODE_ATTEMPTS_EXCEEDED, CANCELLED_BY_PARTNER, CANCELLED_BY_TFG), or, while ACCEPTED, that TFG rejected the payout or the custodian failed it (PAYOUT_REJECTED, PAYOUT_FAILED).
amount_usdt requiredUsdtAmount
principal_before_usdt requiredUsdtAmount
principal_after_usdt requiredUsdtAmount
annual_rate_bpsinteger
initial_margin_collateral_bpsinteger
upper_limit_collateral_bpsinteger
collateralisation_bps_at_requestinteger
btc_price_usd_at_requestUsdAmount
requested_viastring: API, CONSOLE
requested_at requiredstring (date-time)
acceptance_expires_at requiredstring (date-time)
acceptance_textobject or nullWhile OFFERED, the exact text the borrower must be shown, its version and SHA-256.
acceptance_text.versionstring
acceptance_text.textstring
acceptance_text.text_sha256string
one_time_codeobject or nullWhile OFFERED, when the latest code was emailed and until when it works. Never the code.
one_time_code.sent_atstring (date-time)
one_time_code.expires_atstring (date-time)
acceptanceobject or null
acceptance.channelstring: API, CLIENT_PORTAL
acceptance.accepted_atstring (date-time)
acceptance.text_versionstring
acceptance.text_sha256string
acceptance.partner_session_refstring or null
acceptance.one_time_code_verifiedboolean
payout_destination requiredstring: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS
paid_atstring or null (date-time)
ended_atstring or null (date-time)

SandboxIncreaseCode

object

FieldTypeDescription
increase_request_id requiredstring (uuid)
loan_reference requiredstring
otp requiredstring
expires_at requiredstring (date-time)
attempts_left requiredinteger

SurplusReturnRequestCreate

object

FieldTypeDescription
amount_btcstringLess than the available amount when the borrower asked for less. Without it, the share available when TFG enters it.

SurplusReturnRequest

object

FieldTypeDescription
id requiredstring (uuid)
loan_reference requiredstring
status requiredstring: REQUESTED, AWAITING_APPROVAL, RETURNED, REJECTED, CANCELLED, DECLINED, EXPIRED
approval_stagestring or null: TFG, CUSTODIAN,
reasonstring or nullWhy it ended (TIMEOUT, RATIO_BELOW_UPPER_LIMIT, AMOUNT_UNAVAILABLE, BREACH, LOAN_NOT_ACTIVE, REPAID, CANCELLED_BY_PARTNER, DECLINED_BY_TFG), or why the return did not go (REJECTED_BY_TFG, CUSTODIAN_FAILED).
amount_btcstring or null
cap_btc_at_requeststring
surplus_btc_at_requeststring
collateralisation_bps_at_requestinteger
btc_price_usd_at_requestUsdAmount
requested_at requiredstring (date-time)
expires_at requiredstring (date-time)
entered_atstring or null (date-time)
entered_amount_btcstring or null
returned_atstring or null (date-time)
tx_hashstring or null
destination requiredstring: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS
ended_atstring or null (date-time)