Fix CRD scheme enum to match the values actually emitted - #43
Merged
Conversation
The CRD `scheme` attribute documented `discover`, a value the service has never emitted, and omitted `jcb`, `upi` and `sbn` entirely. The emitted value is the configured directory server's `Scheme` string, passed through verbatim: the CRD cache tags every card range with `ds.Scheme()` on ingest, and the preauth handler copies that onto the response as `scheme`. There is no output-side enum. The possible values are therefore exactly the DS configured per environment, which is `visa`, `mastercard`, `amex`, `protectbuy`, `jcb`, `sbn` and `upi` in production, plus `standin` in sandbox. Discover's directory server has been configured as `protectbuy` since we certified with them, after Discover's own name for their 3-D Secure program (which covers Discover and Diners Club International), so `discover` was never correct. The preauth `ds` field and the AReq attributes already documented `protectbuy`; this brings the CRD table in line with them. `fime` and `jcb-tmp-off` are deliberately left out as staging-only. Reported by an integrator who met `protectbuy` in production.
peterklogborg
approved these changes
Sep 3, 2026
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.
An integrator asked us to update the docs for
CRD.schemebecause they were sometimes gettingprotectbuy, which is not a documented value.What was wrong
The enum listed
standin,visa,mastercard,amex,discover. Two problems:discoverhas never been emitted by the service.jcb,upiandsbnwere missing entirely, so the same surprise was waiting for those.Notes
preauth.htmlverbatim for consistency.--bracket-same-line.standinorsbn. The docs saystandinis "only in sandbox", but the converse is the more useful fact and is undocumented — an integrator testing in sandbox will never seeprotectbuyorvisaat all, which is probably why this only surfaced in production.