feat!: rename receiver_id/customer field wire keys for the post-#1799 customers cutover - #40
Open
ericviana wants to merge 1 commit into
Open
feat!: rename receiver_id/customer field wire keys for the post-#1799 customers cutover#40ericviana wants to merge 1 commit into
ericviana wants to merge 1 commit into
Conversation
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…re contract check Wave-2 breaking release (v4.0.0 on tag): the remaining receiver_* field renames, removal of the receiver.* webhook events and legacy surface, and a mechanical contract-check in CI that validates every SDK-declared wire key and the webhook enum against the committed public spec snapshot (.api-sync/spec-snapshot.json). Held until blindpay-v2 #1799 reaches production; the branch history was rebuilt as this single commit so the snapshot only ever contains the public filtered spec. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs
ericviana
force-pushed
the
eric/customers-wave-2
branch
from
July 27, 2026 22:45
c3b1584 to
ccbb1eb
Compare
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 breaks
This wave finishes the receivers -> customers sunset. Wave 1 (already shipped, v3.0.0/v3.1.0) removed the deprecated
receiversresource and aligned the SDK's wire fields with what production serves today. This PR goes one step further and aligns with the API as it will be after blindpay-v2 #1799 reaches production: the remainingreceiver_*wire fields becomecustomer_*, and the deprecated receiver webhook events stop firing entirely.Because production today still sends
receiver_idetc. on these responses, this PR is a breaking change against the live API and must not merge before the cutover.Migration table
receiver_idcustomer_idowners[])receiver_local_amountcustomer_local_amountCreateQuoteResponse), PayinQuotereceiver_wallet_addresscustomer_wallet_addressreceiver_tokencustomer_tokenreceiver_networkcustomer_networkreceiver_invite_redirect_urlcustomer_invite_redirect_urlreceiver.new/receiver.update/receiver.deleteWebhookEventenum;ReceiverDeleteWebhookOutdeletedCustomerOwner.customerIdcustomer_idorreceiver_id(wave 1 transitional shim)customer_idonly, still optional (not required in the target spec'sowners[]item schema)Customer.swiftApiKeysresourceApiKey.swift,ApiKeysService.swiftdeletedreceiver_rfi_emails_enabled,receivers_amount, and the RFI-scopedreceiver_type/receiver_kyc_status/receiver_aiprise_*fields are part of the same changelog but aren't modeled by this SDK today (no RFI or instance-settings-with-those-fields surface exists here), so there's nothing to rename for them.Intentionally unchanged
receiver_amount(singular) keeps its name everywhere -- it's the receiving-side amount on quotes, payins, payouts and transfers, and the target spec confirms it's the onlyreceiver_*key still present anywhere.CurrencyTypekeeps.sender/.receiverraw values (currency_typefield).re_prefix on stored ID values is untouched -- this PR renames wire keys, not the format of the IDs those keys carry (see doc examples still usingre_123).Why held
These are breaking changes against the API deployed today (confirmed by diffing this repo's target snapshot against
blindpay-v2's liveapps/api/openapi.json-- today's spec still servesreceiver_id/receiver_local_amount/etc. on every one of the schemas this PR touches). They only become correct once blindpay-v2 #1799 reaches production. Labeledhold-until-1799-deploy; do not merge until a production probe confirms the cutover.Contract check
Added
.api-sync/check-contract.swift, a dependency-free (Foundation-only) script wired into new.github/workflows/ci.yml:CodingKeysstring values,params["..."]query literals) must exist as a property or parameter name somewhere in the committed.api-sync/spec-snapshot.json, unless allow-listed.WebhookEvent,CurrencyType) must cover every enum member the spec declares for them.Run locally:
swift .api-sync/check-contract.swift.Seeded
.api-sync/allow-list.jsonwith 15 genuine pre-existing divergences that predate this wave and aren't part of the customers rename (verified against both today's and the target spec -- none of these are documented in either):PartnerFee/CreatePartnerFeeInput/CreatePartnerFeeResponse.{evm,stellar}_wallet_address,tracking_partner_feeonPayin/Payout/Transfer/CreatePayinResponse/CreatePayoutResponse,billing_feeonPayin/PayinQuote/CreatePayinResponse, andAuthorizeSolanaResponse.serialized_transaction.Verified it actually catches the bug class it targets: reverted one
customer_idrename back toreceiver_idlocally and confirmed the check fails with a precise message, then restored it.Versioning
Versioning here is git-tag-based (no in-repo version constant). This release will be v4.0.0 on merge -- breaking change, next major.
https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs