Shift4 Rule API

The Rule API from Shift4 — 1 operation(s) for rule.

Operations 1

POST /rule/verify Rule Verification #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/shift4-rule-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

shift4-rule-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.7.57
  title: Shift4 Payment Rule API
  contact:
    url: https://www.shift4.com/contact-us/
servers:
- url: https://api.shift4test.com/api/rest/v1
  description: Host Direct Test URL
- url: https://api.shift4api.net/api/rest/v1
  description: Host Direct Production URL
tags:
- name: Rule
paths:
  /rule/verify:
    servers:
    - url: https://api.shift4test.com/api/rest/v1
      description: Host Direct Test URL
    - url: https://api.shift4api.net/api/rest/v1
      description: Host Direct Production URL
    post:
      tags:
      - Rule
      summary: Rule Verification
      operationId: ruleverify
      security:
      - AccessToken: []
      description: "Used to check for various processing rules such as surcharge eligibility.\n\n **Integration Methods:**\n- Host Direct\n\nSee the [Integration Methods](/guides/quickstart#integration-methods) and [URLs Section](/guides/quickstart#urls) sections of the Development Quick Start guide for details regarding each processing option.\n\nSee the [JSON Body Schemas](/guides/quickstart#json-body-schemas) for more details on the various JSON body formats.\n"
      parameters:
      - $ref: '#/components/parameters/InterfaceVersion'
      - $ref: '#/components/parameters/InterfaceName'
      - $ref: '#/components/parameters/CompanyName'
      - $ref: '#/components/parameters/AccessToken'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/rules_verify_token_gtv'
              - $ref: '#/components/schemas/rules_verify_p2pe_idtech'
              - $ref: '#/components/schemas/rules_verify_p2pe_tdesdukpt_emv'
              - $ref: '#/components/schemas/rules_verify_p2pe_tdesdukpt_msr'
              - $ref: '#/components/schemas/rules_verify_p2pe_onguardsde_emv'
              - $ref: '#/components/schemas/rules_verify_p2pe_onguardsde_msr'
              - $ref: '#/components/schemas/rules_verify_unencryptedcard'
      responses:
        '200':
          description: Request was processed
          content:
            application/json:
              schema:
                properties:
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        dateTime:
                          $ref: '#/components/schemas/DateTime'
                        amount:
                          type: object
                          properties:
                            total:
                              type: number
                              maxLength: 14
                              description: 'The total amount being charged for a particular transaction.


                                If the `ruleCheck` array contained `SURCHARGE` in the request and the card is surcharge eligible the `amount.total` value will be incremented by the `amount.surcharge` value. For example, if the rule verification request had `amount.total = 100` and the `surcharge.percentage` was 1.5%, the rule verification response would include `amount.total = 101.50` and `amount.surcharge = 1.50`

                                '
                            surcharge:
                              type: number
                              maxLength: 14
                              description: '**Conditional: Returned if the `ruleCheck` array contained `SURCHARGE` in the request and the card is surcharge eligible.**


                                The surcharge fee amount that can be applied to the transaction. The fee amount is also added into `amount.total`. For example, if the rule verification request had `amount.total = 100` and the `surcharge.percentage` was 1.5%, the rule verification response would include `amount.total = 101.50` and `amount.surcharge = 1.50`

                                '
                        card:
                          type: object
                          properties:
                            number:
                              $ref: '#/components/schemas/CardMaskedNumber'
                            token:
                              $ref: '#/components/schemas/CardTokenResponse'
                            type:
                              $ref: '#/components/schemas/CardTypeResp'
                        surcharge:
                          type: object
                          description: 'Returned if the `ruleCheck` array contained `SURCHARGE` in the request.

                            '
                          properties:
                            result:
                              $ref: '#/components/schemas/SurchargeResult'
                            transactionId:
                              $ref: '#/components/schemas/RulesTransactionId'
                            percentage:
                              $ref: '#/components/schemas/SurchargePercentage'
                        transaction:
                          type: object
                          properties:
                            invoice:
                              $ref: '#/components/schemas/TransactionInvoice'
                            vendorReference:
                              $ref: '#/components/schemas/TransactionVendorReference'
                            authSource:
                              $ref: '#/components/schemas/TransactionAuthSource'
                        merchant:
                          $ref: '#/components/schemas/MerchantResponse'
                        clerk:
                          $ref: '#/components/schemas/ClerkOptional'
                        currencyCode:
                          $ref: '#/components/schemas/CurrencyCode'
                        universalToken:
                          $ref: '#/components/schemas/UniversalToken'
                        server:
                          $ref: '#/components/schemas/Server'
              example:
                result:
                - dateTime: '2024-05-21T09:18:23.283-07:00'
                  amount:
                    total: 163.2
                    surcharge: 3.2
                  card:
                    number: XXXXXXXXXXXX1119
                    token:
                      value: '8048471746471119'
                    type: VS
                  surcharge:
                    result: P
                    transactionId: string
                    percentage: 2
                  transaction:
                    invoice: 0510093358
                    vendorReference: 12382-01
                  merchant:
                    mid: 15877
                    name: Merchant XYZ
                  server:
                    name: TM01CE
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '504':
          $ref: '#/components/responses/TimeoutResponse'
