For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a full-drawdown repayment

Reads fresh contract-backed dues, creates one durable idempotent repayment, and returns the first unsigned action in the same response. A prior dues preview is optional. Partners do not supply dues_id, amount, wallet, chain, contract, or allocation. The SDK generates and reuses the idempotency key and correlation ID for callers.

post
Required scopes
This endpoint requires the following scopes:
  • : Create and prepare repayments.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
drawdown_idstringRequired

Stable Qiro identifier for one partner drawdown workflow.

Example: drw_01J5T6CNR5ZEPattern: ^drw_[A-Za-z0-9]+$
Header parameters
X-Correlation-IDstring · min: 1 · max: 128Optional

Optional end-to-end request identifier. The SDK supplies one automatically; Qiro generates and echoes one when absent.

Example: cor_repayment_123
X-Idempotency-Keystring · uuidRequired

UUID protecting a money-sensitive operation from duplicate execution. Qiro SDK methods generate and reuse it automatically.

Example: 4c61128a-25c1-4f5f-9490-65e09bc93633
Responses
201

Repayment resource and first unsigned action created.

application/json
post/v1/drawdowns/{drawdown_id}/repayments
POST /v1/drawdowns/{drawdown_id}/repayments HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
X-Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
  "repayment": {
    "repayment_id": "rpy_01J5TC7H3ABM",
    "drawdown_id": "drw_01J5T6CNR5ZE",
    "facility_id": "fac_01J5T4K8D7X2",
    "funded_drawdown_id": "12",
    "status": "READY_FOR_SUBMISSION",
    "repayment_asset": "USDT",
    "loc_address": "0x57923bc2f063a06abc88a1a1c49109191034246e",
    "token_address": "0x4b5ad05a9e8c75536248c4fd917746605e31421e",
    "token_decimals": 18,
    "designated_wallet": {
      "wallet_id": "wal_01J5T4M4C6H8",
      "wallet_version": 3
    },
    "latest_quoted_total": {
      "amount": "500390.41",
      "amount_base_units": "500390410000000000000000"
    },
    "latest_maximum_repayment": {
      "amount": "500440.449041",
      "amount_base_units": "500440449041000000000000"
    },
    "correlation_id": "cor_repayment_123",
    "failure": null,
    "verified_allocation": null,
    "blockchain_evidence": [],
    "created_at": "2026-08-12T11:00:00Z",
    "updated_at": "2026-08-12T11:00:00Z",
    "resource_version": 1
  },
  "preparation": {
    "repayment_id": "rpy_01J5TC7H3ABM",
    "status": "READY_FOR_SUBMISSION",
    "action": "TOKEN_APPROVAL",
    "sequence": 1,
    "amount_base_units": "500440449041000000000000",
    "maximum_repayment_base_units": "500440449041000000000000",
    "expires_at": "2026-08-12T11:10:00Z",
    "transaction": {
      "chain_id": 421614,
      "to": "0x4b5ad05a9e8c75536248c4fd917746605e31421e",
      "data": "0x095ea7b3",
      "value": "0"
    }
  }
}

Last updated