Visa Acceptance · API Governance Rules

Visa Acceptance API Rules

Spectral linting rules defining API design standards and conventions for Visa Acceptance.

8 Rules error 3 warn 4 info 1
View Rules File View on GitHub

Rule Categories

visa

Rules

warn
visa-acceptance-operation-id-case
Operation IDs must use camelCase consistent with Visa Acceptance SDK conventions
$.paths[*][*].operationId
error
visa-acceptance-tags-required
All operations must have tags
$.paths[*][*]
warn
visa-acceptance-amount-as-string
Visa Acceptance represents monetary amounts as decimal strings to avoid floating-point precision issues
$.components.schemas[*].properties.totalAmount
warn
visa-acceptance-payment-id-in-path
Payment-related follow-on operations should use paymentId path parameter
$.paths['/pts/v2/payments/{paymentId}/captures','/pts/v2/payments/{paymentId}/refunds','/pts/v2/payments/{paymentId}/voids']
error
visa-acceptance-https-only
All server URLs must use HTTPS for payment security
$.servers[*].url
error
visa-acceptance-security-defined
All payment operations must require authentication
$.paths[*][post,get,patch,delete]
warn
visa-acceptance-response-codes
Payment endpoints should define error responses
$.paths['/pts/v2/payments'][post]
info
visa-acceptance-currency-iso4217
Currency fields should use ISO 4217 format
$.components.schemas[*].properties.currency

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  visa-acceptance-operation-id-case:
    description: Operation IDs must use camelCase consistent with Visa Acceptance SDK conventions
    message: "Operation ID '{{value}}' should be camelCase"
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  visa-acceptance-tags-required:
    description: All operations must have tags
    message: "Operation is missing tags"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  visa-acceptance-amount-as-string:
    description: >-
      Visa Acceptance represents monetary amounts as decimal strings to avoid
      floating-point precision issues
    message: "Amount fields should be type string"
    severity: warn
    given: "$.components.schemas[*].properties.totalAmount"
    then:
      field: type
      function: enumeration
      functionOptions:
        values:
          - string

  visa-acceptance-payment-id-in-path:
    description: Payment-related follow-on operations should use paymentId path parameter
    message: "Follow-on operations should include paymentId in path"
    severity: warn
    given: "$.paths['/pts/v2/payments/{paymentId}/captures','/pts/v2/payments/{paymentId}/refunds','/pts/v2/payments/{paymentId}/voids']"
    then:
      function: truthy

  visa-acceptance-https-only:
    description: All server URLs must use HTTPS for payment security
    message: "Server URL '{{value}}' must use HTTPS"
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://"

  visa-acceptance-security-defined:
    description: All payment operations must require authentication
    message: "Operation must have security defined"
    severity: error
    given: "$.paths[*][post,get,patch,delete]"
    then:
      field: security
      function: truthy

  visa-acceptance-response-codes:
    description: Payment endpoints should define error responses
    message: "Payment operation should define 400 and 401 error responses"
    severity: warn
    given: "$.paths['/pts/v2/payments'][post]"
    then:
      field: responses
      function: schema
      functionOptions:
        schema:
          type: object
          required: ['201', '400', '401']

  visa-acceptance-currency-iso4217:
    description: Currency fields should use ISO 4217 format
    message: "Currency field should be described as ISO 4217 3-letter code"
    severity: info
    given: "$.components.schemas[*].properties.currency"
    then:
      field: description
      function: truthy

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/visa-acceptance-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.