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.
- : Create and prepare repayments.
Stable Qiro identifier for one partner drawdown workflow.
drw_01J5T6CNR5ZEPattern: ^drw_[A-Za-z0-9]+$Optional end-to-end request identifier. The SDK supplies one automatically; Qiro generates and echoes one when absent.
cor_repayment_123UUID protecting a money-sensitive operation from duplicate execution. Qiro SDK methods generate and reuse it automatically.
4c61128a-25c1-4f5f-9490-65e09bc93633Repayment resource and first unsigned action created.
Invalid schema, field format, or correlation identifier.
The bearer token is missing, invalid, or expired.
The authenticated partner does not own the resource or lacks the required scope.
The drawdown was not found for the authenticated partner.
Idempotency, workflow state, or verified facility identity conflicts with the request.
The request is valid but rejected by facility, policy, liquidity, or contract rules.
Contract, RPC, subgraph, or reconciliation infrastructure is temporarily unavailable.
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