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/v1at 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: plannedwould be documented so integrations can be designed against it, and would answer404 not_founduntil it is built. None is today. - Webhook events whose
summaryisMinimum setare the minimum set v1 commits to; the others are additions. An event whosesummaryisPlannedcould 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
GET /v1/productsfor the product types you may offer, andGET /v1/quotefor indicative terms from your API product type, with aquote_tokenthat pins its terms for a few minutes.GET /v1/prices/btc-usdshows the checked reference price and whether its circuit breaker is open.POST /v1/applicationswith 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.POST /v1/applications/{id}/kyc-handoffto start KYC:PROVIDERreturns 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.- When the application's status is
APPROVED,POST /v1/loanswith its id (and, if you hold one, thequote_token). The loan is created atLOAN_CREATEDon 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). POST /v1/loans/{reference}/contractissues 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}/contractfollows it. On a product whosesignature_modeisCLICKWRAP_OTPthere is no link: show the borrower the acceptance text in the contract'sacceptance.text, ask Borrou to email them a one-time code (POST .../contract/acceptance-code), and send their click with that code (POST .../contract/accept).- Once signed,
GET /v1/loans/{reference}/collateral/deposit-addressgives the loan's own collateral wallet address, signed by Borrou (see Collateral address signatures), and a payment URI for a QR code;GET .../collateralfollows the deposits against the required BTC. - 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}/disbursementshows where it stands, and the loan becomesACTIVE.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/tokenExchange client credentials for an access 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
| Status | Description |
|---|---|
200 | An access token.
|
400 | invalid_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.
|
401 | invalid_client: client authentication failed. Which part was wrong is never said.
|
415 | unsupported_media_type.
|
429 | rate_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).
|
500 | internal_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.
|
quotes
GET /v1/quoteIndicative terms for a loan amount.GET /v1/prices/btc-usdThe checked BTC/USD reference price, its age, and whether the circuit breaker is open.
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
| Name | In | Type | Description |
|---|---|---|---|
principal_usdt required | query | UsdtAmount | |
product | query | ProductCode | The product code to quote (GET /v1/products). It must be your active API product; another is 409 product_unavailable, an unknown code 404. |
Responses
| Status | Description |
|---|---|
200 | The quote.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood but refused: the request asks for something this operation does not allow. The operation's description names its codes.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Status | Description |
|---|---|
200 | The checked price, or why there is none.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
products
GET /v1/productsThe product types you may offer through the API (active ones).GET /v1/products/{code}One of your API product types, active or not.
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
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The products.
| ||||||
400 | invalid_request: the request is malformed; the message names the field or parameter.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
429 | rate_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).
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
code required | path | ProductCode |
Responses
| Status | Description |
|---|---|
200 | The product.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
applications
GET /v1/applicationsList the partner's applications, newest first, cursor-paginated.POST /v1/applicationsSubmit a loan application for a borrower.GET /v1/applications/{id}Read one application.POST /v1/applications/{id}/cancelWithdraw an application before it becomes a loan.
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
| Name | In | Type | Description |
|---|---|---|---|
status | query | ApplicationStatus | |
limit | query | integer | |
starting_after | query | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | A page of applications.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | Created.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | The application.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Cancelled.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
clients
GET /v1/clientsYour borrowers, newest first, cursor-paginated.GET /v1/clients/{id}One of your borrowers.
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
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
starting_after | query | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | A page of clients.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | The client.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
kyc
POST /v1/applications/{id}/kyc-handoffStart KYC for the applicant, by Borrou's KYC provider or by your reliance attestation.
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-livedlink(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 is409 kyc_link_not_replayablewith 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 staysIN_REVIEWand the clientIN_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_approvedotherwise; 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_acceptedfor 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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | The hand-off.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
loans
GET /v1/loansList the partner's loans, newest first, cursor-paginated.POST /v1/loansTurn an approved application into a loan.GET /v1/loans/{reference}Read one loan, with the next step and who takes it.GET /v1/loans/{reference}/balanceWhat is owed now (principal plus simple interest accrued to now).GET /v1/loans/{reference}/coverageCollateral held, its value, the current LTV and the ladder.GET /v1/loans/{reference}/interest-periodsInterest billed per period, what is paid and what is overdue.GET /v1/loans/{reference}/scheduleUpcoming interest due dates, and the maturity if the loan has one.GET /v1/loans/{reference}/margin-callsOpen and past margin calls.GET /v1/loans/{reference}/amendmentsThreshold amendments TFG scheduled with notice, applied or lapsed.POST /v1/loans/{reference}/collateral/announcementsSay which loan a collateral transfer is for, by its transaction hash.GET /v1/loans/{reference}/liquidationThe loan's liquidation, read-only.GET /v1/loans/{reference}/contractWhere the contract stands.POST /v1/loans/{reference}/contractIssue the loan's contract and get the borrower's signing link.POST /v1/loans/{reference}/contract/acceptance-codeEmail the borrower a one-time code to accept a click-wrap contract.POST /v1/loans/{reference}/contract/acceptRecord the borrower's click-wrap acceptance of the contract, with the code Borrou emailed them.POST /v1/loans/{reference}/contract/resendSend the borrower the signing link again by email.GET /v1/loans/{reference}/disbursementWhere the payout stands, as states only.POST /v1/loans/{reference}/cancelCancel a loan before it is active, with a coded reason.
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
| Name | In | Type | Description |
|---|---|---|---|
status | query | LoanStatus | |
client_id | query | string (uuid) | One of your clients (GET /v1/clients). |
limit | query | integer | |
starting_after | query | string |
Responses
| Status | Description |
|---|---|
200 | A page of loans.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | Created.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The loan.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The balance.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The coverage.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The interest periods.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The schedule.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The margin calls.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The amendments.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The same announcement, already recorded.
|
201 | The announcement, recorded.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The liquidation, or liquidation null when there is none.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The contract.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | The contract, sent.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | The code was emailed; the contract as it stands.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Field | Type | Description |
|---|---|---|
otp required | string | The six digits Borrou emailed the borrower. |
contract_sha256 required | string | The stored contract's SHA-256, as document.sha256. |
text_version required | string | |
partner_session_ref required | string | An opaque reference of your own to the borrower's session. Never an email or an IP address. |
Responses
| Status | Description |
|---|---|
200 | Accepted and signed; the contract as it stands.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The reminder was queued; the contract as it stands.
All of: Contract, object
| ||||||
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
404 | not_found: no such resource for this partner.
| ||||||
409 | The 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.
| ||||||
429 | rate_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).
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The payout.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Cancelled.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
upper-limit
Above the upper limit (190% by default), an increase first, or surplus collateral back on request.
GET /v1/loans/{reference}/upper-limitWhere the loan stands against its upper limit, and what may be requested now.GET /v1/loans/{reference}/increase-requestsThe loan's increase requests, newest first, whoever made them.POST /v1/loans/{reference}/increase-requestsRequest an increase of the loan for the borrower.GET /v1/loans/{reference}/increase-requests/{id}One increase request, with its status and the reason it ended.POST /v1/loans/{reference}/increase-requests/{id}/acceptanceThe borrower's click accepting the increase, with the one-time code.POST /v1/loans/{reference}/increase-requests/{id}/cancelWithdraw an increase before TFG has entered its payout.POST /v1/loans/{reference}/increase-requests/{id}/resend-codeEmail the borrower a new one-time code for a request awaiting them.GET /v1/loans/{reference}/surplus-return-requestsThe loan's surplus-return requests, newest first.POST /v1/loans/{reference}/surplus-return-requestsThe borrower asks for surplus collateral back.GET /v1/loans/{reference}/surplus-return-requests/{id}One surplus-return request.POST /v1/loans/{reference}/surplus-return-requests/{id}/cancelWithdraw a surplus-return request TFG has not entered.GET /v1/sandbox/increase-requests/{id}/codeSandbox only: the one-time code Borrou emailed the borrower for an increase request.
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The position.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
limit | query | integer |
Responses
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The requests.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
404 | not_found: no such resource for this partner.
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | Requested; the borrower has been emailed the code.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | The request.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Accepted; TFG's approvals follow.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
415 | unsupported_media_type.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Cancelled.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Sent.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
limit | query | integer |
Responses
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The requests.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
404 | not_found: no such resource for this partner.
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | Requested; TFG has been told.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
503 | price_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.
|
One surplus-return request.
One surplus-return request, with its amount and status.
Bearer token with scope surplus:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | The request.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Cancelled.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) |
Responses
| Status | Description |
|---|---|
200 | The current code.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
500 | internal_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.
|
collateral
GET /v1/address-keysThe public keys collateral addresses are signed with (no authentication).GET /v1/loans/{reference}/collateralDeposits seen for the loan's collateral wallet, and the position against the required BTC.GET /v1/loans/{reference}/collateral/deposit-addressWhere the borrower sends the initial BTC collateral, from SIGNED_WALLET_READY until the loan is ACTIVE.GET /v1/loans/{reference}/collateral/top-up-addressWhere to send more collateral to an active loan (the wallet of the initial deposit).GET /v1/loans/{reference}/releaseThe collateral's return after full repayment.
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
| Status | Description |
|---|---|
200 | The keys.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The collateral status.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The deposit address.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | deposit_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The top-up instructions.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | loan_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The release status.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
repayments
GET /v1/loans/{reference}/repayment-instructionsHow to repay in full, in part (where the product allows) or the billed interest.GET /v1/loans/{reference}/repaymentsPayments seen and recorded against the loan, and their status.POST /v1/loans/{reference}/repaymentsAnnounce a repayment the borrower sent, by its transaction hash.
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The repayment instructions.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | nothing_to_repay: the loan is not active, or has been repaid in full and waits only for its collateral to go back.
|
429 | rate_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).
|
500 | internal_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.
|
503 | repayment_address_not_configured: Borrou has no USDT receiving address for the loan's network yet. Send nothing; contact TFG.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description |
|---|---|
200 | The repayments.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The same announcement, already recorded.
|
201 | The announcement, recorded.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
statements
GET /v1/loans/{reference}/statementsThe loan's monthly statements.GET /v1/loans/{reference}/statements/{period}One monthly statement, as JSON.
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | The statement periods.
| ||||||||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||||||||
403 | insufficient_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.
| ||||||||||||
404 | not_found: no such resource for this partner.
| ||||||||||||
429 | rate_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).
| ||||||||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
period required | path | string | A month in UTC, YYYY-MM. |
Responses
| Status | Description |
|---|---|
200 | The statement.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
webhooks
GET /v1/webhooks/subscriptionsThe partner's subscriptions, newest first.POST /v1/webhooks/subscriptionsRegister an HTTPS endpoint for events.DELETE /v1/webhooks/subscriptions/{id}Disable a subscription. Its pending deliveries are cancelled.GET /v1/webhooks/subscriptions/{id}/signing-secretThe HMAC-SHA256 secret that signs this subscription's deliveries.GET /v1/webhooks/healthEach subscription's delivery health over the last 24 hours.GET /v1/webhooks/deliveriesThe delivery log, newest first.POST /v1/webhooks/deliveries/{id}/replaySend an event again.
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
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The subscriptions.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
429 | rate_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).
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
201 | Created.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Disabled (also returned if it already was).
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) |
Responses
| Status | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
200 | The secret.
| |||||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| |||||||||
403 | insufficient_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.
| |||||||||
404 | not_found: no such resource for this partner.
| |||||||||
429 | rate_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).
| |||||||||
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | Health per subscription.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
subscription_id | query | string (uuid) | |
status | query | WebhookDeliveryStatus | |
limit | query | integer |
Responses
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | Deliveries.
| ||||||
400 | invalid_request: the request is malformed; the message names the field or parameter.
| ||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| ||||||
403 | insufficient_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.
| ||||||
429 | rate_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).
| ||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
202 | Queued.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
events
GET /v1/eventsYour events in the order Borrou published them, the same ones the webhooks carry, each with its position.
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
| Name | In | Type | Description |
|---|---|---|---|
after | query | integer | A 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.
|
types | query | string | Comma-separated event types to keep; every type when absent. |
limit | query | integer |
Responses
| Status | Description |
|---|---|
200 | A page of events.
|
400 | invalid_request: the request is malformed; the message names the field or parameter.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
429 | rate_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).
|
500 | internal_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.
|
sandbox
GET /v1/sandbox/loans/{reference}/contract/acceptance-codeSandbox only: the one-time code Borrou emailed the borrower to accept a click-wrap contract.POST /v1/sandbox/applications/{id}/kycSandbox: the borrower completes KYC and TFG decides the file.POST /v1/sandbox/loans/{reference}/signSandbox: the borrower signs the contract.POST /v1/sandbox/loans/{reference}/depositSandbox: a BTC deposit into the loan's collateral wallet.POST /v1/sandbox/loans/{reference}/advanceSandbox: run TFG's and the custodian's side of the loan's payout, or of its collateral's return.POST /v1/sandbox/loans/{reference}/repaymentSandbox: play the full repayment of an active loan.POST /v1/sandbox/pricesSandbox: move the simulated BTC price for your loans.
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Responses
| Status | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | The current code.
| |||||||||||||||
401 | invalid_token: missing, invalid, expired or revoked access token.
| |||||||||||||||
403 | insufficient_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.
| |||||||||||||||
404 | not_found: no such resource for this partner.
| |||||||||||||||
409 | The 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.
| |||||||||||||||
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The application, decided.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Signed.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | Deposited at the simulated custodian, and synced.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The steps run, and the loan after them.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
reference required | path | string | The loan reference, for example LN-0042. |
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The steps run, the transfer played, and the loan after them.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
404 | not_found: no such resource for this partner.
|
409 | The 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.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Unique 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
| Status | Description |
|---|---|
200 | The price your loans are judged on from the next check.
|
400 | invalid_request: the request is malformed; the message names the field. idempotency_key_required: the write carried no Idempotency-Key.
|
401 | invalid_token: missing, invalid, expired or revoked access token.
|
403 | insufficient_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.
|
422 | Understood 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.
|
429 | rate_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).
|
500 | internal_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.
|
service
GET /healthLiveness 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 /snippetsThe 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.txtAn index of the documentation for coding agents (no authentication; proposed, may change).GET /docsThis contract as one reference page (no authentication; proposed, may change).GET /openapi.yamlThis contract, as the OpenAPI 3.1 document (no authentication; proposed, may change).
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
| Status | Description | ||||||
|---|---|---|---|---|---|---|---|
200 | The process is serving requests.
| ||||||
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | The landing page.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
slug required | path | string: integration-guide, quickstart, channel-flow, integration-rules, errors, address-verification, sandbox, versioning, changelog |
Responses
| Status | Description |
|---|---|
200 | The guide.
|
404 | No such guide (a page of the portal), or the documentation is not published here (not_found).
|
429 | rate_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).
|
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | The page.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Name | In | Type | Description |
|---|---|---|---|
dir required | path | string: typescript, python, java, fixtures | |
file required | path | string |
Responses
| Status | Description |
|---|---|
200 | The file.
|
404 | No such file (a page of the portal), or the documentation is not published here (not_found).
|
429 | rate_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).
|
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | The index.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | The reference page.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
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
| Status | Description |
|---|---|
200 | The OpenAPI document.
|
404 | not_found: no such resource for this partner.
|
429 | rate_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).
|
500 | internal_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.
|
Webhook events
Each event is sent as a signed POST to your subscription's URL, and is also in GET /v1/events.
| Event | Data | Note |
|---|---|---|
application.submitted | ApplicationEventData | |
application.approved minimum set | ApplicationEventData | |
application.rejected minimum set | ApplicationEventData | |
application.cancelled | ApplicationEventData | |
kyc.started | KycEventData | You started KYC for an application's borrower (POST /v1/applications/{id}/kyc-handoff). |
kyc.completed | KycEventData | The 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_changed | KycEventData | TFG's decision on the borrower's file in its review, more information requested included. |
client.wallet_active | ClientWalletEventData | |
client.wallet_closed | ClientWalletEventData | |
loan.created | LoanEventData | |
contract.sent | ContractEventData | The contract was issued (POST /v1/loans/{reference}/contract, or on the console). GET /v1/loans/{reference}/contract has the signing link. |
contract.signed | LoanStatusEventData | |
contract.expired | ContractEventData | A contract sent and never signed, its loan cancelled. Beside loan.cancelled. |
collateral.wallet_assigned | LoanEventData | |
collateral.deposit_received minimum set | DepositEventData | |
collateral.deposit_held | DepositEventData | Held by the custodian and not counted as collateral. Never why. |
collateral.deposit_released minimum set | DepositEventData | |
collateral.requirement_met | LoanStatusEventData | |
loan.activated minimum set | LoanStatusEventData | |
loan.disbursed | MoneyEventData | |
loan.state_changed | LoanStatusEventData | Every transition, after the transition's own event where it has one. |
loan.coverage_warning minimum set | CoverageEventData | |
loan.margin_call_issued minimum set | MarginCallEventData | |
loan.margin_call_cured minimum set | MarginCallEventData | |
loan.margin_call_extended | MarginCallEventData | TFG extended an open call's deadline; the borrower is told the new one. |
loan.margin_call_expired | MarginCallEventData | |
loan.liquidation_level | CoverageEventData | |
loan.upper_limit_reached | UpperLimitEventData | |
loan.interest_billed | InterestEventData | |
loan.interest_overdue | InterestEventData | |
loan.interest_paid | MoneyEventData | |
loan.repayment_received minimum set | MoneyEventData | |
loan.partial_repayment_applied | MoneyEventData | |
repayment.seen | RepaymentEventData | Proposed: a repayment transfer the custodian saw at the loan's receiving reference, or one you announced. Nothing is recorded as paid yet. |
repayment.applied | MoneyEventData | Proposed: the repayment is done, entered and approved by two TFG people; sent with loan.repayment_received, the same data. |
repayment.short | RepaymentEventData | Proposed: 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_approaching | MaturityEventData | A bullet loan matures soon; the borrower was reminded a week and a day before. |
loan.maturity_defaulted | MaturityEventData | A 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_offered | IncreaseEventData | |
loan.increase_accepted | IncreaseEventData | |
loan.increased | MoneyEventData | |
loan.increase_expired | IncreaseEventData | |
loan.increase_cancelled | IncreaseEventData | |
loan.surplus_return_requested | SurplusRequestEventData | The borrower's surplus-return request, made through POST /v1/loans/{reference}/surplus-return-requests. |
loan.surplus_return_request_entered | SurplusRequestEventData | TFG entered the return, which waits for a second TFG approver; loan.surplus_collateral_returned once the custodian has executed it. |
loan.surplus_return_request_ended | SurplusRequestEventData | Cancelled by you, declined by TFG, or expired, without a return entered. |
loan.surplus_collateral_returned | MoneyEventData | |
loan.collateral_released minimum set | MoneyEventData | |
loan.liquidation_started minimum set | LiquidationEventData | One 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_filled | LiquidationEventData | |
loan.liquidation_completed minimum set | LiquidationEventData | |
loan.shortfall_recorded | LiquidationEventData | |
loan.terms_amendment_scheduled | TermsEventData | The 30-day notice; the new ladder applies from effective_at. |
loan.terms_amended | TermsEventData | |
loan.closed | LoanEventData | |
loan.cancelled | LoanStatusEventData |
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_requestinvalid_clientunsupported_grant_typeinvalid_scopeinvalid_tokeninsufficient_scopenot_foundunsupported_media_typepayload_too_largeidempotency_key_requiredidempotency_key_mismatchamount_above_limitamount_below_minimumproduct_unavailableduplicate_external_referenceborrower_mismatchapplication_not_cancellableapplication_not_approvedapplication_not_openexposure_limit_reachednetwork_not_accepteddestination_not_acceptedpayout_destination_requiredcollateral_return_destination_requireddestination_address_invalidquant_platform_unavailableinvalid_destinationsubscription_inactiveprice_unavailablerate_limitedsandbox_onlyinternal_errorkyc_handoff_not_openreliance_not_approvedcontract_not_issuablecontract_not_awaiting_signaturedeposit_address_unavailableloan_not_cancellableinvalid_quote_tokenquote_expiredquote_mismatchquote_terms_changedprovider_unavailablekyc_link_not_replayableloan_not_activenothing_to_repayrepayment_address_not_configuredloan_repaid_in_fulladdress_verification_pendingupper_limit_unavailableincrease_in_progresssurplus_return_in_progressincrease_not_openincrease_expiredincrease_not_cancellablesurplus_return_not_cancellableacceptance_text_mismatchacceptance_text_outdatedinvalid_accepted_atotp_not_issuedotp_invalidotp_expiredotp_usedotp_attempts_exhaustedsandbox_step_unavailableprice_move_out_of_bandlender_of_record_not_configuredcountry_not_acceptedborrower_not_eligiblesandbox_test_email_requiredcontract_not_awaiting_acceptancecontract_document_mismatchacceptance_code_rejectedlegal_clearance_pendingpartner_kyc_not_acceptedkyc_evidence_not_acceptedrepayment_detection_offrepayment_announced_differentlyasset_not_acceptedcollateral_announcement_not_takencollateral_transfer_already_announced
Schemas
Error
object
| Field | Type | Description |
|---|---|---|
error required | object | |
error.code required | string: 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 | Stable. New codes may be added. |
error.message required | string | For people. May change. |
error.request_id required | string (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
UsdAmount
string
Bps
integer
Reference
string
TokenRequest
object
| Field | Type | Description |
|---|---|---|
grant_type required | string client_credentials | |
scope | string | Space-separated subset of the credential's scopes. Defaults to all of them. |
client_id | string | |
client_secret | string |
TokenResponse
object
| Field | Type | Description |
|---|---|---|
access_token required | string | Opaque. Send it as Authorization: Bearer <token>; never parse or verify it. |
token_type required | string Bearer | |
expires_in required | integer | |
scope required | string |
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
| Field | Type | Description |
|---|---|---|
method required | string SIMPLE | |
accrual required | string: DAILY_ACT_360, SECOND_ACT_360 | DAILY_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 required | string or null: MONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL, | The billing period; null for a bullet loan. |
payable_days_after_period required | integer or null | Null for a bullet loan. |
default_interest_margin_bps required | Bps |
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
| Field | Type | Description |
|---|---|---|
ltv_basis required | string PRINCIPAL_PLUS_INTEREST | The debt every level is measured against. |
initial_margin_collateral_bps required | Bps | |
warning_collateral_bps required | integer or null | |
margin_call_collateral_bps required | Bps | |
liquidation_collateral_bps required | Bps | |
warning_ltv_bps required | integer or null | |
margin_call_ltv_bps required | Bps | |
liquidation_ltv_bps required | Bps | |
cure_rule required | string: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGIN | What closes a margin call on price alone. |
margin_call_cure_hours required | integer | |
upper_limit_collateral_bps required | Bps | At or above it TFG may offer the borrower more principal, back down to the initial margin. |
Quote
object
| Field | Type | Description |
|---|---|---|
principal_usdt required | UsdtAmount | |
btc_price_usd required | UsdAmount | |
price_fetched_at required | string (date-time) | |
price_divergence_flagged required | boolean | The price sources diverged and the lower price was used. |
required_collateral_btc required | BtcAmount | |
collateral_ratio_bps required | Bps | |
opening_ltv_bps required | Bps | |
annual_rate_bps required | Bps | |
interest required | InterestTerms | |
partial_repayments required | PartialRepayments | |
repayment_profile required | RepaymentProfile | |
term_days required | integer or null | A bullet loan's term in whole days, from the payout to the maturity; null with periodic interest. |
accrual_basis required | AccrualBasis | |
fees required | array of object | Fees the product type has configured; none today. |
fees[].kind required | string: ORIGINATION, LIQUIDATION | |
fees[].bps required | Bps | |
ladder required | Ladder | |
deposit_window_hours required | integer | |
limits required | object | |
limits.min_loan_usdt required | UsdtAmount | |
limits.max_loan_usdt required | UsdtAmount | |
limits.min_principal_usdt required | UsdtAmount | The same as min_loan_usdt, under the name the product's limits use. |
limits.max_principal_usdt required | UsdtAmount | The same as max_loan_usdt, under the name the product's limits use. |
parameter_source required | string PRODUCT_TYPE | |
product_type_id required | string (uuid) | |
product required | ProductCode | |
indicative required | boolean | True unless the token pins the price (price_pinned); then the collateral is the loan's while the quote lasts. |
price_pinned required | boolean | Whether quote_token also pins this checked price for POST /v1/loans (a deployment setting; an open decision, off unless set). |
quoted_at required | string (date-time) | |
quote_token required | string | Pins 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 required | string (date-time) |
ApplicationStatus
string: SUBMITTED, IN_REVIEW, APPROVED, REJECTED, CANCELLED, LOAN_CREATED
ApplicationCreate
object
| Field | Type | Description |
|---|---|---|
principal_usdt required | UsdtAmount | |
external_reference | Reference | Your id for the application. Unique per partner. |
borrower required | object | Write-only. Never returned, never sent in webhooks. Identity documents are not accepted here. |
borrower.reference | Reference | Your id for the borrower. Returned. |
borrower.full_name required | string | |
borrower.email required | string (email) | |
borrower.country required | string | The 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_evidence | KycEvidenceCreate |
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
| Field | Type | Description |
|---|---|---|
provider_name required | string | The KYC provider you used. |
applicant_reference required | string | Your provider's reference for the borrower. |
checks required | array of object | The checks that passed, each once, with the calendar day it passed (not in the future). |
checks[].check required | string: IDENTITY_DOCUMENT, LIVENESS, SCREENING, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS | |
checks[].passed_on required | string (date) | |
documents | array of object | References to the documents you hold, which TFG may ask for. Never the documents. |
documents[].kind required | string: IDENTITY_DOCUMENT, SELFIE, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS, OTHER | |
documents[].reference required | string | |
residence_country required | string | The country your checks established; must equal borrower.country. |
attestation_version required | string partner-kyc-attestation-v0.1-draft | The version of TFG's attestation text you attest. Borrou stores it with the text's SHA-256. |
ApplicationCancel
object
| Field | Type | Description |
|---|---|---|
reason required | string: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER |
Application
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
external_reference required | string or null | |
client_id required | string (uuid) | The borrower as your client (GET /v1/clients/{id}), shared by its applications. |
borrower required | object | |
borrower.reference required | string or null | |
principal_usdt required | UsdtAmount | |
status required | ApplicationStatus | |
status_changed_at required | string (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_evidence | object | Present 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 required | string (uuid) | |
kyc_evidence.checks required | array of object | |
kyc_evidence.checks[].check required | string: IDENTITY_DOCUMENT, LIVENESS, SCREENING, PROOF_OF_ADDRESS, SOURCE_OF_FUNDS | |
kyc_evidence.checks[].passed_on required | string (date) | |
kyc_evidence.tier_one_accepted required | boolean | The same as identity_checks_accepted; kept for integrations that read it. |
kyc_evidence.identity_checks_accepted required | boolean | Whether 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 required | string | |
kyc_evidence.attestation_sha256 required | string | |
kyc_evidence.checks_left_for_provider required | array of string | What the borrower still completes with Borrou's KYC provider (a KYC hand-off, mode PROVIDER). |
kyc_evidence.created_at required | string (date-time) | |
quote required | object | The indicative quote at submission. |
quote.btc_price_usd | UsdAmount | |
quote.price_fetched_at | string (date-time) | |
quote.annual_rate_bps | Bps | |
quote.collateral_ratio_bps | Bps | |
quote.opening_ltv_bps | Bps | |
quote.required_collateral_btc | BtcAmount | |
quote.parameter_source | string PRODUCT_TYPE | |
quote.product_type_id | string (uuid) | |
quote.indicative | boolean true | |
loan_reference required | string or null | Set once the application has become a loan. |
cancellation_reason required | string or null: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER, | |
cancelled_at required | string or null (date-time) | |
created_at required | string (date-time) | |
updated_at required | string (date-time) |
KycHandoffRequest
object or object
One of: object, object
| Field | Type | Description |
|---|---|---|
mode required | string PROVIDER |
| Field | Type | Description |
|---|---|---|
mode required | string RELIANCE | |
reliance required | object | References only; no documents and no personal data. |
reliance.attestation_reference required | string | Your reference for the KYC file you hold. |
reliance.provider_name required | string | The KYC provider you used. |
reliance.completed_on required | string (date) | When your KYC was completed; not in the future. |
KycHandoff
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
application_id required | string (uuid) | |
client_id required | string (uuid) | |
mode required | string: PROVIDER, RELIANCE | |
kyc_status required | KycStatus | |
link required | object or null | PROVIDER 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 required | string (uri) | |
link.expires_at required | string (date-time) | |
reliance required | object or null | RELIANCE only. What you attested, as Borrou keeps it. |
reliance.attestation_reference | string | |
reliance.provider_name | string | |
reliance.completed_on | string (date) | |
created_at required | string (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
| Field | Type | Description |
|---|---|---|
application_id required | string (uuid) | One of your applications, in status APPROVED. |
collateral_sender required | string: CLIENT, FINTECH | Who sends the BTC collateral. |
usdt_network required | string | The USDT network of the payout: one of the configured networks (today: TRON (TRC-20), Ethereum (ERC-20)), and accepted by the product type. |
quote_token | string | From GET /v1/quote: holds the loan to that quote's product terms. |
payout | object | Not offered. Only for a product whose destinations.payout is PARTNER_PROVIDED_ADDRESS, which no product is: the borrower's own account with you. |
payout.asset | string: USDT, USDC | The loan's payout asset. |
payout.network required | string | The loan's usdt_network. |
payout.address required | string | An address on that network; TRON's and EIP-55 checksums are verified. |
collateral_return | object | Not offered. Only for a product whose destinations.collateral_return is PARTNER_PROVIDED_ADDRESS, which no product is. |
collateral_return.network required | string: Bitcoin | |
collateral_return.address required | string | A 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
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
reference required | string | |
application_id required | string or null (uuid) | The application it was created from; null for a loan created in the console. |
status required | LoanStatus | |
health_flag required | HealthFlag | |
repaid_in_full required | boolean | True 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 required | UsdtAmount | The principal outstanding, after any increase or partial repayment. |
annual_rate_bps required | Bps | |
interest required | InterestTerms | |
partial_repayments required | PartialRepayments | |
repayment_profile required | RepaymentProfile | |
term_days required | integer or null | A bullet loan's term in whole days, from the payout to the maturity; null with periodic interest. |
accrual_basis required | AccrualBasis | |
risk_policies required | RiskPolicies | |
operating | OperatingSettings | |
collateral_ratio_bps required | Bps | |
channel required | string: WHITE_LABEL, API, DIRECT, INSTITUTIONAL | |
product_type_id required | string (uuid) | |
product | string or null | The product's code (GET /v1/products/{code}). |
ladder required | Ladder | The 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 required | string | Fixed at creation; never recalculated. |
origination_btc_price_usd required | UsdAmount | |
origination_price_fetched_at required | string (date-time) | |
collateral_sender required | string: CLIENT, FINTECH | |
usdt_network required | string | |
principal_asset | string: USDT, USDC | The 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 required | integer | The deposit window opens at signature. |
borrower_wallet required | object | The 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 required | string: NONE, REQUESTED, PENDING, ACTIVE | |
deposit_window_ends_at | string or null (date-time) | |
contract_sent_at | string or null (date-time) | |
signed_at | string or null (date-time) | |
activated_at | string or null (date-time) | |
matures_at required | string 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 required | string 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 required | StrikePrice | |
trigger_prices required | TriggerPrices | |
closed_at | string or null (date-time) | |
created_at required | string (date-time) | |
updated_at required | string (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
| Field | Type | Description |
|---|---|---|
price_usd required | UsdAmount | |
basis required | string: CORROBORATED, PRIMARY_ONLY, FALLBACK_ONLY | Whether both price sources agreed, or the price rests on one of them. |
price_at required | string (date-time) | The price reading's own time. |
payout_done_at required | string (date-time) | When the payout was done (the custodian's execution, else the confirming approval). |
collateral_btc required | string | The collateral held at the payout, 8 decimals. |
debt_usdt required | string | What the loan owed at the payout, 6 decimals. |
TriggerPriceLevels
object
| Field | Type | Description |
|---|---|---|
margin_call_price_usd required | string or null | The 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 required | string or null | The same for the liquidation level. |
collateral_btc required | string | |
debt_usdt required | string |
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
| Field | Type | Description |
|---|---|---|
at_strike required | TriggerPriceLevels or null | |
now required | TriggerPriceLevels or null |
LoanBalance
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
principal_usdt required | UsdtAmount | |
annual_rate_bps required | Bps | |
interest required | InterestTerms | |
outstanding required | object | What an ACTIVE loan owes today, from its records (zero in every other status). |
outstanding.principal_usdt required | string | |
outstanding.accrued_interest_usdt required | string | Interest accrued and not paid, default interest included: to the day for periodic interest, to the second for a bullet loan. |
outstanding.total_usdt required | string | Principal plus unpaid interest, the debt every ratio is measured on. |
outstanding.days_accrued required | integer | Whole days of interest since the payout (for a bullet loan, whole days elapsed; its interest runs by the second regardless). |
interest_due required | object | |
interest_due.interest_paid_usdt required | string | |
interest_due.overdue_usdt required | string | Billed interest past its due date and unpaid. |
interest_due.oldest_overdue_due_on required | string or null (date) | |
interest_due.next_due required | object or null | |
interest_due.next_due.due_on | string (date) | |
interest_due.next_due.amount_usdt | string | |
interest_due.overdue_since required | string or null (date-time) | Set once billed interest is unpaid past its grace, a breach of the loan's terms. |
LoanCoverage
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
health_flag required | HealthFlag | |
as_of required | string (date-time) | |
btc_price_usd required | string or null | |
price_fetched_at required | string or null (date-time) | |
price_divergence_flagged required | boolean or null | |
debt_usdt required | string or null | What the loan owes (principal plus unpaid interest), while collateral is held. |
cure_rule required | string: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGIN | |
cure_window_hours required | integer | |
collateral required | object | |
collateral.required_btc required | string | |
collateral.confirmed_btc required | string | Deposits the custodian released to the loan. |
collateral.held_btc required | string | What the loan holds: released deposits less anything that has left its wallet. The ratios use this. |
collateral.value_usd required | string or null | held_btc at the display price. |
collateralisation required | object | What 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 required | string PRINCIPAL_PLUS_INTEREST | |
collateralisation.current_bps required | integer or null | |
collateralisation.initial_margin_bps required | Bps | |
collateralisation.warning_bps required | integer or null | |
collateralisation.margin_call_bps required | Bps | |
collateralisation.liquidation_bps required | Bps | |
ltv required | object | The same position as LTV, for display; the levels are rounded to whole bps. |
ltv.basis required | string PRINCIPAL_PLUS_INTEREST | |
ltv.current_bps required | integer or null | |
ltv.warning_bps required | integer or null | |
ltv.margin_call_bps required | Bps | |
ltv.liquidation_bps required | Bps | |
open_margin_call required | object or null | |
open_margin_call.issued_at | string (date-time) | |
open_margin_call.deadline | string (date-time) | |
open_margin_call.required_topup_btc | string |
CollateralStatus
Interface-level custody data only (amounts, confirmations, screening and Travel Rule status, release). No origin address, no custody reference.
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
required_btc required | BtcAmount | |
deposit_tolerance required | DepositTolerance | |
position required | object | Cumulative over every deposit, against the required BTC. |
position.released_btc required | BtcAmount | Released to the loan by the custodian; only these count. |
position.pending_btc required | BtcAmount | Seen, still confirming or being screened. |
position.held_btc required | BtcAmount | Held by the custodian (screening or Travel Rule). |
position.remaining_btc required | BtcAmount | Still missing against the required BTC. |
position.excess_btc required | BtcAmount | Released beyond the required BTC; kept as buffer. |
position.requirement_met required | boolean | |
position.collateral_held_btc required | BtcAmount | What the loan holds now, released deposits less anything that left its wallet. |
tfg_review required | string: NOT_REQUIRED, PENDING, GO, NO_GO | TFG's go/no-go on a short or late deposit. |
deposits required | array of object | |
deposits[].id required | string (uuid) | |
deposits[].amount_btc required | BtcAmount | |
deposits[].tx_hash required | string | |
deposits[].confirmations required | integer | |
deposits[].detected_at required | string (date-time) | |
deposits[].screening required | string: PENDING, OK, HELD | The custodian's screening, as held or not; never why. |
deposits[].travel_rule required | string or null: OK, HELD, PENDING, | |
deposits[].release required | string: PENDING, RELEASED, HELD, RETURNED | |
deposits[].counts_as_collateral required | boolean | |
deposits[].released_at required | string or null (date-time) | |
deposits[].flag required | string: EXACT, SHORT_WITHIN_TOLERANCE, SHORT, OVERDEPOSIT, LATE | |
collateral_return required | null or CollateralReturn | Cancelled loans only. |
DebtEnded
What ended the debt, once it has; figures run to at.
object or null
| Field | Type | Description |
|---|---|---|
kind required | string: FULL_REPAYMENT, LIQUIDATION | |
at required | string (date-time) |
InterestPeriods
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
figures_to required | string or null (date-time) | Now, or when the debt ended. Null for a loan never paid out. |
debt_ended required | DebtEnded | |
annual_rate_bps required | Bps | |
interest required | InterestTerms | |
default_interest required | object | |
default_interest.annual_rate_bps required | Bps | |
default_interest.accrued_usdt required | UsdtAmount | |
default_interest.unpaid_usdt required | UsdtAmount | |
current_period required | object or null | The period running now, not billed yet. |
current_period.period_start | string (date) | |
current_period.period_end | string (date) | |
current_period.accrued_usdt | UsdtAmount | |
totals required | object | |
totals.billed_usdt required | UsdtAmount | |
totals.paid_usdt required | UsdtAmount | |
totals.unpaid_usdt required | UsdtAmount | |
totals.overdue_usdt required | UsdtAmount | |
overdue_since required | string or null (date-time) | Billed interest unpaid past its grace since then, a breach. |
data required | array of object | |
data[].period_start required | string (date) | |
data[].period_end required | string (date) | |
data[].interest_usdt required | UsdtAmount | |
data[].paid_usdt required | UsdtAmount | |
data[].unpaid_usdt required | UsdtAmount | |
data[].due_on required | string (date) | |
data[].grace_ends_on required | string (date) | The last of 3 business days after the due date. |
data[].status required | string: PAID, DUE, OVERDUE, SETTLED | |
data[].past_grace required | boolean |
LoanSchedule
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
interest required | InterestTerms | |
maturity required | object or null | A bullet loan's maturity; null with periodic interest, whose principal is due on full repayment. |
maturity.matures_at required | string (date-time) | |
maturity.term_days required | integer | |
maturity.defaulted_at required | string or null (date-time) | When it was recorded unpaid at the maturity. |
principal required | object or null | |
principal.outstanding_usdt | UsdtAmount | |
principal.due | string: ON_FULL_REPAYMENT, AT_MATURITY | |
upcoming required | array of object | |
upcoming[].kind required | string: BILLED, AWAITING_BILLING, CURRENT, FUTURE, MATURITY | MATURITY: a bullet loan's principal and interest, due together at its maturity. |
upcoming[].period_start required | string (date) | |
upcoming[].period_end required | string (date) | |
upcoming[].due_on required | string (date) | |
upcoming[].amount_usdt required | UsdtAmount | |
upcoming[].estimated required | boolean | True for a period not billed yet (awaiting billing included), assuming nothing changes. |
MarginCalls
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
cure_rule required | string: CURE_AT_MARGIN_CALL_LEVEL, CURE_AT_INITIAL_MARGIN | |
cure_window_hours required | integer | |
data required | array of object | |
data[].id required | string (uuid) | |
data[].status required | string: OPEN, EXPIRED, RESOLVED, CANCELLED | |
data[].resolution required | string 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 required | object | The position the call was issued at, as in loan.margin_call_issued. |
data[].trigger.collateral_bps | integer or null | |
data[].trigger.ltv_bps | integer | |
data[].target_collateral_bps required | Bps | The initial margin the top-up restores. |
data[].required_top_up_btc required | BtcAmount | |
data[].collateral_btc_at_issue required | BtcAmount | |
data[].issued_at required | string (date-time) | |
data[].issued_by required | string: TFG, BORROU | Who 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 required | string (date-time) | The cure window starts here. |
data[].deadline required | string (date-time) | |
data[].liquidation_level_reached_at required | string or null (date-time) | |
data[].resolved_at required | string or null (date-time) |
TopUpInstructions
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
asset required | string BTC | |
network required | string bitcoin | |
address required | string | |
same_as_deposit_address required | boolean true | |
qr_payload required | string | |
open_margin_call required | object or null | |
open_margin_call.id | string (uuid) | |
open_margin_call.required_top_up_btc | BtcAmount | |
open_margin_call.deadline | string (date-time) | |
open_margin_call.target_collateral_bps | Bps | |
address_attestation required | AddressAttestation or null | Borrou's signature on the address, as on the deposit address. Never null in live mode. |
AmendedTerms
object
TermAmendments
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
data required | array of object | |
data[].id required | string (uuid) | |
data[].status required | string: SCHEDULED, APPLIED, LAPSED | |
data[].notice_sent_at required | string (date-time) | |
data[].effective_on required | string (date) | The stated date, in the operations time zone. |
data[].effective_at required | string (date-time) | |
data[].applied_at required | string or null (date-time) | |
data[].terms required | AmendedTerms | |
data[].previous_terms required | AmendedTerms or null | The 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
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
valid_until required | string (date-time) | The end of the UTC day: the amounts hold for a payment TFG records before it. |
asset required | string USDT | |
network required | string | The loan's USDT network. |
destination required | object | |
destination.address required | string | Borrou's USDT receiving address on that network, its checksum checked when the service starts. |
destination.synthetic required | boolean | True in the sandbox: an address shaped like the network's whose checksum fails, so no wallet sends to it. |
destination.per_loan | boolean true | Proposed: present where repayment detection gave the loan its own receiving reference; the address (with memo) is this loan's. |
destination.kind | string: ADDRESS, MEMO | With per_loan: an address of the loan's own, or the receiving address with a memo the sender must include. |
destination.memo | string or null | With per_loan and kind MEMO: the tag the transfer must carry, or it cannot be matched to the loan. |
full required | object | |
full.available required | boolean | |
full.unavailable_reason required | RepaymentOptionReason | |
full.amount_usdt required | UsdtAmount | What 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 required | UsdtAmount | |
full.interest_usdt required | UsdtAmount | |
full.next_day_amount_usdt required | UsdtAmount | The same figure for a payment recorded the next UTC day: what is owed at that day's last instant. |
full.payment_reference required | string | |
partial required | object | |
partial.mode required | PartialRepayments | |
partial.available required | boolean | |
partial.unavailable_reason required | RepaymentOptionReason | |
partial.min_usdt required | string or null | What brings the loan back to its initial margin at the checked price now (0.000001 if it is there). |
partial.max_usdt required | string or null | One micro-USDT less than everything owed. |
partial.payment_reference required | string | |
interest required | object | |
interest.available required | boolean | |
interest.unavailable_reason required | RepaymentOptionReason | |
interest.amount_usdt required | UsdtAmount | Clears every billed period, unpaid default interest first. |
interest.default_interest_usdt required | UsdtAmount | |
interest.periods required | array of object | |
interest.periods[].period_start | string (date) | |
interest.periods[].period_end | string (date) | |
interest.periods[].due_on | string (date) | |
interest.periods[].unpaid_usdt | UsdtAmount | |
interest.periods[].overdue | boolean | |
interest.payment_reference required | string |
Repayment
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
kind required | string: FULL_REPAYMENT, PARTIAL_REPAYMENT, INTEREST | |
status required | string: PENDING_CONFIRMATION, CONFIRMED, REJECTED | |
amount_usdt required | UsdtAmount | |
interest_usdt required | string or null | How 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 required | string or null | |
tx_hash required | string or null | |
recorded_at required | string (date-time) | |
confirmed_at required | string or null (date-time) |
Repayments
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
data required | array of Repayment |
CollateralRelease
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
release required | object | |
release.status required | string: NOT_DUE, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED | |
release.basis required | string or null: FULL_REPAYMENT, CANCELLATION, | |
release.amount_btc required | string or null | |
release.destination required | string 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 required | MovementDestination or null | The same destination in the shape of GET /v1/loans/{reference}/disbursement's destination; null while not due. |
release.entered_at required | string or null (date-time) | |
release.instructed_at required | string or null (date-time) | |
release.executed_at required | string or null (date-time) | |
release.tx_hash required | string or null |
StatementSummary
object
| Field | Type | Description |
|---|---|---|
period required | string | |
from required | string (date-time) | |
to required | string (date-time) | Exclusive. |
provisional required | boolean | The 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
| Field | Type | Description |
|---|---|---|
status required | string: TO_BE_CONFIRMED, SET | |
legal_name required | string or null | |
jurisdiction required | string or null | |
registration_reference required | string or null |
Statement
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
lender_of_record required | LenderOfRecord | |
period required | string | |
from required | string (date-time) | |
to required | string (date-time) | |
provisional required | boolean | |
as_of required | string (date-time) | The close the figures run to (now, for the current month). |
status_at_close required | LoanStatus or null | |
debt_ended required | DebtEnded | |
principal required | object | opening + drawn − repaid − settled = closing. |
principal.opening_usdt | string | |
principal.drawn_usdt | string | The payout and any increase in the month. |
principal.repaid_usdt | string | The principal part of partial repayments. |
principal.settled_usdt | string | Settled by the full repayment or the liquidation. |
principal.closing_usdt | string | |
interest required | object | opening_unpaid + accrued + default_accrued − paid − settled = closing_unpaid. |
interest.annual_rate_bps | Bps | |
interest.opening_unpaid_usdt | string | |
interest.accrued_usdt | string | |
interest.default_accrued_usdt | string | |
interest.billed_usdt | string | |
interest.billed | array of object | |
interest.billed[].period_start | string (date) | |
interest.billed[].period_end | string (date) | |
interest.billed[].due_on | string (date) | |
interest.billed[].interest_usdt | string | |
interest.paid_usdt | string | |
interest.settled_usdt | string | |
interest.closing_unpaid_usdt | string | |
interest.closing_default_unpaid_usdt | string | |
owed required | object | |
owed.opening_usdt | string | |
owed.closing_usdt | string | |
liquidation_shortfall_usdt required | string or null | Still owed after a liquidation (full recourse). |
payments required | array of object | |
payments[].kind | string: INTEREST, PARTIAL_REPAYMENT, FULL_REPAYMENT | |
payments[].amount_usdt | string | |
payments[].interest_usdt | string | |
payments[].principal_usdt | string | |
payments[].paid_at | string (date-time) | |
payments[].tx_hash | string or null | |
collateral required | object | |
collateral.opening_btc | string | |
collateral.closing_btc | string | |
collateral.movements | array of object | |
collateral.movements[].kind | string: DEPOSIT, RETURN, LIQUIDATION | |
collateral.movements[].amount_btc | string | Signed. |
collateral.movements[].at | string (date-time) | |
collateral.movements[].tx_hash | string or null | Null for collateral that left for a sale. |
coverage_at_close required | object or null | On an active loan at the close, on the collateral monitor's last checked price for it. |
coverage_at_close.basis | string PRINCIPAL_PLUS_INTEREST | |
coverage_at_close.btc_price_usd | UsdAmount | |
coverage_at_close.price_as_of | string (date-time) | |
coverage_at_close.price_basis | string CHECKED_MONITOR_TICK | |
coverage_at_close.debt_usdt | string | |
coverage_at_close.collateral_btc | string | |
coverage_at_close.collateralisation_bps | integer | Rounded down. |
coverage_at_close.ltv_bps | integer | Derived, rounded. |
coverage_at_close.band | HealthFlag |
LoanLiquidation
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
liquidation required | object or null | |
liquidation.state | string: PROPOSED, APPROVED, SELLING, SETTLED, COMPLETED, ENDED | |
liquidation.trigger | string or null: LIQUIDATION_LEVEL, MARGIN_CALL_EXPIRED, NON_PAYMENT, INSOLVENCY, MISREPRESENTATION, REPUDIATION, ILLEGALITY, SECURITY_INEFFECTIVE, OTHER_BREACH, | |
liquidation.started_at | string or null (date-time) | |
liquidation.orders | array of object | |
liquidation.orders[].sequence | integer | |
liquidation.orders[].state | string: PROPOSED, APPROVED, SELLING, SETTLED, COMPLETED, ENDED | |
liquidation.orders[].size_btc | string | |
liquidation.orders[].filled_btc | string | |
liquidation.orders[].unfilled_btc | string or null | |
liquidation.orders[].average_price_usd | string or null | |
liquidation.orders[].reference_price_usd | string or null | The independent reference price the order was sent against. |
liquidation.orders[].price_vs_reference_bps | number or null | To 0.01 bps; negative when sold below the reference (read again at the second approval, else the proposal's). |
liquidation.orders[].proposed_at | string (date-time) | |
liquidation.orders[].approved_at | string or null (date-time) | |
liquidation.orders[].settled_at | string or null (date-time) | |
liquidation.sale | object or null | |
liquidation.sale.btc_sold | string | |
liquidation.sale.average_price_usd | string or null | |
liquidation.sale.reference_price_usd | string or null | |
liquidation.sale.price_vs_reference_bps | number or null | |
liquidation.sale.gross_proceeds_usdt | string | |
liquidation.sale.execution_fees_usdt | string | |
liquidation.sale.proceeds_usdt | string | What the execution route paid out. |
liquidation.waterfall | object or null | Once a second TFG user approved the settlement. |
liquidation.waterfall.proceeds_usdt | string | |
liquidation.waterfall.principal_usdt | string or null | |
liquidation.waterfall.interest_usdt | string or null | |
liquidation.waterfall.debt_settled_usdt | string | |
liquidation.waterfall.fees_usdt | string | |
liquidation.waterfall.surplus_usdt | string | To the borrower; zero on a loan whose terms keep the surplus. |
liquidation.waterfall.shortfall_usdt | string or null | Still owed by the borrower; zero on a non-recourse loan. |
liquidation.waterfall.surplus_retained_usdt | string or null | Kept by the lender on a loan whose terms keep the surplus; null otherwise. |
liquidation.waterfall.shortfall_not_owed_usdt | string or null | On a non-recourse loan, what the sale did not cover, which the borrower does not owe; null otherwise. |
liquidation.waterfall.approved_at | string (date-time) | |
liquidation.shortfall_owed_usdt | string or null | Still owed after the sale (full recourse). |
liquidation.shortfall_not_owed_usdt | string or null | On a non-recourse loan, what the sale did not cover: the borrower does not owe it. Null otherwise. |
liquidation.surplus_retained_usdt | string or null | What the lender kept of the sale surplus on a loan whose terms keep it. Null otherwise. |
liquidation.surplus_payout | object or null | |
liquidation.surplus_payout.status | string: AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED | |
liquidation.surplus_payout.amount | string | |
liquidation.surplus_payout.executed_at | string or null (date-time) | |
liquidation.surplus_payout.tx_hash | string or null | |
liquidation.leftover_collateral | object or null | What a smaller liquidation left in the loan's wallet, and its return to the borrower. |
liquidation.leftover_collateral.left_btc | string | |
liquidation.leftover_collateral.returned | object or null | |
liquidation.leftover_collateral.returned.status | string: AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED | |
liquidation.leftover_collateral.returned.amount | string | |
liquidation.leftover_collateral.returned.executed_at | string or null (date-time) | |
liquidation.leftover_collateral.returned.tx_hash | string 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
| Field | Type | Description |
|---|---|---|
code required | ProductCode | |
name required | string | |
status required | string: ACTIVE, INACTIVE | |
channel required | string API | |
annual_rate_bps required | Bps | |
interest required | InterestTerms | |
ladder required | Ladder and object | |
cure_window_hours required | integer | |
partial_repayments required | PartialRepayments | |
repayment_profile required | RepaymentProfile | |
term_days required | integer or null | A bullet loan's term in whole days, from the payout to the maturity; null with periodic interest. |
accrual_basis required | AccrualBasis | |
collateral_sizing required | string: QUOTED, MANUAL | QUOTED: from the initial margin at a checked price. MANUAL products cannot lend through the API. |
api_lendable required | boolean | Active and quoted, so a quote and a loan can use it. |
deposit_window_hours required | integer | |
signature_mode required | SignatureMode | |
risk_policies required | RiskPolicies | |
operating | OperatingSettings | |
limits required | object | |
limits.min_principal_usdt required | UsdtAmount | |
limits.max_principal_usdt required | UsdtAmount | |
fees required | array of object | Configured fees; none today. |
fees[].kind required | string: ORIGINATION, LIQUIDATION | |
fees[].bps required | Bps | |
usdt_networks required | array of string | The networks a payout may use with this product. |
CheckedPrice
object
| Field | Type | Description |
|---|---|---|
pair required | string BTC-USD | |
checked required | boolean | False while the breaker is open or the reading failed its checks; there is no price then. |
price_usd required | string or null | |
as_of required | string or null (date-time) | When the source reading the checks ran on was taken. |
age_seconds required | integer or null | |
basis required | string or null: CORROBORATED, PRIMARY_ONLY, FALLBACK_ONLY, | |
circuit_breaker required | object | |
circuit_breaker.status required | string: OPEN, CLOSED | |
refusal required | object or null | |
refusal.code | string: CIRCUIT_OPEN, CHECK_FAILED | |
refusal.reasons | array of string | |
read_at required | string (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
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
references required | array of string | The borrower references you sent on its applications. |
kyc required | object | |
kyc.status required | KycStatus | |
kyc.decided_at required | string or null (date-time) | |
kyc.handoff required | object or null | |
kyc.handoff.mode | string: PROVIDER, RELIANCE | |
kyc.handoff.started_at | string (date-time) | |
borrower_wallet required | object | The borrower's wallet at the custodian, by status only. |
borrower_wallet.status required | string: NONE, REQUESTED, PENDING, ACTIVE, CLOSED | |
loans required | array of object | |
loans[].reference required | string | |
loans[].status required | LoanStatus | |
created_at required | string (date-time) |
Page
object
| Field | Type | Description |
|---|---|---|
has_more required | boolean | |
next_cursor required | string or null | Pass as starting_after for the next page. |
ClientList
Page and object
All of: Page, object
| Field | Type | Description |
|---|---|---|
data required | array of Client |
ApplicationList
Page and object
All of: Page, object
| Field | Type | Description |
|---|---|---|
data required | array of Application |
LoanList
Page and object
All of: Page, object
| Field | Type | Description |
|---|---|---|
data required | array 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
| Field | Type | Description |
|---|---|---|
code required | string: 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 required | string: PARTNER, BORROWER, TFG, CUSTODIAN, NONE |
LoanDetail
Loan and object
All of: Loan, object
| Field | Type | Description |
|---|---|---|
next_action required | NextAction | |
receiving_references | array of ReceivingReference | Proposed; 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
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | string: NOT_ISSUED, SENT, SIGNED, EXPIRED | |
template_version required | string or null | |
sent_at required | string or null (date-time) | |
document required | object or null | The 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 required | string | |
document.generated_at required | string (date-time) | |
document.byte_length required | integer | |
document.sha256 required | string | |
signing_link required | object or null | SENT only: Borrou's e-signature link, for your app to open for the borrower. |
signing_link.url | string (uri) | |
signed required | object or null | SIGNED only. |
signed.signed_on | string (date) | |
signed.contract_reference | string | |
signed.recorded_at | string (date-time) | |
expired_at required | string or null (date-time) | EXPIRED only: when the loan was cancelled unsigned. |
signature_mode required | SignatureMode | |
acceptance required | object or null | CLICKWRAP_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 required | object or null | SENT only: the words the borrower accepts, to show beside the contract's SHA-256. |
acceptance.text.version required | string | |
acceptance.text.text required | string | |
acceptance.text.text_sha256 required | string | |
acceptance.code required | object or null | SENT only: when the latest code was emailed and until when it can be used; null before one is sent. |
acceptance.code.sent_at required | string (date-time) | |
acceptance.code.expires_at required | string (date-time) | |
acceptance.accepted required | object or null | The recorded acceptance, the evidence the signature rests on. |
acceptance.accepted.accepted_at required | string (date-time) | |
acceptance.accepted.text_version required | string | |
acceptance.accepted.text_sha256 required | string | |
acceptance.accepted.document_sha256 required | string | |
acceptance.accepted.partner_session_ref required | string |
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
| Field | Type | Description |
|---|---|---|
destinations required | object | |
destinations.payout required | string: CLIENT_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS | |
destinations.collateral_return required | string: CLIENT_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS | |
pricing_source required | string: PRODUCT, QUANT | |
liquidation_execution required | string: TFG_PROPOSES, ROUTE_EXECUTES | |
maturity_action required | string: 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
| Field | Type | Description |
|---|---|---|
margin_call_issuance required | string: MANUAL, AUTOMATIC | |
liquidation_surplus_policy required | string: RETURN, RETAIN | |
recourse required | string: 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
| Field | Type | Description |
|---|---|---|
reference required | string | |
asset required | string BTC | |
network required | string bitcoin | |
address required | string | The loan's own collateral wallet at the custodian. Never the borrower's wallet. |
required_btc required | BtcAmount | |
received_btc required | BtcAmount | Released to the loan so far. |
remaining_btc required | BtcAmount | |
deposit_tolerance required | DepositTolerance | |
qr_payload required | string | A BIP 21 URI: bitcoin:<address>?amount=<remaining>&label=<reference>. |
announce_transfers | boolean | Proposed. 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 required | string | The loan reference, for the borrower's records. |
memo_required required | boolean false | Bitcoin carries no memo; nothing has to travel with the transfer. |
deposit_window_ends_at required | string or null (date-time) | |
collateral_sender required | string: CLIENT, FINTECH | |
address_attestation required | AddressAttestation or null | Borrou'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
| Field | Type | Description |
|---|---|---|
algorithm required | string Ed25519 | |
key_id required | string | |
signed_at required | string (date-time) | |
statement required | string | Eight LF-separated name=value lines, no trailing newline: purpose, asset, network, address, loan_reference, wallet, key_id, signed_at. |
signature required | string | |
verification_code required | string | The 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
| Field | Type | Description |
|---|---|---|
algorithm required | string Ed25519 | |
statement_purpose required | string BORROU_COLLATERAL_ADDRESS_V1 | |
current_key_id required | string or null | The key new addresses are signed with; null while none is configured. |
keys required | array of object | |
keys[].key_id required | string | |
keys[].public_key required | string | The 32 raw public-key bytes in base64url (a JWK's x). |
keys[].public_key_pem required | string | The same key as an SPKI PEM. |
CollateralReturn
object
| Field | Type | Description |
|---|---|---|
status required | string: NOT_REQUIRED, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED | |
amount_btc required | BtcAmount | |
destination required | object | |
destination.kind | string: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS | |
executed_at required | string or null (date-time) | |
tx_hash required | string or null |
Disbursement
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | string: NOT_DUE, AWAITING_APPROVAL, APPROVED, INSTRUCTED, EXECUTED, NOT_APPLICABLE | |
amount_usdt required | UsdtAmount | |
usdt_network required | string | |
destination required | MovementDestination | Where 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 required | string or null (date-time) | |
executed_at required | string or null (date-time) | |
tx_hash required | string 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
| Field | Type | Description |
|---|---|---|
kind required | string: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS | |
wallet_status required | string or null: NONE, REQUESTED, PENDING, ACTIVE, |
LoanCancel
object
| Field | Type | Description |
|---|---|---|
reason required | string: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER |
LoanCancellation
object
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | string CANCELLED | |
from_status required | LoanStatus | |
reason required | string: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER | |
cancelled_at required | string (date-time) | |
contract required | object | |
contract.signing_link_withdrawn required | boolean | True 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 required | object | Collateral 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 required | string: NOT_REQUIRED, AWAITING_APPROVAL | |
collateral_return.amount_btc required | BtcAmount | |
collateral_return.destination required | object | |
collateral_return.destination.kind | string: 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
| Field | Type | Description |
|---|---|---|
url required | string (uri) | |
event_types required | array of WebhookEventType |
WebhookSubscription
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
url required | string | |
event_types required | array of WebhookEventType | |
status required | string: ACTIVE, DISABLED | |
created_at required | string (date-time) | |
updated_at required | string (date-time) | |
disabled_at required | string or null (date-time) |
WebhookDeliveryStatus
string: PENDING, SUCCEEDED, FAILED, CANCELLED
WebhookDelivery
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
subscription_id required | string (uuid) | |
event_id required | string (uuid) | |
event_type required | WebhookEventType | |
status required | WebhookDeliveryStatus | |
attempt_count required | integer | At 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_at | string or null (date-time) | |
last_attempt_at | string or null (date-time) | |
last_response_status | integer or null | |
last_error | string 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_at | string or null (date-time) | |
replay_of | string or null (uuid) | |
created_at required | string (date-time) |
WebhookHealth
object
| Field | Type | Description |
|---|---|---|
as_of required | string (date-time) | The instant the figures were read at. |
window_hours required | integer 24 | |
data required | array of WebhookSubscriptionHealth |
WebhookSubscriptionHealth
object
| Field | Type | Description |
|---|---|---|
subscription_id required | string (uuid) | |
status required | string: ACTIVE, DISABLED | |
state required | string: DELIVERING, FAILING, NO_ATTEMPTS, DISABLED | DISABLED for a disabled subscription; otherwise whether the latest attempt went through (DELIVERING) or failed (FAILING); NO_ATTEMPTS before the first. |
disabled_at required | string or null (date-time) | |
last_success_at required | string or null (date-time) | When the last delivery that went through was delivered. |
latest_attempt required | object or null | |
latest_attempt.at required | string (date-time) | |
latest_attempt.outcome required | string: SUCCEEDED, FAILED | |
latest_attempt.error required | string or null | The failed attempt's error class, as in WebhookDelivery.last_error. |
latest_attempt.http_status required | integer or null | The status your endpoint answered with, when it answered. |
failed_deliveries required | integer | Deliveries whose latest attempt, in the window, failed: still being retried or given up. |
given_up_deliveries required | integer | Of those, the deliveries that used every attempt and will not be tried again. |
pending_deliveries required | integer | Deliveries waiting to go out now. |
oldest_pending required | object or null | |
oldest_pending.delivery_id required | string (uuid) | |
oldest_pending.created_at required | string (date-time) | When it was queued. |
oldest_pending.attempt_count required | integer | |
oldest_pending.next_attempt_at required | string 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
| Field | Type | Description |
|---|---|---|
id required | string (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 required | WebhookEventType | |
api_version required | string v1 | |
occurred_at required | string (date-time) | When the change happened in Borrou. |
created_at required | string (date-time) | When Borrou recorded it. |
data required | object |
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
| Field | Type | Description |
|---|---|---|
position required | integer | Where 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
| Field | Type | Description |
|---|---|---|
data required | array of FeedEvent | |
next_cursor required | integer or null | A 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 required | boolean | More events are waiting now; false means you have reached the newest. |
LoanKeys
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
reference required | string |
ApplicationEventData
object
| Field | Type | Description |
|---|---|---|
application required | object | |
application.id required | string (uuid) | |
client required | object | Borrou's id for the borrower, your client. |
client.id required | string (uuid) | |
principal_usdt | string | application.submitted only. |
status | string: APPROVED, REJECTED | application.approved and application.rejected: TFG's decision on the borrower. |
reason_code | string: BORROWER_WITHDREW, DUPLICATE, PARTNER_DECISION, OTHER | application.cancelled only. |
KycEventData
object
| Field | Type | Description |
|---|---|---|
client required | object | |
client.id required | string (uuid) | |
application | object or null | kyc.started, and kyc.completed for a hand-off through the API (null otherwise). |
application.id required | string (uuid) | |
handoff_id | string 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. |
mode | string: PROVIDER, RELIANCE | kyc.started only. |
kyc_status | string: APPROVED, REJECTED, MORE_INFO_REQUESTED | kyc.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
| Field | Type | Description |
|---|---|---|
client required | object | |
client.id required | string (uuid) | |
status required | string: ACTIVE, CLOSED | |
from_status | string: PENDING, ACTIVE, CLOSED |
LoanEventData
loan.created adds the loan's terms; collateral.wallet_assigned and loan.closed carry the loan only.
object
ContractEventData
The e-signature provider's agreement reference stays in Borrou.
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
template_version | string | contract.sent: the contract template's version. |
issued_via | string: API, CONSOLE | contract.sent: through the API, or on the console. |
reason_code | string: PARTNER_REQUEST, TFG_DECISION, TTL_EXPIRED | contract.expired: why the loan was cancelled. |
LoanStatusEventData
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
from_status required | LoanStatus | |
status | LoanStatus | The new status (every event here but loan.cancelled). |
reason_code | string: PARTNER_REQUEST, TFG_DECISION, TTL_EXPIRED | loan.cancelled only. |
DepositEventData
No addresses, and for collateral.deposit_held no reason.
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
deposit_id required | string (uuid) | |
amount_btc required | string | |
tx_hash | string | collateral.deposit_received only. |
confirmations | integer | collateral.deposit_received only. |
CollateralAnnouncementRequest
object
| Field | Type | Description |
|---|---|---|
tx_hash required | string | The Bitcoin transaction's id. |
CollateralAnnouncement
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
loan_reference required | string | |
tx_hash required | string | |
announced_at required | string (date-time) | When Borrou recorded the announcement. |
status required | string AWAITING_CUSTODIAN | Recorded only: the collateral counts once the custodian reports this transaction and releases it. |
RepaymentAnnouncementRequest
object
| Field | Type | Description |
|---|---|---|
tx_hash required | string | The transfer's hash on its network. |
network required | string | One of Borrou's USDT networks, as usdt_network spells it. |
asset | string USDT | |
amount | UsdtAmount |
RepaymentAnnouncement
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
loan_reference required | string | |
source required | string ANNOUNCED | |
asset required | string USDT | |
network required | string | |
amount required | string or null | As announced; null when no amount was named. |
tx_hash required | string | |
seen_at required | string (date-time) | When Borrou recorded the announcement. |
status required | string AWAITING_TFG_ENTRY | A TFG person enters the repayment from it; a different one approves it. |
ReceivingReference
object
| Field | Type | Description |
|---|---|---|
network required | string | |
asset required | string USDT | |
kind required | string: ADDRESS, MEMO | |
address required | string | Borrou's receiving address for this loan: its own (ADDRESS), or the shared one with memo (MEMO). Never the borrower's. |
memo required | string or null | |
assigned_at required | string (date-time) |
RepaymentEventData
repayment.seen and repayment.short (proposed). No addresses.
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
source | string: DETECTED, ANNOUNCED | repayment.seen: seen by the custodian at the loan's receiving reference, or announced by you. |
asset | string: USDT, USDC | |
network | string | |
amount | string or null | The amount seen; null on an announcement that named none. |
tx_hash | string | |
seen_at | string (date-time) | |
owed_usdt | string | repayment.short: what the loan owed when the transfer was seen. |
short_usdt | string | repayment.short: how much is missing for a full repayment. |
as_of | string (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
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
amount_usdt | string | |
amount_btc | string | |
kind | string: FULL, PARTIAL | loan.repayment_received only; PARTIAL where the loan's product allows it. |
interest_usdt | string or null | The part that paid interest; null on a full repayment confirmed before the split was carried. |
principal_usdt | string or null | loan.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_usdt | string | loan.partial_repayment_applied: the principal left after it. |
matures_at | string or null (date-time) | loan.disbursed only: a bullet loan's maturity, set by the activation this payout caused; null for a periodic loan. |
destination | object or null | loan.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 required | string: PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS | |
increase_request_id | string (uuid) | loan.increased only. |
tx_hash | string | |
strike_price | object or null | loan.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_usd | UsdAmount | |
strike_price.margin_call_price_usd | string or null | The highest price, to the cent, at which the loan is at or below its margin-call level at the strike. |
strike_price.liquidation_price_usd | string or null | The 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
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
health_flag required | HealthFlag | |
from_health_flag | HealthFlag or null | |
collateral_bps | integer or null | The collateralisation the monitor judged, rounded down. |
MarginCallEventData
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
margin_call_id required | string (uuid) | |
collateral_bps | integer or null | loan.margin_call_issued: the collateralisation the call was issued at; loan.margin_call_expired: where it stood at the deadline. |
ltv_bps | integer | loan.margin_call_issued only: the same, as LTV. |
required_top_up_btc | string | loan.margin_call_issued and loan.margin_call_expired. |
notice_sent_at | string (date-time) | loan.margin_call_issued only: the cure window runs from here to the deadline. |
deadline | string (date-time) | loan.margin_call_issued, loan.margin_call_extended (the new deadline) and loan.margin_call_expired. |
issued_by | string 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_deadline | string (date-time) | loan.margin_call_extended only: the deadline the extension replaced. |
resolution | string: TOPPED_UP, PRICE_RECOVERED, WAIVED, PARTIALLY_REPAID | loan.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
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
collateral_bps required | integer | |
upper_limit_collateral_bps required | integer | |
available_increase_usdt required | string |
InterestEventData
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
period_start | string (date) | loan.interest_billed only. |
period_end | string (date) | loan.interest_billed only. |
annual_rate_bps | integer | loan.interest_billed only. |
amount_usdt | string | loan.interest_billed: the period's interest. |
due_on | string or null (date) | When it is payable (null on periods billed before it was carried). |
overdue_usdt | string | loan.interest_overdue only: billed interest unpaid past its grace. |
grace_ended_on | string (date) | loan.interest_overdue only. |
default_interest_usdt | string | loan.interest_overdue only. |
MaturityEventData
A bullet loan's maturity.
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
matures_at required | string (date-time) | |
owed_usdt required | string | loan.maturity_approaching: owed at the notice; loan.maturity_defaulted: owed at the maturity. |
days_before | integer | loan.maturity_approaching only: 7 or 1. |
recorded_at | string (date-time) | loan.maturity_defaulted only: when the default was recorded. |
principal_usdt | string | loan.maturity_defaulted only. |
interest_usdt | string | loan.maturity_defaulted only: unpaid interest at the maturity. |
default_rate_bps | integer | loan.maturity_defaulted only: what the debt bears from the maturity. |
IncreaseEventData
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
increase_request_id required | string (uuid) | |
amount_usdt | string | |
principal_before_usdt | string | loan.increase_offered only. |
expires_at | string (date-time) | loan.increase_offered only: when the offer lapses unaccepted. |
requested_via | string: API, CONSOLE | loan.increase_offered only: through the API, or on the console. |
channel | string: CLIENT_PORTAL, API | loan.increase_accepted only: where the borrower accepted. |
text_version | string | loan.increase_accepted only: the version of the text the borrower accepted. |
text_sha256 | string | loan.increase_accepted only: the SHA-256 of that text, as the request shows it. |
accepted_at | string (date-time) | loan.increase_accepted only. |
reason_code | string: 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 | loan.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
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
surplus_return_request_id required | string (uuid) | |
amount_btc | string or null | loan.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_btc | string | loan.surplus_return_requested only: the most that could go back when it was made. |
expires_at | string (date-time) | loan.surplus_return_requested only: when it lapses unentered. |
status | string: CANCELLED, DECLINED, EXPIRED | loan.surplus_return_request_ended only. |
reason_code | string | loan.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
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
amendment_id required | string (uuid) | |
warning_collateral_bps | integer or null | |
margin_call_collateral_bps required | integer | |
liquidation_collateral_bps required | integer | |
cure_window_hours required | integer | |
notice_sent_at required | string (date-time) | |
effective_at required | string (date-time) |
LiquidationEventData
object
| Field | Type | Description |
|---|---|---|
loan required | LoanKeys | |
amount_btc | string | loan.liquidation_started: the BTC in the order sent. |
filled_btc | string | loan.liquidation_order_filled: the BTC in one fill. |
price_usd | string | loan.liquidation_order_filled: its price. |
btc_sold | string | |
proceeds_usdt | string | |
debt_settled_usdt | string | |
surplus_usdt | string | loan.liquidation_completed: what goes back to the borrower; zero on a loan whose terms keep the surplus. |
shortfall_usdt | string or null | loan.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_usdt | string or null | loan.liquidation_completed: what the lender kept of the surplus on a loan whose terms keep it; null otherwise. |
shortfall_not_owed_usdt | string or null | loan.liquidation_completed: on a non-recourse loan, what the sale did not cover, which the borrower does not owe; null otherwise. |
SandboxKycDecision
object
| Field | Type | Description |
|---|---|---|
decision required | string: APPROVE, REJECT |
SandboxDeposit
amount_btc for a new deposit, or deposit_id to move one on.
object
| Field | Type | Description |
|---|---|---|
amount_btc | BtcAmount | |
confirmations | integer | The custodian's requirement when absent. |
travel_rule_status | string: OK, HELD, PENDING | |
deposit_id | string (uuid) | |
tx_hash | string | A 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
| Field | Type | Description |
|---|---|---|
btc_usd required | UsdAmount |
SandboxPrice
object
| Field | Type | Description |
|---|---|---|
btc_usd required | string | |
previous_btc_usd required | string | |
reference_btc_usd required | string | The price the checks last accepted, the step was measured from. |
max_step_bps required | integer | |
set_at required | string (date-time) |
SandboxResult
object
| Field | Type | Description |
|---|---|---|
simulated required | string: SIGNATURE, DEPOSIT, ADVANCE, REPAYMENT | |
steps | array of string: DISBURSEMENT_ENTERED, DISBURSEMENT_APPROVED, COLLATERAL_RETURN_ENTERED, COLLATERAL_RETURN_APPROVED, CUSTODIAN_EXECUTED, TRANSFER_SEEN, REPAYMENT_ENTERED, REPAYMENT_CONFIRMED | advance and repayment only, in order. |
repayment | object | repayment only: the transfer played at the simulated custodian. |
repayment.amount_usdt required | string | The full amount, 6 decimals. |
repayment.network required | string | |
repayment.tx_hash required | string | Shaped like a hash; nothing moved. |
deposit | object | deposit only. |
deposit.id | string 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_btc | string or null | |
deposit.confirmations | integer | What the simulated custodian reports for the deposit. |
deposit.travel_rule_status | string | |
loan required | object | The loan as it stands after the step and the custody sync. |
loan.reference | string | |
loan.status | LoanStatus |
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
| Field | Type | Description |
|---|---|---|
reference required | string | |
status required | LoanStatus | |
as_of required | string (date-time) | |
btc_price_usd | string or null | The checked price the position was judged at; null when there is none. |
price_checked required | boolean | |
collateralisation required | object | |
collateralisation.basis | string: PRINCIPAL_PLUS_INTEREST | |
collateralisation.current_bps | integer or null | Rounded down; null when not judged (no checked price, or a breach continuing). |
collateralisation.initial_margin_bps | integer | |
collateralisation.upper_limit_bps | integer | |
debt_usdt | UsdtAmount | |
collateral_btc | string | Collateral still free for a decision, less whatever is already leaving the wallet. |
above_upper_limit_without_breach required | boolean | |
reason | UpperLimitReason or null | |
share_bps required | integer | The share of to_initial_margin_* that may be requested (9500 = 95%). |
increase required | object | |
increase.available | boolean | |
increase.available_usdt | UsdtAmount | |
increase.to_initial_margin_usdt | UsdtAmount | |
increase.reason | UpperLimitReason or null | |
increase.open_request_id | string or null (uuid) | |
surplus_return required | object | |
surplus_return.available | boolean | |
surplus_return.available_btc | string | |
surplus_return.to_initial_margin_btc | string | |
surplus_return.reason | UpperLimitReason or null | |
surplus_return.open_request_id | string or null (uuid) |
IncreaseRequestCreate
object
| Field | Type | Description |
|---|---|---|
amount_usdt required | UsdtAmount |
IncreaseAcceptance
object
| Field | Type | Description |
|---|---|---|
accepted_at required | string (date-time) | When the borrower clicked: not before the request or the code it carries, and not in the future. |
text_version required | string | |
text_sha256 required | string | The SHA-256 of the exact text shown, as acceptance_text.text_sha256. |
partner_session_ref required | string | Your opaque reference for the session or device. Not an email, phone number or IP address. |
otp required | string | The six digits Borrou emailed the borrower. |
IncreaseRequest
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
loan_reference required | string | |
status required | string: OFFERED, ACCEPTED, AWAITING_APPROVAL, PAID, EXPIRED, CANCELLED | AWAITING_APPROVAL from TFG entering the payout until the custodian has executed it; PAID once it has, as a return done is RETURNED. |
approval_stage | string or null: TFG, CUSTODIAN, | While AWAITING_APPROVAL: TFG's second operator, or the custodian's own approval. Never who. |
reason | string or null | Why 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 required | UsdtAmount | |
principal_before_usdt required | UsdtAmount | |
principal_after_usdt required | UsdtAmount | |
annual_rate_bps | integer | |
initial_margin_collateral_bps | integer | |
upper_limit_collateral_bps | integer | |
collateralisation_bps_at_request | integer | |
btc_price_usd_at_request | UsdAmount | |
requested_via | string: API, CONSOLE | |
requested_at required | string (date-time) | |
acceptance_expires_at required | string (date-time) | |
acceptance_text | object or null | While OFFERED, the exact text the borrower must be shown, its version and SHA-256. |
acceptance_text.version | string | |
acceptance_text.text | string | |
acceptance_text.text_sha256 | string | |
one_time_code | object or null | While OFFERED, when the latest code was emailed and until when it works. Never the code. |
one_time_code.sent_at | string (date-time) | |
one_time_code.expires_at | string (date-time) | |
acceptance | object or null | |
acceptance.channel | string: API, CLIENT_PORTAL | |
acceptance.accepted_at | string (date-time) | |
acceptance.text_version | string | |
acceptance.text_sha256 | string | |
acceptance.partner_session_ref | string or null | |
acceptance.one_time_code_verified | boolean | |
payout_destination required | string: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS | |
paid_at | string or null (date-time) | |
ended_at | string or null (date-time) |
SandboxIncreaseCode
object
| Field | Type | Description |
|---|---|---|
increase_request_id required | string (uuid) | |
loan_reference required | string | |
otp required | string | |
expires_at required | string (date-time) | |
attempts_left required | integer |
SurplusReturnRequestCreate
object
| Field | Type | Description |
|---|---|---|
amount_btc | string | Less than the available amount when the borrower asked for less. Without it, the share available when TFG enters it. |
SurplusReturnRequest
object
| Field | Type | Description |
|---|---|---|
id required | string (uuid) | |
loan_reference required | string | |
status required | string: REQUESTED, AWAITING_APPROVAL, RETURNED, REJECTED, CANCELLED, DECLINED, EXPIRED | |
approval_stage | string or null: TFG, CUSTODIAN, | |
reason | string or null | Why 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_btc | string or null | |
cap_btc_at_request | string | |
surplus_btc_at_request | string | |
collateralisation_bps_at_request | integer | |
btc_price_usd_at_request | UsdAmount | |
requested_at required | string (date-time) | |
expires_at required | string (date-time) | |
entered_at | string or null (date-time) | |
entered_amount_btc | string or null | |
returned_at | string or null (date-time) | |
tx_hash | string or null | |
destination required | string: BORROWER_CUSTODIAN_WALLET, PARTNER_SETTLEMENT_ACCOUNT, PARTNER_PROVIDED_ADDRESS, ORIGIN_ADDRESS | |
ended_at | string or null (date-time) |