Wave 2: finish receiver -> customer rename, drop Receivers/ApiKeys, add wire-contract check - #34
Open
ericviana wants to merge 1 commit into
Open
Wave 2: finish receiver -> customer rename, drop Receivers/ApiKeys, add wire-contract check#34ericviana wants to merge 1 commit into
ericviana wants to merge 1 commit into
Conversation
Contributor
✅ 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 (3.0.0): 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
7651205 to
0043a7e
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.
Held: do not merge yet
This PR targets the API spec that blindpay-v2 #1799 will make live in production, not
what is deployed today. Merging before that deploy ships breaking changes against the
current wire contract. The orchestrator merges this once a production probe confirms
the #1799 cutover.
What breaks
receiver_*field this SDK modeled is renamed tocustomer_*:receiver_local_amount->customer_local_amount(quotes, payouts)receiver_wallet_address->customer_wallet_address(transfers, transfer quotes)receiver_network->customer_network(transfers, transfer quotes)receiver_token->customer_token(transfers, transfer quotes)receiver_invite_redirect_url->customer_invite_redirect_url(instance settings)receiver_id->customer_idonPayin,Payout/PayoutOnEvmOut,Transfer/TransferOut, and the terms-of-service initiate inputOwner.customerIdnow only readscustomer_id; thereceiver_idfallback isdropped (the target spec's
CustomerOut.owners[]schema does not mark either keyrequired, so the property stays nullable)
ListPayinsInput/ListPayoutsInputdrop the transitionalreceiverIdfilter(the target list endpoints only accept
customer_id)receiver.new/receiver.update/receiver.deletewebhook events are removedfrom
WebhookEvents(they stop firing at cutover; wave 1 already marked themdeprecated). The SDK was also missing several event cases the spec has always had
(
limitIncrease.new,limitIncrease.update,transfer.new,transfer.complete,transfer.update,virtualAccount.new,virtualAccount.complete,wallet.inbound,wallet.new) plus a pre-existing typo (tos.acceptedshould betos.accept) — all added/fixed here since the new contract check treats a specwebhook topic missing from
WebhookEventsas a hard failure.Receiversresource/wrapper andReceiverStatustype are removed(
$blindpay->receiversno longer exists; use$blindpay->customers).ApiKeysresource is removed ($blindpay->instances->apiKeysno longerexists). Product decision: API Keys is deliberately absent from the public
reference, so it doesn't belong in the SDK regardless of what the spec still lists.
VERSIONbumps to3.0.0(major).Intentionally unchanged
receiver_amount(singular) keeps its name everywhere — it's the receiving-sideamount on quotes, payins, payouts and transfers, and the changelog explicitly
exempts it.
CurrencyTypekeeps itssender/receiverenum values.re_-prefixed IDs are never rewritten; only the field/parameter names thatcarry them changed. Verified in the diff and in the test fixtures.
otc_only_supported_for_sender_without_cover_fees_and_receiver_with_cover_feesslug isn't modeled by this SDK, so there was nothing to touch.
Versioning
Go isn't part of this repo (this is
blindpay-php), so only this package's versionmoved:
3.0.0(major/breaking), per the repo's SemVer table (rename/removal offields, methods, and resources = MAJOR). No tag or release is created by this PR.
New: wire-contract check (CI-gated)
Every field-name bug this rename wave had to fix was the kind a mechanical check
would have caught, so this PR adds one:
.api-sync/spec-snapshot.json: the target spec committed into the repo so thecheck is hermetic (kept current via sync PRs going forward).
scripts/contract-check.php: a dependency-free script (php scripts/contract-check.php,also
composer run contract-check) that tokenizes everyfromArray()/toArray()in
src/Resourcesandsrc/Typesand:$data['x']read,'x' => ...write) doesnot exist as a property name anywhere in the snapshot, unless allow-listed.
WebhookEventscase(checked explicitly against the enum).
.api-sync/contract-allowlist.json: seeded only with genuine pre-existingdivergences unrelated to this rename that I found while building the check and did
not fix here — a legacy
BankAccountResponseshape (account_holder_name,swift_code,is_primary), a strayaiprise_validation_keythat isn't a realresponse property anywhere, a dropped
individual_holding_doc_front_file, aPayin.billing_feevsbilling_fee_amountduplicate, and atracking_partner_feeshape that doesn't exist on any of
Payin/Payout/Transfer's wire responses.Nothing wave 2 should fix is in this list.
.github/workflows/main.yamlas a newcontract-checkjob alongsidelint/tests.
Verified the check actually catches this week's bug class: reverting one rename
locally (
Payin.customerIdback to readingreceiver_id) makes it fail withPayin.receiver_id (read) -- not found anywhere in the spec snapshot and not allow-listed; restoring the fix makes it pass again.https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs