> For the complete documentation index, see [llms.txt](https://docs.qiro.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qiro.fi/developer-section/openapi-spec/models.md).

# Models

## The OAuthTokenResponse object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"OAuthTokenResponse":{"type":"object","additionalProperties":false,"required":["access_token","token_type","expires_in","scope"],"properties":{"access_token":{"type":"string","minLength":1},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","const":900},"scope":{"type":"string","description":"Space-delimited scopes granted to the OAuth client; grants may be narrower than the complete API surface."}}}}}}
```

## The Facility object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"Facility":{"type":"object","additionalProperties":false,"required":["facility_id","loc_address","client_id","client_name","client_type","status","currency","approved_limit","utilized_amount","available_amount","supported_settlement_assets","maximum_tenor_days","drawdown_eligibility","designated_wallet","resource_version","updated_at"],"properties":{"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"client_id":{"type":"string","description":"The partner's immutable identifier for the borrower."},"client_name":{"type":"string","description":"Qiro's authoritative stored borrower display name."},"client_type":{"type":"string","enum":["REMITTANCE_COMPANY"]},"status":{"$ref":"#/components/schemas/FacilityStatus"},"currency":{"type":"string","enum":["USDC","USDT"]},"approved_limit":{"$ref":"#/components/schemas/MoneyString"},"utilized_amount":{"$ref":"#/components/schemas/MoneyString"},"available_amount":{"$ref":"#/components/schemas/MoneyString"},"supported_settlement_assets":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"string","enum":["USDC","USDT"]}},"maximum_tenor_days":{"type":"integer","minimum":0},"drawdown_eligibility":{"$ref":"#/components/schemas/DrawdownEligibility"},"designated_wallet":{"$ref":"#/components/schemas/DesignatedWallet"},"resource_version":{"type":"integer","minimum":1},"updated_at":{"type":"string","format":"date-time"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"FacilityStatus":{"type":"string","enum":["ACTIVE","SUSPENDED","DEFAULTED","RECOVERY_IN_PROGRESS","CLOSURE_REQUESTED","CLOSED","EXPIRED"]},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"DrawdownEligibility":{"type":"object","additionalProperties":false,"required":["eligible","reasons"],"properties":{"eligible":{"type":"boolean"},"reasons":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["FACILITY_NOT_ACTIVE","DESIGNATED_WALLET_NOT_ACTIVE","DESIGNATED_WALLET_NOT_VERIFIED","FACILITY_STATE_MISMATCH","ACTIVE_DRAWDOWN_CONFLICT","FACILITY_PAYMENT_OVERDUE"]}}}},"DesignatedWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version","address","chain_id","purpose","status"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1},"address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","minimum":1},"purpose":{"type":"string","const":"BORROWING_AND_REPAYMENT"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]}}}}}}
```

## The FacilityStatus object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityStatus":{"type":"string","enum":["ACTIVE","SUSPENDED","DEFAULTED","RECOVERY_IN_PROGRESS","CLOSURE_REQUESTED","CLOSED","EXPIRED"]}}}}
```

## The DrawdownEligibility object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownEligibility":{"type":"object","additionalProperties":false,"required":["eligible","reasons"],"properties":{"eligible":{"type":"boolean"},"reasons":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["FACILITY_NOT_ACTIVE","DESIGNATED_WALLET_NOT_ACTIVE","DESIGNATED_WALLET_NOT_VERIFIED","FACILITY_STATE_MISMATCH","ACTIVE_DRAWDOWN_CONFLICT","FACILITY_PAYMENT_OVERDUE"]}}}}}}}
```

## The DesignatedWallet object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DesignatedWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version","address","chain_id","purpose","status"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1},"address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","minimum":1},"purpose":{"type":"string","const":"BORROWING_AND_REPAYMENT"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## The CreateDrawdownRequest object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CreateDrawdownRequest":{"type":"object","additionalProperties":false,"required":["client_id","client_name","amount","settlement_asset","use_case","business_transaction","requested_tenor_days","correlation_id"],"properties":{"client_id":{"type":"string","minLength":1,"maxLength":128},"client_name":{"type":"string","minLength":1,"maxLength":256,"description":"Descriptive only; Qiro's stored borrower name remains authoritative."},"amount":{"allOf":[{"$ref":"#/components/schemas/PositiveMoneyString"}],"description":"Positive display-unit amount using the configured token precision."},"settlement_asset":{"type":"string","enum":["USDC","USDT"]},"use_case":{"$ref":"#/components/schemas/DrawdownUseCase"},"business_transaction":{"$ref":"#/components/schemas/BusinessTransaction"},"requested_tenor_days":{"type":"integer","minimum":1},"correlation_id":{"type":"string","minLength":1,"maxLength":128}}},"PositiveMoneyString":{"type":"string","pattern":"^(?:0\\.(?:0*\\d*[1-9]\\d*)|[1-9]\\d*(?:\\.\\d+)?)$","description":"Positive decimal display-unit amount. JSON numbers are not accepted."},"DrawdownUseCase":{"type":"string","enum":["REMITTANCE_PREFUNDING","PAYOUT_BATCH_PREFUNDING","CORRIDOR_LIQUIDITY"]},"BusinessTransaction":{"type":"object","additionalProperties":false,"required":["type","industry_type","settle_transaction_id","destination_currency","destination_country"],"properties":{"type":{"type":"string","enum":["SINGLE_REMITTANCE","PAYOUT_BATCH","CORRIDOR_FUNDING","FX_TRADE","TREASURY_TRANSFER"]},"industry_type":{"type":"string","enum":["REMITTANCE_AND_MONEY_TRANSFER","CROSS_BORDER_PAYMENTS","B2B_PAYMENTS","SUPPLIER_PAYMENTS","PAYROLL","MARKETPLACE_PAYOUTS","MERCHANT_SETTLEMENT","E_COMMERCE","TRAVEL","EDUCATION","HEALTHCARE","FINANCIAL_SERVICES","PROFESSIONAL_SERVICES","LOGISTICS","OTHER"]},"settle_transaction_id":{"type":"string","minLength":1,"maxLength":128},"external_reference":{"type":"string","minLength":1,"maxLength":128},"source_currency":{"$ref":"#/components/schemas/CurrencyCode"},"source_country":{"$ref":"#/components/schemas/CountryCode"},"destination_currency":{"$ref":"#/components/schemas/CurrencyCode"},"destination_country":{"$ref":"#/components/schemas/CountryCode"}}},"CurrencyCode":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code."},"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code."}}}}
```

## The CancelDrawdownRequest object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CancelDrawdownRequest":{"type":"object","additionalProperties":false,"required":["reason_code","correlation_id"],"properties":{"reason_code":{"type":"string","enum":["UNDERLYING_TRANSACTION_CANCELLED","DUPLICATE_DRAWDOWN","INCORRECT_DETAILS","CLIENT_REQUESTED","COMPLIANCE_REVIEW","OPERATIONAL_ERROR","OTHER"]},"reason_description":{"type":"string","minLength":1,"maxLength":500},"correlation_id":{"type":"string","minLength":1,"maxLength":128}},"allOf":[{"if":{"properties":{"reason_code":{"const":"OTHER"}},"required":["reason_code"]},"then":{"properties":{"reason_description":{}},"required":["reason_description"]}}]}}}}
```

## The BusinessTransaction object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"BusinessTransaction":{"type":"object","additionalProperties":false,"required":["type","industry_type","settle_transaction_id","destination_currency","destination_country"],"properties":{"type":{"type":"string","enum":["SINGLE_REMITTANCE","PAYOUT_BATCH","CORRIDOR_FUNDING","FX_TRADE","TREASURY_TRANSFER"]},"industry_type":{"type":"string","enum":["REMITTANCE_AND_MONEY_TRANSFER","CROSS_BORDER_PAYMENTS","B2B_PAYMENTS","SUPPLIER_PAYMENTS","PAYROLL","MARKETPLACE_PAYOUTS","MERCHANT_SETTLEMENT","E_COMMERCE","TRAVEL","EDUCATION","HEALTHCARE","FINANCIAL_SERVICES","PROFESSIONAL_SERVICES","LOGISTICS","OTHER"]},"settle_transaction_id":{"type":"string","minLength":1,"maxLength":128},"external_reference":{"type":"string","minLength":1,"maxLength":128},"source_currency":{"$ref":"#/components/schemas/CurrencyCode"},"source_country":{"$ref":"#/components/schemas/CountryCode"},"destination_currency":{"$ref":"#/components/schemas/CurrencyCode"},"destination_country":{"$ref":"#/components/schemas/CountryCode"}}},"CurrencyCode":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code."},"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code."}}}}
```

## The DrawdownUseCase object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownUseCase":{"type":"string","enum":["REMITTANCE_PREFUNDING","PAYOUT_BATCH_PREFUNDING","CORRIDOR_LIQUIDITY"]}}}}
```

## The Drawdown object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"Drawdown":{"type":"object","additionalProperties":false,"required":["drawdown_id","facility_id","client","status","amount","amount_base_units","settlement_asset","use_case","business_transaction","designated_wallet","requested_tenor_days","duration_seconds","correlation_id","rejection","failure","blockchain_evidence","funded_drawdown_id","created_at","updated_at","resource_version"],"properties":{"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"client":{"$ref":"#/components/schemas/Client"},"status":{"$ref":"#/components/schemas/DrawdownStatus"},"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"settlement_asset":{"type":"string","enum":["USDC","USDT"]},"use_case":{"$ref":"#/components/schemas/DrawdownUseCase"},"business_transaction":{"$ref":"#/components/schemas/BusinessTransaction"},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"requested_tenor_days":{"type":"integer","minimum":1},"duration_seconds":{"$ref":"#/components/schemas/UnsignedIntegerString"},"correlation_id":{"type":"string","minLength":1,"maxLength":128},"rejection":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/DrawdownChainEvidence"}},"funded_drawdown_id":{"oneOf":[{"$ref":"#/components/schemas/UnsignedIntegerString"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"Client":{"type":"object","additionalProperties":false,"required":["client_id","client_name","client_type"],"properties":{"client_id":{"type":"string","minLength":1},"client_name":{"type":"string","minLength":1},"client_type":{"type":"string","const":"REMITTANCE_COMPANY"}}},"DrawdownStatus":{"type":"string","description":"Current normalized partner workflow state.","enum":["VALIDATING","READY_FOR_SUBMISSION","SUBMITTING","AWAITING_APPROVAL","FUNDED","REPAID","REJECTED","FAILED"]},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"DrawdownUseCase":{"type":"string","enum":["REMITTANCE_PREFUNDING","PAYOUT_BATCH_PREFUNDING","CORRIDOR_LIQUIDITY"]},"BusinessTransaction":{"type":"object","additionalProperties":false,"required":["type","industry_type","settle_transaction_id","destination_currency","destination_country"],"properties":{"type":{"type":"string","enum":["SINGLE_REMITTANCE","PAYOUT_BATCH","CORRIDOR_FUNDING","FX_TRADE","TREASURY_TRANSFER"]},"industry_type":{"type":"string","enum":["REMITTANCE_AND_MONEY_TRANSFER","CROSS_BORDER_PAYMENTS","B2B_PAYMENTS","SUPPLIER_PAYMENTS","PAYROLL","MARKETPLACE_PAYOUTS","MERCHANT_SETTLEMENT","E_COMMERCE","TRAVEL","EDUCATION","HEALTHCARE","FINANCIAL_SERVICES","PROFESSIONAL_SERVICES","LOGISTICS","OTHER"]},"settle_transaction_id":{"type":"string","minLength":1,"maxLength":128},"external_reference":{"type":"string","minLength":1,"maxLength":128},"source_currency":{"$ref":"#/components/schemas/CurrencyCode"},"source_country":{"$ref":"#/components/schemas/CountryCode"},"destination_currency":{"$ref":"#/components/schemas/CurrencyCode"},"destination_country":{"$ref":"#/components/schemas/CountryCode"}}},"CurrencyCode":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code."},"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code."},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"DrawdownChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["DrawdownRequested","DrawdownApproved","DrawdownRejected"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}}}
```

## The DrawdownStatus object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownStatus":{"type":"string","description":"Current normalized partner workflow state.","enum":["VALIDATING","READY_FOR_SUBMISSION","SUBMITTING","AWAITING_APPROVAL","FUNDED","REPAID","REJECTED","FAILED"]}}}}
```

## The DrawdownPreparation object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownPreparation":{"type":"object","additionalProperties":false,"required":["drawdown_id","status","expires_at","transaction"],"properties":{"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"status":{"type":"string","const":"SUBMITTING"},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The ObligationBreakdown object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"ObligationBreakdown":{"type":"object","additionalProperties":false,"required":["principal","interest","late_fees","total"],"properties":{"principal":{"$ref":"#/components/schemas/MoneyString"},"interest":{"$ref":"#/components/schemas/MoneyString"},"late_fees":{"$ref":"#/components/schemas/MoneyString"},"total":{"$ref":"#/components/schemas/MoneyString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The RepaymentMoney object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The RepaymentQuote object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentQuote":{"type":"object","additionalProperties":false,"required":["drawdown_id","facility_id","repayment_asset","funded_drawdown_id","loc_address","token_address","token_decimals","designated_wallet","facility","selected_drawdown","quoted_total","maximum_repayment","calculated_at"],"properties":{"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"funded_drawdown_id":{"$ref":"#/components/schemas/UnsignedIntegerString"},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"designated_wallet":{"$ref":"#/components/schemas/RepaymentDesignatedWallet"},"facility":{"type":"object","additionalProperties":false,"required":["interest","late_fees","total"],"properties":{"interest":{"$ref":"#/components/schemas/RepaymentMoney"},"late_fees":{"$ref":"#/components/schemas/RepaymentMoney"},"total":{"$ref":"#/components/schemas/RepaymentMoney"}},"description":"Facility-level obligations paid before the selected drawdown."},"selected_drawdown":{"type":"object","additionalProperties":false,"required":["principal","interest","late_fees","total"],"properties":{"principal":{"$ref":"#/components/schemas/RepaymentMoney"},"interest":{"$ref":"#/components/schemas/RepaymentMoney"},"late_fees":{"$ref":"#/components/schemas/RepaymentMoney"},"total":{"$ref":"#/components/schemas/RepaymentMoney"}}},"quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"maximum_repayment":{"allOf":[{"$ref":"#/components/schemas/RepaymentMoney"}],"description":"Buffered maximum encoded in the repayment transaction; the contract consumes only actual dues."},"calculated_at":{"type":"string","format":"date-time"}}},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"RepaymentDesignatedWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version","address","chain_id"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1},"address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The Repayment object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"Repayment":{"type":"object","additionalProperties":false,"required":["repayment_id","drawdown_id","facility_id","funded_drawdown_id","status","repayment_asset","loc_address","token_address","token_decimals","designated_wallet","latest_quoted_total","latest_maximum_repayment","correlation_id","failure","verified_allocation","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"repayment_id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"funded_drawdown_id":{"$ref":"#/components/schemas/UnsignedIntegerString"},"status":{"$ref":"#/components/schemas/RepaymentStatus"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"latest_quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"latest_maximum_repayment":{"description":"Fixed operation maximum established when the repayment was created. Later preparation calls refresh current dues but do not increase this cap.","$ref":"#/components/schemas/RepaymentMoney"},"verified_allocation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["total_paid_base_units","principal_paid_base_units","interest_paid_base_units","late_fees_paid_base_units"],"properties":{"total_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},{"type":"null"}]},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"RepaymentStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","REPAID","FAILED"]},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}}}
```

## The RepaymentDesignatedWallet object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentDesignatedWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version","address","chain_id"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1},"address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","minimum":1}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## The RepaymentStatus object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","REPAID","FAILED"]}}}}
```

## The RepaymentPreparation object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentPreparation":{"type":"object","additionalProperties":false,"required":["repayment_id","status","action","sequence","amount_base_units","maximum_repayment_base_units","expires_at","transaction"],"properties":{"repayment_id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/RepaymentStatus"},"action":{"type":"string","enum":["TOKEN_APPROVAL","REPAYMENT"]},"sequence":{"type":"integer","minimum":1},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"maximum_repayment_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"RepaymentStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","REPAID","FAILED"]},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## The CreateRepaymentResponse object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CreateRepaymentResponse":{"type":"object","additionalProperties":false,"required":["repayment","preparation"],"properties":{"repayment":{"$ref":"#/components/schemas/Repayment"},"preparation":{"$ref":"#/components/schemas/RepaymentPreparation"}}},"Repayment":{"type":"object","additionalProperties":false,"required":["repayment_id","drawdown_id","facility_id","funded_drawdown_id","status","repayment_asset","loc_address","token_address","token_decimals","designated_wallet","latest_quoted_total","latest_maximum_repayment","correlation_id","failure","verified_allocation","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"repayment_id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"funded_drawdown_id":{"$ref":"#/components/schemas/UnsignedIntegerString"},"status":{"$ref":"#/components/schemas/RepaymentStatus"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"latest_quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"latest_maximum_repayment":{"description":"Fixed operation maximum established when the repayment was created. Later preparation calls refresh current dues but do not increase this cap.","$ref":"#/components/schemas/RepaymentMoney"},"verified_allocation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["total_paid_base_units","principal_paid_base_units","interest_paid_base_units","late_fees_paid_base_units"],"properties":{"total_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},{"type":"null"}]},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"RepaymentStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","REPAID","FAILED"]},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"RepaymentPreparation":{"type":"object","additionalProperties":false,"required":["repayment_id","status","action","sequence","amount_base_units","maximum_repayment_base_units","expires_at","transaction"],"properties":{"repayment_id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/RepaymentStatus"},"action":{"type":"string","enum":["TOKEN_APPROVAL","REPAYMENT"]},"sequence":{"type":"integer","minimum":1},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"maximum_repayment_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}}}}}
```

## The FacilityClosureQuote object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosureQuote":{"type":"object","additionalProperties":false,"required":["facility_id","repayment_asset","loc_address","token_address","token_decimals","active_drawdown_ids","outstanding_drawdown_count","designated_wallet","facility","drawdowns","quoted_total","maximum_closure","calculated_at"],"properties":{"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"active_drawdown_ids":{"type":"array","items":{"$ref":"#/components/schemas/UnsignedIntegerString"}},"outstanding_drawdown_count":{"type":"integer","minimum":0},"designated_wallet":{"$ref":"#/components/schemas/RepaymentDesignatedWallet"},"facility":{"type":"object","additionalProperties":false,"required":["interest","late_fees","total"],"properties":{"interest":{"$ref":"#/components/schemas/RepaymentMoney"},"late_fees":{"$ref":"#/components/schemas/RepaymentMoney"},"total":{"$ref":"#/components/schemas/RepaymentMoney"}}},"drawdowns":{"type":"object","additionalProperties":false,"required":["principal","interest","late_fees","total"],"properties":{"principal":{"$ref":"#/components/schemas/RepaymentMoney"},"interest":{"$ref":"#/components/schemas/RepaymentMoney"},"late_fees":{"$ref":"#/components/schemas/RepaymentMoney"},"total":{"$ref":"#/components/schemas/RepaymentMoney"}}},"quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"maximum_closure":{"$ref":"#/components/schemas/RepaymentMoney"},"calculated_at":{"type":"string","format":"date-time"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"RepaymentDesignatedWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version","address","chain_id"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1},"address":{"$ref":"#/components/schemas/EvmAddress"},"chain_id":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The FacilityClosure object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosure":{"type":"object","additionalProperties":false,"required":["closure_id","facility_id","status","repayment_asset","loc_address","token_address","token_decimals","active_drawdown_ids","outstanding_drawdown_count","designated_wallet","latest_quoted_total","latest_maximum_closure","correlation_id","failure","verified_allocation","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"closure_id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/FacilityClosureStatus"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"active_drawdown_ids":{"type":"array","items":{"$ref":"#/components/schemas/UnsignedIntegerString"}},"outstanding_drawdown_count":{"type":"integer","minimum":0},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"latest_quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"latest_maximum_closure":{"description":"Fixed operation maximum established when the closure was created. Later preparation calls refresh current dues but do not increase this cap.","$ref":"#/components/schemas/RepaymentMoney"},"verified_allocation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["total_paid_base_units","principal_paid_base_units","interest_paid_base_units","late_fees_paid_base_units"],"properties":{"total_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},{"type":"null"}]},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"FacilityClosureStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","CLOSED","FAILED"]},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}}}
```

## The FacilityClosureStatus object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosureStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","CLOSED","FAILED"]}}}}
```

## The FacilityClosurePreparation object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosurePreparation":{"type":"object","additionalProperties":false,"required":["closure_id","status","action","sequence","amount_base_units","maximum_closure_base_units","expires_at","transaction"],"properties":{"closure_id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/FacilityClosureStatus"},"action":{"type":"string","enum":["TOKEN_APPROVAL","FACILITY_CLOSURE"]},"sequence":{"type":"integer","minimum":1},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"maximum_closure_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"FacilityClosureStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","CLOSED","FAILED"]},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## The CreateFacilityClosureResponse object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CreateFacilityClosureResponse":{"type":"object","additionalProperties":false,"required":["closure","preparation"],"properties":{"closure":{"$ref":"#/components/schemas/FacilityClosure"},"preparation":{"$ref":"#/components/schemas/FacilityClosurePreparation"}}},"FacilityClosure":{"type":"object","additionalProperties":false,"required":["closure_id","facility_id","status","repayment_asset","loc_address","token_address","token_decimals","active_drawdown_ids","outstanding_drawdown_count","designated_wallet","latest_quoted_total","latest_maximum_closure","correlation_id","failure","verified_allocation","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"closure_id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/FacilityClosureStatus"},"repayment_asset":{"type":"string","enum":["USDC","USDT"]},"loc_address":{"$ref":"#/components/schemas/EvmAddress"},"token_address":{"$ref":"#/components/schemas/EvmAddress"},"token_decimals":{"type":"integer","minimum":0,"maximum":18},"active_drawdown_ids":{"type":"array","items":{"$ref":"#/components/schemas/UnsignedIntegerString"}},"outstanding_drawdown_count":{"type":"integer","minimum":0},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"latest_quoted_total":{"$ref":"#/components/schemas/RepaymentMoney"},"latest_maximum_closure":{"description":"Fixed operation maximum established when the closure was created. Later preparation calls refresh current dues but do not increase this cap.","$ref":"#/components/schemas/RepaymentMoney"},"verified_allocation":{"oneOf":[{"type":"object","additionalProperties":false,"required":["total_paid_base_units","principal_paid_base_units","interest_paid_base_units","late_fees_paid_base_units"],"properties":{"total_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},{"type":"null"}]},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"FacilityClosureStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","CLOSED","FAILED"]},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"RepaymentMoney":{"type":"object","additionalProperties":false,"required":["amount","amount_base_units"],"properties":{"amount":{"$ref":"#/components/schemas/MoneyString"},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"FacilityClosurePreparation":{"type":"object","additionalProperties":false,"required":["closure_id","status","action","sequence","amount_base_units","maximum_closure_base_units","expires_at","transaction"],"properties":{"closure_id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/FacilityClosureStatus"},"action":{"type":"string","enum":["TOKEN_APPROVAL","FACILITY_CLOSURE"]},"sequence":{"type":"integer","minimum":1},"amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"maximum_closure_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}}}}}
```

## The CreateRecoveryRequest object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CreateRecoveryRequest":{"type":"object","additionalProperties":false,"required":["recovery_amount","recovery_reference"],"properties":{"recovery_amount":{"allOf":[{"$ref":"#/components/schemas/PositiveMoneyString"}],"description":"Partial or full facility recovery amount; it cannot exceed remaining frozen exposure."},"recovery_reference":{"type":"string","minLength":1,"maxLength":128,"description":"Partner-unique legal or operational recovery reference."}}},"PositiveMoneyString":{"type":"string","pattern":"^(?:0\\.(?:0*\\d*[1-9]\\d*)|[1-9]\\d*(?:\\.\\d+)?)$","description":"Positive decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The Recovery object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"Recovery":{"type":"object","additionalProperties":false,"required":["recovery_id","facility_id","recovery_reference","status","recovery_amount","recovery_asset","recoverable_amount_before","allocation","remaining_recoverable_amount","resulting_facility_status","designated_wallet","correlation_id","failure","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"recovery_id":{"type":"string","pattern":"^rcv_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"recovery_reference":{"type":"string"},"status":{"$ref":"#/components/schemas/RecoveryStatus"},"recovery_amount":{"$ref":"#/components/schemas/PositiveMoneyString"},"recovery_asset":{"type":"string","enum":["USDC","USDT"]},"recoverable_amount_before":{"$ref":"#/components/schemas/PositiveMoneyString"},"allocation":{"oneOf":[{"$ref":"#/components/schemas/ObligationBreakdown"},{"type":"null"}]},"remaining_recoverable_amount":{"oneOf":[{"$ref":"#/components/schemas/MoneyString"},{"type":"null"}]},"resulting_facility_status":{"oneOf":[{"type":"string","enum":["PARTIALLY_RECOVERED","RECOVERED"]},{"type":"null"}]},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"RecoveryStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","APPLIED","FAILED"]},"PositiveMoneyString":{"type":"string","pattern":"^(?:0\\.(?:0*\\d*[1-9]\\d*)|[1-9]\\d*(?:\\.\\d+)?)$","description":"Positive decimal display-unit amount. JSON numbers are not accepted."},"ObligationBreakdown":{"type":"object","additionalProperties":false,"required":["principal","interest","late_fees","total"],"properties":{"principal":{"$ref":"#/components/schemas/MoneyString"},"interest":{"$ref":"#/components/schemas/MoneyString"},"late_fees":{"$ref":"#/components/schemas/MoneyString"},"total":{"$ref":"#/components/schemas/MoneyString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The RecoveryStatus object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RecoveryStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","APPLIED","FAILED"]}}}}
```

## The RecoveryPreparation object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RecoveryPreparation":{"type":"object","additionalProperties":false,"required":["recovery_id","status","next_action","expires_at","transaction"],"properties":{"recovery_id":{"type":"string","pattern":"^rcv_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/RecoveryStatus"},"next_action":{"type":"string","enum":["TOKEN_APPROVAL","RECOVERY"]},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"RecoveryStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","APPLIED","FAILED"]},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The CreateRecoveryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CreateRecoveryResponse":{"type":"object","additionalProperties":false,"required":["recovery","preparation"],"properties":{"recovery":{"$ref":"#/components/schemas/Recovery"},"preparation":{"$ref":"#/components/schemas/RecoveryPreparation"}}},"Recovery":{"type":"object","additionalProperties":false,"required":["recovery_id","facility_id","recovery_reference","status","recovery_amount","recovery_asset","recoverable_amount_before","allocation","remaining_recoverable_amount","resulting_facility_status","designated_wallet","correlation_id","failure","blockchain_evidence","created_at","updated_at","resource_version"],"properties":{"recovery_id":{"type":"string","pattern":"^rcv_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"recovery_reference":{"type":"string"},"status":{"$ref":"#/components/schemas/RecoveryStatus"},"recovery_amount":{"$ref":"#/components/schemas/PositiveMoneyString"},"recovery_asset":{"type":"string","enum":["USDC","USDT"]},"recoverable_amount_before":{"$ref":"#/components/schemas/PositiveMoneyString"},"allocation":{"oneOf":[{"$ref":"#/components/schemas/ObligationBreakdown"},{"type":"null"}]},"remaining_recoverable_amount":{"oneOf":[{"$ref":"#/components/schemas/MoneyString"},{"type":"null"}]},"resulting_facility_status":{"oneOf":[{"type":"string","enum":["PARTIALLY_RECOVERED","RECOVERED"]},{"type":"null"}]},"designated_wallet":{"$ref":"#/components/schemas/BoundWallet"},"correlation_id":{"type":"string"},"failure":{"oneOf":[{"$ref":"#/components/schemas/WorkflowReason"},{"type":"null"}]},"blockchain_evidence":{"type":"array","items":{"$ref":"#/components/schemas/OperationChainEvidence"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"resource_version":{"type":"integer","minimum":1}}},"RecoveryStatus":{"type":"string","enum":["READY_FOR_SUBMISSION","SUBMITTING","CONFIRMING","APPLIED","FAILED"]},"PositiveMoneyString":{"type":"string","pattern":"^(?:0\\.(?:0*\\d*[1-9]\\d*)|[1-9]\\d*(?:\\.\\d+)?)$","description":"Positive decimal display-unit amount. JSON numbers are not accepted."},"ObligationBreakdown":{"type":"object","additionalProperties":false,"required":["principal","interest","late_fees","total"],"properties":{"principal":{"$ref":"#/components/schemas/MoneyString"},"interest":{"$ref":"#/components/schemas/MoneyString"},"late_fees":{"$ref":"#/components/schemas/MoneyString"},"total":{"$ref":"#/components/schemas/MoneyString"}}},"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."},"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}},"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}},"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"RecoveryPreparation":{"type":"object","additionalProperties":false,"required":["recovery_id","status","next_action","expires_at","transaction"],"properties":{"recovery_id":{"type":"string","pattern":"^rcv_[A-Za-z0-9]+$"},"status":{"$ref":"#/components/schemas/RecoveryStatus"},"next_action":{"type":"string","enum":["TOKEN_APPROVAL","RECOVERY"]},"expires_at":{"type":"string","format":"date-time"},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}}}}}
```

## The OperationChainEvidence object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"OperationChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["RepaymentMade","DrawdownRepaid","LOCClosed","RecoveryRecorded"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"},"total_amount_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"principal_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"interest_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"},"late_fees_paid_base_units":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The UnsignedTransaction object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"UnsignedTransaction":{"type":"object","additionalProperties":false,"required":["chain_id","to","data","value"],"properties":{"chain_id":{"type":"integer","minimum":1},"to":{"$ref":"#/components/schemas/EvmAddress"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$"},"value":{"$ref":"#/components/schemas/UnsignedIntegerString"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The DrawdownChainEvidence object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownChainEvidence":{"type":"object","additionalProperties":false,"required":["event_name","chain_id","contract_address","transaction_hash","log_index","block_number","block_hash","observed_at"],"properties":{"event_name":{"type":"string","enum":["DrawdownRequested","DrawdownApproved","DrawdownRejected"]},"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"log_index":{"type":"integer","minimum":0},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"block_hash":{"$ref":"#/components/schemas/TransactionHash"},"observed_at":{"type":"string","format":"date-time"}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The DrawdownWebhook object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["drawdown.funded","drawdown.rejected","drawdown.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string","minLength":1,"maxLength":128},"resource":{"$ref":"#/components/schemas/DrawdownWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"DrawdownWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"drawdown"},"id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["FUNDED","REJECTED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}},"WebhookBlockchainEvidence":{"type":"object","additionalProperties":false,"description":"Present for confirmed on-chain drawdown or repayment evidence and absent for off-chain validation rejection.","required":["chain_id","contract_address","transaction_hash","block_number","event_name","log_index"],"properties":{"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"event_name":{"type":"string","enum":["DrawdownApproved","DrawdownRejected","RepaymentMade","DrawdownRepaid","LOCClosed"]},"log_index":{"type":"integer","minimum":0}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The DrawdownWebhookResource object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"DrawdownWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"drawdown"},"id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["FUNDED","REJECTED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}}}}}
```

## The WebhookBlockchainEvidence object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"WebhookBlockchainEvidence":{"type":"object","additionalProperties":false,"description":"Present for confirmed on-chain drawdown or repayment evidence and absent for off-chain validation rejection.","required":["chain_id","contract_address","transaction_hash","block_number","event_name","log_index"],"properties":{"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"event_name":{"type":"string","enum":["DrawdownApproved","DrawdownRejected","RepaymentMade","DrawdownRepaid","LOCClosed"]},"log_index":{"type":"integer","minimum":0}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The PartnerWebhook object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"PartnerWebhook":{"oneOf":[{"$ref":"#/components/schemas/DrawdownWebhook"},{"$ref":"#/components/schemas/RepaymentWebhook"},{"$ref":"#/components/schemas/FacilityClosureWebhook"}],"discriminator":{"propertyName":"event_type"}},"DrawdownWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["drawdown.funded","drawdown.rejected","drawdown.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string","minLength":1,"maxLength":128},"resource":{"$ref":"#/components/schemas/DrawdownWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"DrawdownWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"drawdown"},"id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["FUNDED","REJECTED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}},"WebhookBlockchainEvidence":{"type":"object","additionalProperties":false,"description":"Present for confirmed on-chain drawdown or repayment evidence and absent for off-chain validation rejection.","required":["chain_id","contract_address","transaction_hash","block_number","event_name","log_index"],"properties":{"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"event_name":{"type":"string","enum":["DrawdownApproved","DrawdownRejected","RepaymentMade","DrawdownRepaid","LOCClosed"]},"log_index":{"type":"integer","minimum":0}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"RepaymentWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["repayment.completed","repayment.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string"},"resource":{"$ref":"#/components/schemas/RepaymentWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"RepaymentWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","drawdown_id","status","resource_version"],"properties":{"type":{"type":"string","const":"repayment"},"id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["REPAID","FAILED"]},"resource_version":{"type":"integer","minimum":1}}},"FacilityClosureWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["facility_closure.completed","facility_closure.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string"},"resource":{"$ref":"#/components/schemas/FacilityClosureWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"FacilityClosureWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"facility_closure"},"id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["CLOSED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}}}}}
```

## The RepaymentWebhook object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["repayment.completed","repayment.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string"},"resource":{"$ref":"#/components/schemas/RepaymentWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"RepaymentWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","drawdown_id","status","resource_version"],"properties":{"type":{"type":"string","const":"repayment"},"id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["REPAID","FAILED"]},"resource_version":{"type":"integer","minimum":1}}},"WebhookBlockchainEvidence":{"type":"object","additionalProperties":false,"description":"Present for confirmed on-chain drawdown or repayment evidence and absent for off-chain validation rejection.","required":["chain_id","contract_address","transaction_hash","block_number","event_name","log_index"],"properties":{"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"event_name":{"type":"string","enum":["DrawdownApproved","DrawdownRejected","RepaymentMade","DrawdownRepaid","LOCClosed"]},"log_index":{"type":"integer","minimum":0}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The RepaymentWebhookResource object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"RepaymentWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","drawdown_id","status","resource_version"],"properties":{"type":{"type":"string","const":"repayment"},"id":{"type":"string","pattern":"^rpy_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"drawdown_id":{"type":"string","pattern":"^drw_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["REPAID","FAILED"]},"resource_version":{"type":"integer","minimum":1}}}}}}
```

## The FacilityClosureWebhook object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosureWebhook":{"type":"object","additionalProperties":false,"required":["event_id","event_type","occurred_at","correlation_id","resource"],"properties":{"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"event_type":{"type":"string","enum":["facility_closure.completed","facility_closure.failed"]},"occurred_at":{"type":"string","format":"date-time"},"correlation_id":{"type":"string"},"resource":{"$ref":"#/components/schemas/FacilityClosureWebhookResource"},"blockchain":{"$ref":"#/components/schemas/WebhookBlockchainEvidence"}}},"FacilityClosureWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"facility_closure"},"id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["CLOSED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}},"WebhookBlockchainEvidence":{"type":"object","additionalProperties":false,"description":"Present for confirmed on-chain drawdown or repayment evidence and absent for off-chain validation rejection.","required":["chain_id","contract_address","transaction_hash","block_number","event_name","log_index"],"properties":{"chain_id":{"type":"integer","minimum":1},"contract_address":{"$ref":"#/components/schemas/EvmAddress"},"transaction_hash":{"$ref":"#/components/schemas/TransactionHash"},"block_number":{"$ref":"#/components/schemas/UnsignedIntegerString"},"event_name":{"type":"string","enum":["DrawdownApproved","DrawdownRejected","RepaymentMade","DrawdownRepaid","LOCClosed"]},"log_index":{"type":"integer","minimum":0}}},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The FacilityClosureWebhookResource object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"FacilityClosureWebhookResource":{"type":"object","additionalProperties":false,"required":["type","id","facility_id","status","resource_version"],"properties":{"type":{"type":"string","const":"facility_closure"},"id":{"type":"string","pattern":"^fcl_[A-Za-z0-9]+$"},"facility_id":{"type":"string","pattern":"^fac_[A-Za-z0-9]+$"},"status":{"type":"string","enum":["CLOSED","FAILED"]},"resource_version":{"type":"integer","minimum":1}}}}}}
```

## The Client object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"Client":{"type":"object","additionalProperties":false,"required":["client_id","client_name","client_type"],"properties":{"client_id":{"type":"string","minLength":1},"client_name":{"type":"string","minLength":1},"client_type":{"type":"string","const":"REMITTANCE_COMPANY"}}}}}}
```

## The BoundWallet object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"BoundWallet":{"type":"object","additionalProperties":false,"required":["wallet_id","wallet_version"],"properties":{"wallet_id":{"type":"string","pattern":"^wal_[A-Za-z0-9]+$"},"wallet_version":{"type":"integer","minimum":1}}}}}}
```

## The WorkflowReason object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"WorkflowReason":{"type":"object","additionalProperties":false,"required":["code"],"properties":{"code":{"type":"string","minLength":1}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code."},"message":{"type":"string","description":"Safe human-readable explanation."},"request_id":{"type":"string"},"correlation_id":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":true},"issues":{"type":"array","items":{"type":"string"}}}}}}}}}
```

## The MoneyString object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"MoneyString":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$","description":"Decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The PositiveMoneyString object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"PositiveMoneyString":{"type":"string","pattern":"^(?:0\\.(?:0*\\d*[1-9]\\d*)|[1-9]\\d*(?:\\.\\d+)?)$","description":"Positive decimal display-unit amount. JSON numbers are not accepted."}}}}
```

## The UnsignedIntegerString object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"UnsignedIntegerString":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}}}
```

## The CurrencyCode object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CurrencyCode":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code."}}}}
```

## The CountryCode object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code."}}}}
```

## The EvmAddress object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## The TransactionHash object

```json
{"openapi":"3.1.0","info":{"title":"Qiro Partner Instant Settlement API","version":"1.0.0-draft"},"components":{"schemas":{"TransactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}}}}
```
