Skip to content

Add ruleBasedAccountId and report a sweep's depositor as its source - #1066

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-23-rule-based-sweep-source
Closed

ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-23-rule-based-sweep-source

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #1069.

Summary

  • Adds optional ruleBasedAccountId to Transaction, so it appears on both IncomingTransaction and OutgoingTransaction. It's set only on the transaction that sweeps a deposit out of a RULE_BASED account.
  • On those sweep transactions, source is now the party that made the deposit (REALTIME_FUNDING with the originator fields). It used to be an ACCOUNT source pointing at the rule-based account, which is now reported in ruleBasedAccountId instead.
  • Documents that the sandbox fund endpoint reports a placeholder ACH depositor on a rule-based sweep.

Example INCOMING_PAYMENT.COMPLETED for a sweep

{
  "source": {
    "sourceType": "REALTIME_FUNDING",
    "currency": "USD",
    "accountHolderName": "NORTHWIND TRADING LLC",
    "accountIdentifier": "****6789",
    "bankName": "Chase Bank",
    "bankIdentifier": "021000021",
    "paymentRail": "ACH",
    "remittanceInformation": "INV 4417",
    "traceNumber": "021000020123456"
  },
  "ruleBasedAccountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000011",
  "destination": { "destinationType": "ACCOUNT", "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000005" }
}

A given rail fills only one of endToEndId and traceNumber. RTP and FedNow use endToEndId; ACH and wire use traceNumber.

Test plan

  • make build and make lint-openapi are clean.

🤖 Generated with Claude Code

Requested by @bsiaotickchong

📊 PR Presentation · commit 091ce29e68c095d3aaf474fbbd859ff078fd1ba1 · 2026-09-23

…eep's source

A deposit into a RULE_BASED account is reported through the transaction that
sweeps it. That transaction now names the depositor as its REALTIME_FUNDING
source and the rule-based account as ruleBasedAccountId.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 23, 2026, 10:17 PM

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Sep 23, 2026 10:16pm UTC
grid-flow-builder Ignored Ignored Preview Sep 23, 2026 10:16pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 23, 2026 10:16pm UTC

Request Review

@ls-bolt ls-bolt Bot added the bolt label Sep 23, 2026

Copy link
Copy Markdown

This stack of pull requests is managed by Graphite. Learn more about stacking.

bsiaotickchong added a commit that referenced this pull request Sep 23, 2026
…1069)

## Summary

- Adds optional `ruleBasedAccountId` to `Transaction`, so it appears on
both `IncomingTransaction` and `OutgoingTransaction`. It's set only on
the transaction that sweeps a deposit out of a `RULE_BASED` account.
- On those sweep transactions, `source` is now the party that made the
deposit (`REALTIME_FUNDING` with the originator fields). It used to be
an `ACCOUNT` source pointing at the rule-based account, which is now
reported in `ruleBasedAccountId` instead. When no depositor is known,
`source` falls back to that `ACCOUNT` source.
- Documents that the sandbox fund endpoint reports a placeholder ACH
depositor on a rule-based sweep.

## Example `INCOMING_PAYMENT.COMPLETED` for a sweep

```json
{
  "source": {
    "sourceType": "REALTIME_FUNDING",
    "currency": "USD",
    "accountHolderName": "NORTHWIND TRADING LLC",
    "accountIdentifier": "****6789",
    "bankName": "Chase Bank",
    "bankIdentifier": "021000021",
    "paymentRail": "ACH",
    "remittanceInformation": "INV 4417",
    "traceNumber": "021000020123456"
  },
  "ruleBasedAccountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000011",
  "destination": { "destinationType": "ACCOUNT", "accountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000005" }
}
```

A given rail fills only one of `endToEndId` and `traceNumber`. RTP and
FedNow use `endToEndId`; ACH and wire use `traceNumber`.

## Test plan

- `make build` and `make lint-openapi` are clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Requested by @bsiaotickchong

<!-- presentation:start -->
📊 [PR
Presentation](https://agent-artifacts.dev.dev.sparkinfra.net/presentations/grid-api/1066/)
· commit `091ce29e68c095d3aaf474fbbd859ff078fd1ba1` · 2026-09-23
<!-- presentation:end -->


Original PR: #1066

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: bsiaotickchong <bsiaotickchong@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
staging - mintlify — 091ce29e Deployed Sep 23, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants