Finalize draft settlement
Finalizes the settlement, marking all linked financial statements as paid. This is an irreversible action. Once finalized, the settlement document and its fee breakdown become the official financial record for the period.
Authorization
bearer In: header
Path Parameters
Response Body
application/json
curl -X POST "https://api.miracle.com/v1/settlements/string/finalize"{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
"livemode": true,
"merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"currency": "string",
"period": {
"from": "string",
"to": "string"
},
"grossVolume": {
"currency": "string",
"valueMinor": 0
},
"refundVolume": {
"currency": "string",
"valueMinor": 0
},
"chargebackVolume": {
"currency": "string",
"valueMinor": 0
},
"merchantFee": {
"currency": "string",
"valueMinor": 0
},
"feeBreakdown": {
"providerFee": {
"currency": "string",
"valueMinor": 0
},
"platformFee": {
"currency": "string",
"valueMinor": 0
},
"tenantFee": {
"currency": "string",
"valueMinor": 0
},
"partnerCommission": {
"currency": "string",
"valueMinor": 0
}
},
"rollingReserveHeld": {
"currency": "string",
"valueMinor": 0
},
"rollingReserveReleased": {
"currency": "string",
"valueMinor": 0
},
"recurrentFees": {
"currency": "string",
"valueMinor": 0
},
"adjustment": {
"currency": "string",
"valueMinor": 0
},
"adjustmentDirection": "credit",
"adjustmentReason": "string",
"netToMerchant": {
"currency": "string",
"valueMinor": 0
},
"status": "draft",
"generationMode": "automatic",
"linkedSettlementId": "a5b4ae99-b2c7-4597-bf95-7fafa4c7a116",
"createdAt": "string",
"updatedAt": "string",
"finalizedAt": "string",
"deletedAt": "string"
}
}Generate settlement for merchant + period
Generates a new settlement for a merchant over a single-currency period. Aggregates payment, refund, chargeback, and fee data. To create an adjustment settlement that revises a previously finalized settlement, supply `linkedSettlementId`, `adjustmentDirection`, `adjustmentAmount`, and `adjustmentReason`.
Get settlement by ID
Returns the full details of a single settlement, including aggregated volumes, fee breakdown, rolling reserve, adjustments, and net amount paid to the merchant. Returns 404 if the settlement does not exist or is not visible to the caller.