{"openapi":"3.1.0","info":{"title":"Card Payments, SCA & APP Scam Rules API","version":"1.0.0","description":"Pure-compute card PAN checks and masking, EU/US interchange cap prechecks, PSD2 SCA exemption evaluation, UK APP scam reimbursement splits, and PSD2 eIDAS certificate role parsing from caller input. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses x402 with exact USDC on Base (8453). Each paid resource accepts POST for the call; unpaid GET/HEAD return the same 402 payment challenge for discovery.\nHow to call an operation:\n1. POST JSON matching the requestBody. An unpaid POST (including empty body) returns 402 payment terms before body validation.\n2. Compare 402 payTo, asset, and network with /api/v1/catalog and /.well-known/x402 — not only with the 402 itself.\n3. Pay and retry with payment-signature. Invalid JSON/schema after payment-signature returns 400 and is not charged. Settlement (a charge) only on 2xx. payment-signature attached ≠ charged.\nIdempotency-Key: 64 hex chars from 32 random bytes. Reuse only for the same operation and body (replays stored response, including status=partial). A new key runs a fresh call.\nIdempotency after errors: unpaid 402 does not store the key. Post-signature 402/503 release it (retry same key). Pre-reserve schema 400 does not store it. Other post-signature responses (2xx/4xx/5xx) are stored: same key+body replays; different body → 409. Stored 4xx/5xx replays are not a second charge. Prefer a new key after fixing a 4xx; after 5xx reuse the same key only for the stored error.\nPost-signature 402/503 include prior-payment-attempt (nonce, settled false|unknown). A facilitator 502 is SETTLEMENT_UNKNOWN (stored under the Idempotency-Key; cross-instance replay needs the shared store; may already be charged) — check USDC authorizationState(payer, nonce) on Base before re-signing.\nSettlement signal: settled 2xx include payment-response. 4xx/5xx do not. Do not book a cost from payment-signature alone.\nCoverage billing: HTTP 200 with status complete, partial, or failed is charged at the full listed price. Retrying missing checks needs a new settled call. 4xx/5xx are not charged.\nmissing_items.reason: timeout/rate_limited → one delayed retry (new key); upstream_down → after recovery; not_supported → never.\nInvariants: any missing_items ⇒ not status complete; sources[] is provenance only (source, url, retrievedAt), never success/error keyed by check.\nFree lookup: GET /api/v1/results/{result_id} returns stored coverage JSON (404 RESULT_NOT_FOUND if unknown/expired; not a 402). Prior-Result-Id sets replaces_result_id.\nOutputs are prechecks/drafts for human review — not official determinations, legal advice, or certified filings."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/card-payments/pan-check":{"post":{"operationId":"validate_a_card_pan_luhn","summary":"Validate a card PAN (Luhn)","description":"Check card number length and Luhn check digit. Never echoes the full PAN; returns masked form and last4 only.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pan":{"type":"string","minLength":12,"maxLength":32}},"required":["pan"],"additionalProperties":false},"example":{"pan":"4111111111111111"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"length":{"type":"number"},"luhnValid":{"type":"boolean"},"last4":{"type":"string"},"masked":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"length":16,"luhnValid":true,"last4":"1111","masked":"411111******1111","sources":[{"source":"ISO/IEC 7812-1 Annex B Luhn (mod 10)","url":"https://www.iso.org/standard/70484.html","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Luhn and length only; does not identify the brand or confirm the card exists.","Not legal advice. Outputs are lookups or prechecks for human review."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/card-payments/pan-mask":{"post":{"operationId":"mask_a_pan_or_redact_pans_in_text","summary":"Mask a PAN or redact PANs in text","description":"PCI DSS display masking for a single PAN, or find and redact Luhn-valid PANs in free text.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pan":{"type":"string","minLength":12,"maxLength":32},"text":{"type":"string","maxLength":1048576},"binLength":{"default":6,"anyOf":[{"type":"number","const":6},{"type":"number","const":8}]}},"additionalProperties":false},"example":{"pan":"4111111111111111","binLength":6}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"masked":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"masked":"411111******1111","sources":[{"source":"PCI DSS v4.0.1 Req 3.4.1 / FAQ #1492","url":"https://www.pcisecuritystandards.org/faqs","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Display masking only; storage truncation formats are out of scope.","Not legal advice. Outputs are lookups or prechecks for human review."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/card-payments/interchange-cap-check":{"post":{"operationId":"check_eu_us_interchange_fee_caps","summary":"Check EU/US interchange fee caps","description":"Compute regulated maximum interchange under EU IFR consumer caps or US Reg II debit caps and flag fees above the cap.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"regime":{"type":"string","enum":["EU_IFR","US_REG_II"]},"cardType":{"type":"string","enum":["consumer_debit","consumer_credit","debit","commercial"]},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"actualFee":{"type":"integer","minimum":0,"maximum":9007199254740991},"regulatedIssuer":{"type":"boolean"},"fraudAdjustmentEligible":{"default":false,"type":"boolean"},"domesticCapOverride":{"type":"number","minimum":0,"maximum":1}},"required":["regime","cardType","amount","currency"],"additionalProperties":false},"example":{"regime":"EU_IFR","cardType":"consumer_debit","amount":10000,"currency":"EUR","actualFee":30}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"capMinor":{"type":"number"},"capExact":{"type":"number"},"capFormula":{"type":"string"},"exceedsCap":{"type":"boolean"},"excessMinor":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"capMinor":20,"capExact":20,"capFormula":"0.2% × 10000","exceedsCap":true,"excessMinor":10,"sources":[{"source":"Regulation (EU) 2015/751 Arts 3–4","url":"https://www.legislation.gov.uk/eur/2015/751/article/3/adopted","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Member State domestic lower caps are not bundled; pass domesticCapOverride when needed.","Rounding uses floor(capExact); regulations do not specify rounding.","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/card-payments/sca-exemption-evaluate":{"post":{"operationId":"evaluate_psd2_sca_exemptions","summary":"Evaluate PSD2 SCA exemptions","description":"Decide which PSD2 RTS SCA exemptions may apply to a remote or contactless payment from caller-supplied facts.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["remote","contactless_pos"]},"instrument":{"type":"string","enum":["card","credit_transfer"]},"amountEur":{"type":"number","minimum":0},"sinceLastSca":{"default":{"cumulativeEur":0,"count":0},"type":"object","properties":{"cumulativeEur":{"type":"number","minimum":0},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["cumulativeEur","count"],"additionalProperties":false},"trustedBeneficiary":{"default":false,"type":"boolean"},"trustedBeneficiaryListChanging":{"default":false,"type":"boolean"},"recurringSameAmountSamePayee":{"default":false,"type":"boolean"},"firstInSeries":{"default":false,"type":"boolean"},"sameOwnerSameAspsp":{"default":false,"type":"boolean"},"tra":{"type":"object","properties":{"fraudRate":{"type":"number","minimum":0,"maximum":1},"fraudValue":{"type":"number","minimum":0},"totalValue":{"type":"number","minimum":0},"riskSignalsClear":{"default":true,"type":"boolean"}},"additionalProperties":false}},"required":["channel","instrument","amountEur"],"additionalProperties":false},"example":{"channel":"remote","instrument":"card","amountEur":25,"sinceLastSca":{"cumulativeEur":40,"count":2}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"scaRequired":{"type":"boolean"},"exemptions":{"type":"array","items":{"type":"object","properties":{"article":{"type":"string"},"name":{"type":"string"},"applies":{"type":"boolean"}},"additionalProperties":true}},"evaluated":{"type":"array","items":{"type":"object","properties":{"article":{"type":"string"},"name":{"type":"string"},"applies":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":true}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"scaRequired":false,"exemptions":[{"article":"16","name":"remote_low_value","applies":true}],"evaluated":[{"article":"11","name":"contactless_pos","applies":false,"reason":"channel is not contactless_pos"},{"article":"13","name":"trusted_beneficiaries","applies":false,"reason":"payee is not a trusted beneficiary"},"…"],"sources":[{"source":"Commission Delegated Regulation (EU) 2018/389","url":"https://www.legislation.gov.uk/eur/2018/389/contents/adopted","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Applying an exemption is the PSP's choice; liability rules (PSD2 Art 74) still apply.","Art 16/11 use previous transactions excluding the current one (literal article wording); some issuers also count the cu…","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/card-payments/app-scam-reimbursement":{"post":{"operationId":"uk_app_scam_reimbursement_split","summary":"UK APP scam reimbursement split","description":"Calculate the UK mandatory APP scam reimbursement amount and 50:50 receiving-PSP contributions under PSR rules.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scheme":{"type":"string","enum":["FPS","CHAPS"]},"payments":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"receivingPsp":{"type":"string","minLength":1,"maxLength":120}},"required":["date","amount","receivingPsp"],"additionalProperties":false}},"claimDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"excessApplied":{"default":0,"type":"integer","minimum":0,"maximum":10000},"vulnerable":{"default":false,"type":"boolean"},"exceptionsAsserted":{"default":[],"type":"array","items":{"type":"string","enum":["first_party_fraud","gross_negligence"]}}},"required":["scheme","payments","claimDate"],"additionalProperties":false},"example":{"scheme":"FPS","payments":[{"date":"2026-09-01","amount":6000000,"receivingPsp":"BANK_A"},{"date":"2026-09-03","amount":3000000,"receivingPsp":"BANK_B"}],"claimDate":"2026-10-01","excessApplied":10000,"vulnerable":false}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"eligible":{"type":"boolean"},"claimValue":{"type":"number"},"cappedValue":{"type":"number"},"excess":{"type":"number"},"requiredReimbursement":{"type":"number"},"receivingPspShares":{"type":"array","items":{"type":"object","properties":{"psp":{"type":"string"},"attributable":{"type":"number"},"contribution":{"type":"number"},"maxDeductionForUnappliedExcess":{"type":"number"}},"additionalProperties":true}},"notes":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"eligible":true,"claimValue":9000000,"cappedValue":8500000,"excess":10000,"requiredReimbursement":8490000,"receivingPspShares":[{"psp":"BANK_A","attributable":5660000,"contribution":2830000,"maxDeductionForUnappliedExcess":0},{"psp":"BANK_B","attributable":2830000,"contribution":1415000,"maxDeductionForUnappliedExcess":0}],"notes":[],"sources":[{"source":"PSR Specific Requirement 1 (July 2024)","url":"https://www.psr.org.uk/media/xenefhgp/amended-specific-requirement-1-july-2024-corrected.pdf","retrievedAt":"2026-11-14","status":"ok"},{"source":"PSR PS25/5 (May 2025)","url":"https://www.psr.org.uk/media/rhelv4op/ps25-5-app-scams-reimbursement-consolidated-policy-statement-may-2025.pdf","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Maximum reimbursement £85,000; maximum excess £100. Vulnerable consumers: excess and gross-negligence exception not app…","Not legal advice. Outputs are lookups or prechecks for human review."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/card-payments/psd2-certificate-roles":{"post":{"operationId":"parse_psd2_eidas_certificate_roles","summary":"Parse PSD2 eIDAS certificate roles","description":"Parse a TPP QWAC/QSealC certificate for PSD2 roles, NCA and authorisation number. Does not verify the chain.","tags":["card-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"certificatePem":{"type":"string","minLength":32,"maxLength":65536}},"required":["certificatePem"],"additionalProperties":false},"example":{"certificatePem":"-----BEGIN CERTIFICATE-----\nMIIBkTCB+wIJAKHBlv7example000000000000000000000000000000\n-----END CERTIFICATE-----"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"issuer":{"type":"string"},"notBefore":{"type":"string"},"notAfter":{"type":"string"},"organizationIdentifier":{"type":"string"},"authorisation":{"type":"object","properties":{"country":{"type":"string"},"nca":{"type":"string"},"number":{"type":"string"}},"additionalProperties":true},"psd2":{"type":"object","properties":{"present":{"type":"boolean"},"roles":{"type":"array","items":{"type":"object","properties":{"oid":{"type":"string"},"name":{"type":"string"},"nameMatchesOid":{"type":"boolean"}},"additionalProperties":true}},"ncaName":{"type":"string"},"ncaId":{"type":"string"}},"additionalProperties":true},"issues":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"subject":"CN=Test TPP\nO=Test TPP Ltd\norganizationIdentifier=PSDPL-PFSA-1234567890","issuer":"CN=Test TPP\nO=Test TPP Ltd\norganizationIdentifier=PSDPL-PFSA-1234567890","notBefore":"2024-01-01T00:00:00.000Z","notAfter":"2030-01-01T00:00:00.000Z","organizationIdentifier":"PSDPL-PFSA-1234567890","authorisation":{"country":"PL","nca":"PFSA","number":"1234567890"},"psd2":{"present":true,"roles":[{"oid":"0.4.0.19495.1.2","name":"PSP_PI","nameMatchesOid":true},{"oid":"0.4.0.19495.1.3","name":"PSP_AI","nameMatchesOid":true}],"ncaName":"PFSA","ncaId":"PL-PFSA"},"issues":[],"sources":[{"source":"ETSI TS 119 495 V1.7.1 (2024-07)","url":"https://www.etsi.org/deliver/etsi_ts/119400_119499/119495/01.07.01_60/ts_119495v010701p.pdf","retrievedAt":"2026-11-14","status":"ok"}],"limitations":["Parses the certificate only; does not verify the chain, revocation, or the EBA/NCA register.","Not legal advice. Outputs are lookups or prechecks for human review."]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}