Skip to content

Name a statement receipt's period by its month - #1134

Closed
ls-bolt[bot] wants to merge 2 commits into
mainfrom
10-07-statement-month
Closed

ls-bolt[bot] wants to merge 2 commits into
mainfrom
10-07-statement-month

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Summary

  • POST /internal-accounts/{id}/confirm-statement takes statementMonth (YYYY-MM) in place of periodStart, and StatementDelivery returns it the same way.
  • A statement covers a calendar month, so the receipt names that month. The old field was a date that had to be the first of the month.
  • Updated the endpoint's 400 text, the Periodic Statements tag description, and the statements guide example.
  • GET /internal-accounts/{id}/balance-changes: the cursor description now says to send it unchanged with the same account, startDate and endDate as the page that issued it, and that it expires after 24 hours. The 400 text covers a cursor issued for another window, or one that has expired.

Compatibility

This changes the request and response shape of confirm-statement. The endpoint is new, and no integrator sends receipts yet.

Test plan

  • make build, make lint-openapi: the spec bundles and lints clean (only pre-existing warnings).

Requested by @benwgold

statementMonth (YYYY-MM) replaces periodStart on confirm-statement, so a
receipt states the month it covers instead of a date that must be the first.

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

mintlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 8, 2026, 6:27 AM

@vercel

vercel Bot commented Oct 7, 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 Oct 8, 2026 6:27am UTC
grid-flow-builder Ignored Ignored Preview Oct 8, 2026 6:27am UTC
grid-wallet-demo Ignored Ignored Preview Oct 8, 2026 6:27am UTC

Request Review

@ls-bolt ls-bolt Bot added the bolt label Oct 7, 2026
@ls-bolt

ls-bolt Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@github-actions github-actions Bot added the breaking-change Introduces a breaking change to the OpenAPI spec label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

oasdiff reports 2 error / 1 warning changes to openapi.yaml.
This PR will need approval from an API reviewer before merge.

Errors (2)

  • POST /internal-accounts/{id}/confirm-statement — added the new required request property statementMonth [new-required-request-property].
  • POST /internal-accounts/{id}/confirm-statement — removed the required property periodStart from the response with the 200 status [response-required-property-removed].

Warnings (1)

Show sample
  • POST /internal-accounts/{id}/confirm-statement — removed the request property periodStart [request-property-removed].

Detected by oasdiff. Full report: job summary or the oasdiff-report artifact.

Copy link
Copy Markdown

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

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical risk] Changes the public API contract for statement receipts.

The PR appears safe to merge; no actionable issues were found.

What we checked:

  • Statement pages keep their dates: The example keeps the account path and dates fixed. It sends each nextCursor unchanged, so it follows the new paging instructions.

Summary

This PR names statement receipts with statementMonth in YYYY-MM form instead of periodStart.

  • Updates the request, response, endpoint descriptions, and statement example.
  • Documents that balance-change cursors belong to one account and date window and expire after 24 hours.
  • Keeps the modular source and both published bundles aligned.

Reviews (2) · Last reviewed commit: "Say a balance-changes cursor is bound to..." · Reviewed by Greptile

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@benwgold
benwgold marked this pull request as ready for review October 8, 2026 07:17
@benwgold benwgold closed this Oct 8, 2026
benwgold added a commit that referenced this pull request Oct 9, 2026
## Summary

- `POST /internal-accounts/{id}/confirm-statement` takes
`statementMonth` (`YYYY-MM`) in place of `periodStart`, and
`StatementDelivery` returns it the same way.
- A statement covers a calendar month, so the receipt names that month.
The old field was a date that had to be the first of the month.
- Updated the endpoint's 400 text, the Periodic Statements tag
description, and the statements guide example.
- `GET /internal-accounts/{id}/balance-changes`: `BalanceChange` no
longer has a `fee` field. One transaction can produce several balance
changes (a withdrawal's fee posted beside its payout, a debit and its
refund), so a per-line fee had to pick a line and could count the fee
twice. A fee is already inside `amount`, and `fees` on `GET
/transactions/{id}` gives it once per transaction. The endpoint
description, the statements guide's total-fees row and example code (the
separate fee-line-items row is gone), and the guide drops the
ATM-surcharge note, and the changelog now take the period's fees from
the transactions.
- `GET /internal-accounts/{id}/balance-changes`: the `cursor`
description now says to send it unchanged with the same account,
`startDate` and `endDate` as the page that issued it. A cursor does not
expire, so a platform can pause between pages. The 400 text covers a
cursor issued for another account or window.

## Compatibility

This changes the request and response shape of `confirm-statement` and
drops `fee` from `BalanceChange`. Both endpoints are new, and no
integrator calls them yet.

## Test plan

- `make build`, `make lint`: the spec bundles and lints clean (only
pre-existing warnings).
- `node --check` on the statements guide's example code.

Requested by @benwgold


Original PR: #1134

---------

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

This branch was successfully deployed

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

Labels

bolt breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants