Transactions

reconciliation.refund.apply

Save the exact reviewed mixed transfer/fee refund from reconciliation.refund.preview. Requires the same selected entries, amounts, reviewed revisions, sourceFingerprint, evidence-supported reason, confirmed:true and a stable idempotencyKey. Atomically reuses the existing bank-only credit record when selected, allocates cash once, links both original reversals, preserves source documents and returns before/after postings. No money moves or notifications are sent.

POST/api/v1/accounting/reconciliation.refund.apply

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_reconciliation_refund_apply

Fields

  • transactionIdstring (ID)Required

    The ID of a bank or card transaction, from transactions.list.

  • expectedTransactionRevisionintegerRequired

    The bank transaction's current revision, from the last time you read it.

    at most 9007199254740991 · greater than 0

  • transferEntryIdstring (ID)Required

    The ID of the related record.

  • expectedTransferRevisionintegerRequired

    The related record's current revision, from the last time you read it.

    at most 9007199254740991 · greater than 0

  • feeEntryIdstring (ID)Required

    The ID of the related record.

  • expectedFeeRevisionintegerRequired

    The related record's current revision, from the last time you read it.

    at most 9007199254740991 · greater than 0

  • transferAmountMinorstringRequired

    An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50.

    Matches ^[1-9]\d{0,18}$

  • feeAmountMinorstringRequired

    An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50.

    Matches ^[1-9]\d{0,18}$

  • creditEntryIdstring (ID)

    The ID of the related record.

  • expectedCreditRevisioninteger

    The related record's current revision, from the last time you read it.

    at most 9007199254740991 · greater than 0

  • sourceFingerprintstringRequired

    SHA-256 hash as 64 lowercase hex characters

  • reasonstringRequired

    A short note saying why, kept in the record's history.

    10–1000 characters

  • confirmedtrueRequired
  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/reconciliation.refund.apply \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "transactionId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "expectedTransactionRevision": 3,
  "transferEntryId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "expectedTransferRevision": 3,
  "feeEntryId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "expectedFeeRevision": 3,
  "transferAmountMinor": "1",
  "feeAmountMinor": "1",
  "sourceFingerprint": "9f2b5c1d7e3a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c",
  "reason": "Synthetic example from the docs",
  "confirmed": true
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/reconciliation.refund.apply
curl https://app.getoatmilk.com/api/v1/accounting/reconciliation.refund.apply \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "transactionId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "expectedTransactionRevision": 3,
  "transferEntryId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "expectedTransferRevision": 3,
  "feeEntryId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "expectedFeeRevision": 3,
  "transferAmountMinor": "1",
  "feeAmountMinor": "1",
  "sourceFingerprint": "9f2b5c1d7e3a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c",
  "reason": "Synthetic example from the docs",
  "confirmed": true
}'

More in Transactions.