Skip to content

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

Merged
benwgold merged 5 commits into
mainfrom
10-07-statement-month
Oct 9, 2026
Merged

benwgold merged 5 commits into
mainfrom
10-07-statement-month

Conversation

@benwgold

@benwgold benwgold commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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

benwgold and others added 2 commits October 7, 2026 00:26
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>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ls-bolt ls-bolt Bot added bolt breaking-change Introduces a breaking change to the OpenAPI spec labels Oct 8, 2026
@greptile-apps

greptile-apps Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This PR does not match any of the 3 configured review trigger rules.

@vercel

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

Request Review

@benwgold
benwgold marked this pull request as ready for review October 8, 2026 07:20
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

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

Errors (3)

  • GET /internal-accounts/{id}/balance-changes — removed the required property data/items/fee from the response with the 200 status [response-required-property-removed].
  • 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.

@benwgold
benwgold requested a review from shreyav October 8, 2026 07:20

Copy link
Copy Markdown

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

@mintlify

mintlify Bot commented Oct 8, 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, 11:53 PM

…m balance changes

Drop fee from BalanceChange. A fee belongs to a transaction, and one
transaction can produce several balance changes. The statements guide now
totals a period's fees from each transaction's fees, counted once: charged in
the period that holds the transaction's debit and given back in the period that
holds its refund credit. The example lists fees as their own disclosure lines.

Co-Authored-By: benwgold <benwgold@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread openapi/paths/internal_accounts/internal_accounts_{id}_balance-changes.yaml Outdated
statementMonth:
type: string
format: date
pattern: '^\d{4}-(0[1-9]|1[0-2])$'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@ls-bolt

ls-bolt Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🦣 Congratulations @gcamata - your substantive review earned a Valgipes! (common)

Fossils from Brazil reveal a medium-sized relative of the Shasta ground sloth.

View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/gcamata?section=ice-age

Co-Authored-By: gcamata <gcamata@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@benwgold
benwgold merged commit 870293a into main Oct 9, 2026
9 checks passed
@benwgold
benwgold deleted the 10-07-statement-month branch October 9, 2026 00:12

This branch was successfully deployed

1 active deployment
staging - mintlify — 1fe027d6 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.

4 participants