Repository navigation
feat(MER-45, MER-112): FSP onboarding contract and API key on authorize - #14
Merged
Merged
Conversation
Adds fsp-onboarding-api.yaml (MER-45, MER-48): the GET and POST the FSP serves on one URL for terminal onboarding. Adds 502 to both POS onboarding operations and widens the 409 description.
The descriptions allowed an ISO 8601 date, which the number type contradicts; an FSP that sent one would break every form fetch.
ApiKeyAuth (X-API-Key header) now sits on authorizeTransaction instead of being the spec-wide default that the onboarding operations opted out of.
koekiebox
approved these changes
Nov 13, 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.
TL;DR: adds the contract between merchant-api and the FSP for terminal onboarding, the POS spec responses merchant-api now returns when the FSP is down, and makes the
X-API-Keyrequirement explicit on authorize only.Tickets: MER-45, MER-48, MER-112
Summary
cards-openapi-specifications/ +├── fsp-onboarding-api.yaml # what the FSP serves; merchant-api calls it └── merchant-pos-api.yaml # 502 on both onboarding operations, wider 409, # API key on authorize onlysequenceDiagram participant POS participant MAPI as merchant-api participant FSP POS->>MAPI: GET /v1/terminals/onboard MAPI->>FSP: GET fsp.onboarding_api FSP-->>MAPI: fields MAPI-->>POS: fields + version + definitionToken POS->>MAPI: POST /v1/terminals/onboard MAPI->>FSP: GET fsp.onboarding_api (fields unchanged?) MAPI->>FSP: POST fsp.onboarding_api (values + merchantId) FSP-->>MAPI: valid / 400 field errors MAPI-->>POS: 200 ONBOARDED / 422 / 502Contract to review
fsp.onboarding_apiand calls it as is./terminals/validationand has to move to/terminals/onboarding.ValidationRejectionwith optional properties:{valid: false, error: {field, message}}when the wallet address does not exist, and{success: false, message, errors}when a field breaks its rules.merchantIdis added by merchant-api to the POST body. The FSP currently ignores it.min/maxare numbers only (format: double).API key (MER-112)
ApiKeyAuth(X-API-Keyheader) moves from the spec-wide default, which both onboarding operations opted out of, ontoauthorizeTransactionitself:Same effective rule as before, but a new operation no longer requires the key unless it says so.
Evidence
GET /v1/terminals/onboardon merchant-api →501 Not Implemented.tadej/mer-46, which generates its FSP models from this file:GET /v1/terminals/onboard→502 FSP onboarding API is unavailableApiKeyAuthstays the same.Merge Danger
Door: two-way
A new file, two additive changes to
merchant-pos-api.yaml, and the API key requirement moved onto the one operation that already had it.Blast Radius: small
Regenerating from
merchant-pos-api.yamladds502response types to both onboarding operations; nothing existing changes. The FSP side (testnet) has to serve the POST on the same URL as the GET.