FINANCE

Rebuild and clawback recognition when a contract cancels early

On an early Stripe cancellation, zero out future recognition, compute any over-recognized clawback against the remaining deferred balance.

CategoryFinance
Enginesim
Difficultyadvanced
Triggerevent
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerStripe subscription canceled (customer.subscription.deleted)StripeStripe
  • LogicBranch: cancellation before natural term end?
  • ActionLoad active schedule + recognized-to-date from SnowflakeSnowflakeSnowflake
  • LogicCompute remaining deferred balance and clawback amount
  • ActionZero future rows + write adjusting entry to SnowflakeSnowflakeSnowflake
  • OutputSend proposed journal entry to finance Slack for approvalSlack

What it does

Handles the messy case of mid-term cancellation. When a subscription is canceled before its term ends, the flow stops all future revenue recognition, calculates the remaining deferred balance to be released or refunded, and determines whether revenue was over-recognized and needs a clawback. It produces the adjusting journal entry and the corrected schedule.

When to use it

Use it when early cancellations and refunds create recognition cleanup that's easy to miss. Especially valuable when refund terms differ from straight-line recognition, leaving a balance that must be explicitly cleared.

How it works

  1. 1Stripe emits a `customer.subscription.deleted` (or cancellation) event.
  2. 2A branch checks whether cancellation occurred before the natural term end.
  3. 3The flow pulls the active schedule and recognized-to-date from Snowflake.
  4. 4It computes the remaining deferred balance and any over-recognized clawback amount.
  5. 5Future-period recognition rows are zeroed and the adjusting entry is written to Snowflake.
  6. 6The proposed journal entry and balance release are sent to finance via Slack for posting approval.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect StripeCustomers, subscriptions, payments.
  2. 2
    Connect SnowflakeWarehouses, queries, shares.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.