components:
  schemas:
    P2PEType0102IDTECH:
      type: object
      required:
      - data
      - format
      properties:
        data:
          $ref: '#/components/schemas/P2PEData'
        format:
          $ref: '#/components/schemas/P2PEFormatIDTech'
    P2PEType03OnguardSDEMSR:
      type: object
      description: 'See [P2PE Format 03 Ingenico On-Guard SDE](/guides/core-concepts/p2pe-format#ingenico-on-guard-sde---format-03) for more information.

        '
      required:
      - data
      - format
      properties:
        data:
          $ref: '#/components/schemas/P2PEDataOnguardSDEMSR'
        format:
          $ref: '#/components/schemas/P2PEFormatOnguardSDE'
    MerchantMID:
      type: number
      maxLength: 10
      example: 15877
      description: 'The merchant ID associated with the merchant account.

        '
    rules_verify_p2pe_onguardsde_msr:
      title: P2PE - On-Guard SDE - MSR/Manual
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - p2pe
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        p2pe:
          $ref: '#/components/schemas/P2PEType03OnguardSDEMSR'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    P2PEKSN:
      type: string
      maxLength: 20
      example: 6299495001100E200041
      description: 'The key serial number which was used to encrypt the P2PE data.

        '
    SurchargePercentage:
      type: number
      example: 2
      maximum: 99.99
      description: 'The surcharge percentage that can be applied to a transaction.

        '
    Error:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        severity:
          $ref: '#/components/schemas/ErrorSeverity'
        shortText:
          $ref: '#/components/schemas/ErrorShortText'
        longText:
          $ref: '#/components/schemas/ErrorLongText'
        primaryCode:
          $ref: '#/components/schemas/ErrorPrimaryCode'
        secondaryCode:
          $ref: '#/components/schemas/ErrorSecondaryCode'
    CardNumber:
      type: string
      maxLength: 32
      example: '4321000000001119'
      description: 'The payment card number entered in an initial authorization/sale request. This field will always be masked when returned in a response.

        '
    P2PEFormatType05:
      type: string
      minLength: 2
      maxLength: 2
      enum:
      - '05'
      example: '05'
      description: 'Classifies the type of payment device being used for P2PE.


        Value|Description

        -----|-----------

        05   | [Shift4 TDES DUKPT format](/guides/core-concepts/p2pe-format#tdes-dukpt---format-05)

        '
    CardTokenResponse:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/CardTokenValue'
    EMVEncryptedTagsOnly:
      type: object
      writeOnly: true
      description: 'Encrypted EMV tags

        '
      required:
      - tlvData
      properties:
        tlvData:
          type: string
          writeOnly: true
          example: 5A181CF757386DE00BC2DE05F965DB1E96D867C2009CA8C31799573083FBDC0892887F7C99E0B7E54520CCC94308B4E4C7D4C18CDCE4EAA83C4D18A6AFDCD53EAC46BD5630834EFB238F32B3
          description: 'This field contains the P2PE encrypted tags (5A and 57) in standard TLV format.  The P2PE encrypted tags (5A and 57) will have the entire TLV string encrypted and the encrypted data will be in a TLV format using the same tag. For example, tag 5A would look like the following:

            - Encrypted: `5A181CF757386DE00BC2DE05F965DB1E96D867C2009CA8C3179`

            - Decrypted: `5A084761739001010010`

            '
    LighthouseResponse:
      type: object
      readOnly: true
      properties:
        data:
          $ref: '#/components/schemas/LighthouseDataResponse'
    ServerName:
      type: string
      maxLength: 50
      example: TM01CE
      description: 'The name of the server that processed the request.

        '
    MerchantName:
      type: string
      maxLength: 22
      example: Merchant XYZ
      description: 'The merchant’s business name as configured with Shift4.

        '
    rules_verify_token_gtv:
      title: GTV Token
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - card
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        card:
          type: object
          required:
          - token
          properties:
            expirationDate:
              $ref: '#/components/schemas/CardExpirationDate'
            token:
              $ref: '#/components/schemas/CardTokenRequired'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    P2PEFormatOnguardSDE:
      type: string
      minLength: 2
      maxLength: 2
      enum:
      - '03'
      example: '03'
      description: 'Classifies the type of payment device being used for P2PE.


        Value|Description

        -----|-----------

        03   | Ingenico Onguard SDE Format

        '
    MerchantResponse:
      type: object
      properties:
        mid:
          $ref: '#/components/schemas/MerchantMID'
        name:
          $ref: '#/components/schemas/MerchantName'
    CardTypeResp:
      type: string
      enum:
      - AX
      - AP
      - BC
      - CI
      - DB
      - GC
      - JC
      - MC
      - NS
      - PL
      - SC
      - VS
      - WP
      - YC
      example: VS
      description: "An abbreviation used to specify the type of card that was used when processing a transaction.\n\nValue| Description\n-----|------------\nAX   | American Express\nAP   | Alipay\nBC   | Backed Card       \nCI   | Citgo        \nDB   | Debit card\nGC   | Gift Card\nJC   | JCB\nMC   | Mastercard\nNS   | Discover/JCB/Novus\nPL   | Private Label\nSC   | Sears Canada\nVS   | Visa\nWP   | WeChat Pay\nYC   | IT’S YOUR CARD\n"
    P2PEType03OnguardSDEEMV:
      type: object
      description: 'See [P2PE Format 03 Ingenico On-Guard SDE](/guides/core-concepts/p2pe-format#ingenico-on-guard-sde---format-03) for more information.

        '
      required:
      - data
      - format
      properties:
        data:
          $ref: '#/components/schemas/P2PEDataOnguardSDEEMV'
        format:
          $ref: '#/components/schemas/P2PEFormatOnguardSDE'
    rules_verify_unencryptedcard:
      title: Card Number Unencrypted
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - card
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        card:
          type: object
          required:
          - number
          - expirationDate
          properties:
            number:
              $ref: '#/components/schemas/CardNumber'
            expirationDate:
              $ref: '#/components/schemas/CardExpirationDate'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    Server:
      type: object
      readOnly: true
      properties:
        name:
          $ref: '#/components/schemas/ServerName'
    P2PEData:
      type: string
      maxLength: 2048
      example: 027101801F2D1E00939B%*432100******1119^VS/DUAL TRACK^2212******?*;432100******1119=2212******?*CECE3FCE7781142BEC8D0E267AE89F5D3C7E235BF1A70E637951E8D93003E5A2586C336CA4A3B31F6639B04005BB12A716D8BC4D3AB125C27AB11A9DDC02816569D42A20B036EE5E2C71CB70565FB43B000000000000000000000000000000000000000000000000000000000000000000000000000000003434345434363138343962994950010038200415953903
      description: 'The full output of a P2PE keypad/magnetic swipe reader (MSR).

        '
    rules_verify_p2pe_idtech:
      title: P2PE - ID TECH - EMV/MSR/Manual
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - p2pe
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        p2pe:
          $ref: '#/components/schemas/P2PEType0102IDTECH'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    TransactionVendorReference:
      type: string
      maxLength: 50
      example: 12382-01
      description: 'Optional field for information that can be searched in the merchant portal.

        '
    ErrorSeverity:
      type: string
      enum:
      - Info
      - Error
      - Alert
      readOnly: true
      example: Info
      description: 'Severity level of the error.


        | Severity | Description                                                       |

        | -------- | ----------------------------------------------------------------  |

        | Info     | Action not required - Data input/formatting is incorrect          |

        | Error    | Action may be required - Communication, timeout or network issue  |

        | Alert    | Action required - System issue                                    |

        '
    P2PEType05TDESDUKPTMSR:
      type: object
      description: 'See [P2PE Format 05 TDES DUKPT](/guides/core-concepts/p2pe-format#tdes-dukpt---format-05) for more information.

        '
      required:
      - data
      - format
      - ksn
      properties:
        data:
          $ref: '#/components/schemas/P2PEData'
        format:
          $ref: '#/components/schemas/P2PEFormatType05'
        ksn:
          $ref: '#/components/schemas/P2PEKSN'
    P2PEDataOnguardSDEMSR:
      type: string
      maxLength: 2048
      example: FFFF495A0000000200000005:4:0128:F48C880DE0DAF549E642C5CC25E65ADF9947E7EB0636DB80C4A490B4C0930AEF64B7201505343CED533A2AE9AFABFE6453875F705519A8109362197CA3BD8DA0FE90DB3F954B9CDA0DB58BDA3330862ADD28CB31EFDA7C641575E33D395D8BFF72EBF0B1FF9630DB0EAB080FE8C9B2FAC28127CDC48CA9F7D532D5BDE4CCE270
      description: "Track information encrypted with AES 256 DUKPT. Contains the following information, separated by colons:\n  \n|Value           | Description\n|----------------|------------\n|ksn             | The key serial number (24 byte hex)\n|track indicator | `1` = track 1 only<br />`2` = track 2 only<br />`3` = manual entry<br />`4` = dual track<br />\n|length          | The length of the encrypted data\n|encrypted data  | Encrypted track/manual entry data\n\nDual Track Example: `FFFF495A0000000200000005:4:0128:F48C880DE0DAF549E642C5CC25E65ADF9947E7EB0636DB80C4A490B4C0930AEF64B7201505343CED533A2AE9AFABFE6453875F705519A8109362197CA3BD8DA0FE90DB3F954B9CDA0DB58BDA3330862ADD28CB31EFDA7C641575E33D395D8BFF72EBF0B1FF9630DB0EAB080FE8C9B2FAC28127CDC48CA9F7D532D5BDE4CCE270`\n\nManual entry Example: `FFFF495A0000000200000006:3:0032:E394820DB97AF927B9B5E05F356750BBF5DFCCB3BC18B87E8FC3C9BC596229E7`\n"
    DateTime:
      type: string
      format: ISO 8601
      example: '2024-05-21T09:18:23.283-07:00'
      description: 'The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).


        Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00

        '
    TransactionInvoice:
      type: string
      maxLength: 10
      example: 0510093358
      description: '10-digit invoice number assigned by the interface to identify a transaction. An invoice number serves as a unique key that identifies a transaction within a batch in Shift4''s Gateway.


        **Note: For US and Canadian processing: Although the invoice number is sent as a JSON string it is a numeric value. No alpha characters are allowed.**


        **For processing outside of the US and Canada alpha characters are allowed.**

        '
    UniversalToken:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/UniversalTokenValue'
    ErrorLongText:
      type: string
      maxLength: 255
      readOnly: true
      example: Card type not recognized
      description: 'Extended error message that is returned if an error condition exists.

        '
    CardMaskedNumber:
      type: string
      maxLength: 32
      example: XXXXXXXXXXXX1119
      description: 'The card number field will always be masked when returned in a response.

        '
    CardTokenRequired:
      type: object
      required:
      - value
      properties:
        value:
          $ref: '#/components/schemas/CardTokenValue'
    TransactionRuleVerify:
      type: object
      required:
      - invoice
      properties:
        invoice:
          $ref: '#/components/schemas/TransactionInvoice'
        vendorReference:
          $ref: '#/components/schemas/TransactionVendorReference'
    P2PEType05TDESDUKPTEMV:
      type: object
      description: 'See [P2PE Format 05 TDES DUKPT](/guides/core-concepts/p2pe-format#tdes-dukpt---format-05) for more information.

        '
      required:
      - format
      - ksn
      properties:
        format:
          $ref: '#/components/schemas/P2PEFormatType05'
        ksn:
          $ref: '#/components/schemas/P2PEKSN'
    ErrorShortText:
      type: string
      maxLength: 16
      readOnly: true
      example: NOT IN CARDRANGE
      description: 'Abbreviated error message that is always returned if an error condition exists

        '
    LighthouseDataResponse:
      type: string
      example: eyJwYXltZW50SWQiOiI4NWM0MWNhNy01NzVjLTQzNGUtODIyZi0xYzZlOTE0ZDAzODYiLCJyZW1haW5pbmdBbW91bnQiOjB9
      description: 'Base64 encoded JSON formatted data that will be returned from Lighthouse to be passed back to SkyTab. This data will contain variable information.

        '
    ErrorPrimaryCode:
      type: integer
      maxLength: 4
      readOnly: true
      example: 9842
      description: 'Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.

        '
    AmountTotal:
      type: number
      maxLength: 14
      example: 160
      description: 'The amount being charged for a particular transaction. If other amount fields are sent, they must be included in the total amount. Amount cannot be zero.

        '
    SurchargeResult:
      type: string
      enum:
      - P
      - F
      description: 'Result of the surcharge eligibility check:


        | Value | Description                                 |

        |-------|---------------------------------------------|

        | P     | Pass - Card is eligible for surcharging     |

        | F     | Fail - Card is not eligible for surcharging |

        '
    TransactionAuthSource:
      type: string
      minLength: 1
      maxLength: 1
      readOnly: true
      example: E
      enum:
      - E
      - O
      - A
      - F
      description: "In a response, a code returned by the processor to indicate which host issued the response.\n\nValue  | Description       \n-------|----------------------------\nE      | Engine (Online)\nO      | Offline\nA      | APM (Online)\nF      | Payment Platform (Online)\n"
    ClerkNumericId:
      type: integer
      maxLength: 5
      example: 1576
      description: 'A number used to identify the point-of-sale (POS) or property management system (PMS) clerk or user. The value cannot be 0. An interface must be able to dynamically populate this field (not use a hardcoded value), unless the interface will be used exclusively for e-commerce.

        '
    rules_verify_p2pe_onguardsde_emv:
      title: P2PE - On-Guard SDE - EMV
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - p2pe
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        p2pe:
          $ref: '#/components/schemas/P2PEType03OnguardSDEEMV'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    CardExpirationDate:
      type: integer
      minLength: 3
      maxLength: 4
      format: MMYY
      example: 1230
      description: '**Conditional: Send only when card data is manually entered or when using a token. This field should not be specified when using an encrypted device.**


        Card expiration date in MMYY format. This value should only be populated in the initial sale/authorization request.

        '
    UniversalTokenValue:
      type: string
      maxLength: 50
      example: 97032276-5944-00000001-16985FD179D
      description: 'An identifier for a card or payment account across all Shift4 merchants.

        '
    P2PEFormatIDTech:
      type: string
      minLength: 2
      maxLength: 2
      enum:
      - '01'
      - '02'
      example: '01'
      description: 'Classifies the type of payment device being used for P2PE.


        Value|Description

        -----|-----------

        01   | IDTech Enhanced Encryption format (Keyboard Mode)

        02   | IDTech Enhanced Encryption format (USB HID Mode)

        '
    CardTokenValue:
      description: 'This field is used to specify a card token. Whenever CHD is sent in a request, a card token will be returned in this field. Your interface should be designed to store this card token for future use. The latest card token received should be used in any subsequent request that references the same card data.

        '
      type: string
      maxLength: 16
      example: '8048471746471119'
    ErrorCode:
      type: integer
      maxLength: 5
      readOnly: true
      example: 64100
      description: 'Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.


        **Note: This is currently only supported for European merchant processing.**

        '
    RuleCheck:
      type: array
      items:
        type: string
        enum:
        - SURCHARGE
      example:
      - SURCHARGE
      writeOnly: true
      description: "Specifies which rule checks are being requested:\n  \n| Value     | Description                                                                                                                                                       |\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| SURCHARGE | Checks to see if a card is eligible for surcharging. If eligible the `surcharge` object will be returned containing the surcharge percentage that can be applied. | \n"
    rules_verify_p2pe_tdesdukpt_emv:
      title: P2PE - TDES DUKPT - EMV
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - p2pe
      - emv
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        p2pe:
          $ref: '#/components/schemas/P2PEType05TDESDUKPTEMV'
        emv:
          $ref: '#/components/schemas/EMVEncryptedTagsOnly'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    rules_verify_p2pe_tdesdukpt_msr:
      title: P2PE - TDES DUKPT - MSR/Manual
      type: object
      required:
      - dateTime
      - amount
      - ruleCheck
      - transaction
      - p2pe
      properties:
        dateTime:
          $ref: '#/components/schemas/DateTime'
        amount:
          $ref: '#/components/schemas/AmountTotalOnly'
        ruleCheck:
          $ref: '#/components/schemas/RuleCheck'
        transaction:
          $ref: '#/components/schemas/TransactionRuleVerify'
        p2pe:
          $ref: '#/components/schemas/P2PEType05TDESDUKPTMSR'
        clerk:
          $ref: '#/components/schemas/ClerkOptional'
    P2PEDataOnguardSDEEMV:
      type: string
      maxLength: 2048
      example: FFFF495A0000000200000002:E:0032:E0AB94F7704E77AB37F81A7E236A1ABC1465C6DFCE43A506240D6E7D6DDA7EA9
      description: "EMV TLV Data for tags 5A and 57 encrypted with AES 256 DUKPT. Contains the following information, separated by colons:\n  \nValue           | Description\n----------------|------------\nksn             | The key serial number (24 byte hex)\ntrack indicator | `E` indicating EMV TLV Data\nlength          | The length of the encrypted data\nencrypted data  | Encrypted TLV containing tags 57 and 5A\n\nExample: `FFFF495A0000000200000002:E:0032:E0AB94F7704E77AB37F81A7E236A1ABC1465C6DFCE43A506240D6E7D6DDA7EA9`\n"
    AmountTotalOnly:
      type: object
      description: 'Object containing information regarding the amount being requested. The `total` field within the object is required and specifies the amount being requested.


        Note: For merchants that are configured to allow multiple currencies, the amount fields can specify up to three decimal places. However, the number of decimal places can not exceed the number allowed for the specified currency. See the [Currency Codes](/guides/appendices/currency-codes) section for details.

        '
      required:
      - total
      properties:
        total:
          $ref: '#/components/schemas/AmountTotal'
    ErrorSecondaryCode:
      type: integer
      maxLength: 4
      readOnly: true
      example: 0
      description: 'This code supplements the code specified in the `error.primaryCode` field to provide additional information about the error that occurred.

        '
    CurrencyCode:
      type: string
      format: ISO 4217 3 Character Alphabetic Code
      example: USD
      description: 'Transaction currency code. See the [Currency Codes](/guides/appendices/currency-codes) section for details.


        **Note: This is currently supported when processing for a merchant outside of the US and Canada. If processing for a US or Canadian merchant then this field will be ignored and the transaction will process in the merchant''s configured currency.**

        '
    RulesTransactionId:
      type: string
      readOnly: true
      maxLength: 20
      description: 'Transaction ID for the rule check

        '
    ClerkOptional:
      type: object
      properties:
        numericId:
          $ref: '#/components/schemas/ClerkNumericId'
  parameters:
    AccessToken:
      required: true
      name: AccessToken
      in: header
      schema:
        type: string
        format: uuid
        maxLength: 52
        example: EA79FB05-3AA7-4500-AF9A-73F986FF2C1D
      description: 'A security credential used to authenticate API requests and all [i4Go®](https://s4-myportal.s3.amazonaws.com/downloads/documentation/i4go/i4go%20technical%20reference%20guide.pdf) authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. The Access Token is required in all requests except an [Access Token Exchange](/apis/payments-platform-rest/openapi/credentials/accesstokenexchange) request, which generates an Access Token using an `authToken` and `clientGuid`.

        '
    CompanyName:
      required: true
      name: CompanyName
      in: header
      schema:
        type: string
        maxLength: 26
        example: PAWS
      description: 'Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

        '
    InterfaceVersion:
      required: true
      name: InterfaceVersion
      in: header
      schema:
        type: string
        maxLength: 11
        example: '2.1'
      description: 'Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ < > , ? “ ” ‘ ’ { } [ ] \ + =

        '
    InterfaceName:
      required: true
      name: InterfaceName
      in: header
      schema:
        type: string
        maxLength: 25
        example: ForwardPOS
      description: 'Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

        '
  responses:
    TimeoutResponse:
      description: Timeout
      content:
        application/json:
          schema:
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    error:
       

# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shift4/refs/heads/main/openapi/shift4-rule-api-openapi.yml