feat: close the Stripe-compat gaps the platform billing flows hit - #68
Open
midagedev wants to merge 1 commit into
Open
feat: close the Stripe-compat gaps the platform billing flows hit#68midagedev wants to merge 1 commit into
midagedev wants to merge 1 commit into
Conversation
A caller census against a Stripe SDK 31.1.0 client turned up parameters this stub rejected or silently ignored across plan upgrade, cancellation, seat changes, member invites, dunning, and one-time export purchases. Rejected parameters now accepted and honoured: - invoiceitems pricing[price]/quantity (amount derived), items without an invoice (pending, swept into the next include-behaviour invoice) - invoices subscription, credit notes out_of_band_amount/memo - customers invoice_settings[default_payment_method] - subscriptions create proration_behavior, update cancel_at standalone, delete cancellation_details - prices transfer_lookup_key Silently ignored parameters now honoured: - prices lookup_keys[] filter (callers taking the first entry got another tenant's product) - subscription period follows the price's recurring interval instead of a hardcoded month, so yearly plans no longer end after one month - subscription list current_period_end range filters - trial_end=now ends the trial instead of only recording evidence - billing_cycle_anchor=now resets the period on every proration behaviour New endpoints: invoices void / mark_uncollectible, checkout sessions expire, each with its webhook event. Response shapes: discount.source.coupon object (SDK 31 dropped the top-level coupon), cancel_at serialized independently of cancel_at_period_end. Migration 020 makes invoice_items.invoice_id nullable (table rebuild, columns preserved from 015) and adds the credit-note out-of-band columns. gofmt clean, go vet clean, go test ./... -count=1 green across all packages. 16 new regression tests, one per gap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A caller census against a Stripe SDK 31.1.0 client (plan upgrade, cancellation,
seat changes, member invites, dunning, one-time export purchases) turned up
parameters this stub rejected or silently ignored. 17 gaps, each with a file:line
citation on both sides.
Rejected → accepted and honoured
invoiceitemspricing[price]/quantity(amount derived), items created withoutan invoice (pending, swept into the next include-behaviour invoice)
invoicessubscription; credit notesout_of_band_amount/memocustomersinvoice_settings[default_payment_method]subscriptionscreateproration_behavior, update standalonecancel_at,delete
cancellation_detailspricestransfer_lookup_keySilently ignored → honoured
month, so a yearly plan no longer ends after one month
current_period_endrange filterstrial_end=nowends the trial instead of only recording evidencebilling_cycle_anchor=nowresets the period under every proration behaviourNew endpoints: invoices
void/mark_uncollectible, checkout sessionsexpire— each with its webhook event.Response shapes:
discount.source.couponobject (SDK 31 dropped the top-levelcoupon),cancel_atserialized independently ofcancel_at_period_end.Migration
020 makes
invoice_items.invoice_idnullable (SQLite table rebuild; columns carriedover verbatim from 015) and adds the credit-note out-of-band columns.
Verification
gofmt -lempty,go vet ./...clean,go test ./... -count=1green across all 12packages from cold. 16 new regression tests, one per gap — no existing assertions were
relaxed.
Not included (with reasons)
lines.datamaterialization — totals and status are already correct; onlyline-level display is affected, and it needs the renewal line model.
expandofinvoice_settings.default_payment_methodas an object — callers fallback to
payment_methods.list.billing_cycle_anchorscheduling — needs a scheduler model.