openapi: 3.0.0
info:
  description: >-
    The Electrum Lotto Service Interface describes an interface for creating,
    confirming and
                      reversing Lotto wagers.
  version: 3.0.2
  title: Lotto Service Interface
  contact:
    name: Electrum Support
    url: https://electrum.co.za/contact
    email: support@electrum.co.za
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
paths:
  /games/rules:
    get:
      summary: getGameRules
      description: Retrieve the rules for a Lotto game.
      operationId: getGameRules
      parameters:
        - name: gameName
          in: query
          description: The name of the game for which to retrieve the rules.
          required: true
          schema:
            type: string
            enum:
              - LOTTO
              - LOTTO_PLUS1
              - LOTTO_PLUS2
              - POWERBALL
              - POWERBALL_PLUS1
              - PICK_3
              - SPORTS_STAKE_13
              - RAFFLE
              - DAILY_LOTTO
              - SPORTSTAKE_8
              - DAILY_LOTTO_PLUS
              - DAILY_LOTTO_PLUS_PLUS1
              - LOTTO658
              - LOTTO658_PLUS1
              - LOTTO658_PLUS2
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GameRuleResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      security:
        - httpBasic: []
        - oauth2: []
  /wagers:
    get:
      summary: lookupWager
      description: Retrieve wager information, given the serial number of the lotto ticket.
      operationId: lookupWager
      parameters:
        - name: wagerSerialNumber
          in: query
          description: The serial number of the wager for which to retrieve information.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WagerLookupResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      security:
        - httpBasic: []
        - oauth2: []
  /wagers/{requestId}:
    post:
      summary: createWager
      description: Request a wager be created.
      operationId: createWager
      parameters:
        - name: requestId
          in: path
          description: The randomly generated UUID of this request.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WagerRequest'
        description: A wager request.
        required: true
      responses:
        '201':
          description: Created
          headers:
            Location:
              description: The location of the created wager resource
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WagerResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      security:
        - httpBasic: []
        - oauth2: []
  /wagers/{requestId}/confirmations/{confirmationId}:
    post:
      summary: confirmWager
      description: Confirm a wager request that completed successfully.
      operationId: confirmWager
      parameters:
        - name: requestId
          in: path
          description: The UUID generated for the original wager creation request.
          required: true
          schema:
            type: string
        - name: confirmationId
          in: path
          description: The randomly generated UUID of this request.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenderAdvice'
        description: A wager confirmation.
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicAdvice'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      security:
        - httpBasic: []
        - oauth2: []
  /wagers/{requestId}/reversals/{reversalId}:
    post:
      summary: reverseWager
      description: Reverse a wager creation request that failed or timed out.
      operationId: reverseWager
      parameters:
        - name: requestId
          in: path
          description: The UUID generated for the original wager creation request.
          required: true
          schema:
            type: string
        - name: reversalId
          in: path
          description: The randomly generated UUID of this request.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BasicReversal'
        description: A wager reversal.
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicAdvice'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '404':
          description: Not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '504':
          description: Gateway timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      security:
        - httpBasic: []
        - oauth2: []
servers:
  - url: https://[placeholder].dev/lotto/v2
components:
  securitySchemes:
    httpBasic:
      description: >-
        HTTP basic authentication. If you are doing a client side integration,
        Electrum will provide the username and password to the client. If you
        are doing a server side implementation, you will be expected to provide
        these credentials.
      type: http
      scheme: basic
    oauth2:
      description: >-
        OAuth2 password authentication, where the token URL, client ID, client
        secret, username, and password will be provided by Electrum if you
        implementing a client side integration. If you are doing a server side
        implementation, you will be expected to provide these credentials.
      type: oauth2
      flows:
        password:
          tokenUrl: >-
            https://auth.electrum.dev/auth/realms/Example-Realm/protocol/openid-connect/token
          scopes: {}
  schemas:
    AccountPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          properties:
            srcAccountId:
              type: string
              description: Source AccountId from which this payment will be made.
            srcCustomerId:
              type: string
              description: Source CustomerId from which this payment will be made.
            destAccountId:
              type: string
              description: Destination AccountId to which this payment will be made.
            destCustomerId:
              type: string
              description: Destination CustomerId to which this payment will be made.
          description: Model for an account-to-account payment method
    AddonGame:
      type: object
      required:
        - gameName
        - price
      properties:
        gameName:
          type: string
          description: The name of the game.
          readOnly: true
          enum:
            - LOTTO
            - LOTTO_PLUS1
            - LOTTO_PLUS2
            - POWERBALL
            - POWERBALL_PLUS1
            - PICK_3
            - SPORTS_STAKE_13
            - RAFFLE
            - DAILY_LOTTO
            - SPORTSTAKE_8
            - DAILY_LOTTO_PLUS
            - DAILY_LOTTO_PLUS_PLUS1
            - LOTTO658
            - LOTTO658_PLUS1
            - LOTTO658_PLUS2
        price:
          $ref: '#/components/schemas/LedgerAmount'
    Amounts:
      type: object
      properties:
        requestAmount:
          $ref: '#/components/schemas/LedgerAmount'
        approvedAmount:
          $ref: '#/components/schemas/LedgerAmount'
        feeAmount:
          $ref: '#/components/schemas/LedgerAmount'
        balanceAmount:
          $ref: '#/components/schemas/LedgerAmount'
        additionalAmounts:
          type: object
          description: >-
            Any additional amounts that are involved in a transaction which
            don't appropriately fit into the other amount fields.
          additionalProperties:
            $ref: '#/components/schemas/LedgerAmount'
      description: Amounts which make up the transaction. Absent amounts have zero value.
    An32TokenPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - token
          properties:
            token:
              type: string
              description: 32 character alphanumeric code which identifies a token
              pattern: '[a-zA-Z0-9]{32}'
          description: Model for token-based payments
    Barcode:
      type: object
      required:
        - data
        - encoding
      properties:
        data:
          type: string
          description: Data to be encoded in the barcode
        encoding:
          type: string
          description: Specifies the encoding used in the barcode
      description: Used to indicate barcode information for a slip line.
    BasicAdvice:
      type: object
      required:
        - id
        - requestId
        - thirdPartyIdentifiers
        - time
      properties:
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this advice, as defined for
            a variant 4 UUID in [RFC 4122](https://tools.ietf.org/html/rfc4122)
        requestId:
          type: string
          description: The UUID identifying the request that this advice relates to
        time:
          type: string
          format: date-time
          description: >-
            The date and time of the message as recorded by the sender. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is
            recommended that the optional time-secfrac be included up to
            millisecond precision
        thirdPartyIdentifiers:
          type: array
          description: >-
            The unaltered thirdPartyIdentifiers array as supplied in the related
            BasicResponse message. Required if thirdPartyIdentifiers field was
            present in the BasicResponse. If no thirdPartyIdentifiers was
            received in the BasicResponse or no BasicResponse was received then
            this should be set to the thirdPartyIdentifiers sent in the original
            request.
          items:
            $ref: '#/components/schemas/ThirdPartyIdentifier'
        stan:
          type: string
          description: >-
            The System Trace Audit Number can be used to locate transactions
            across different systems.
        rrn:
          type: string
          description: This is a reference set by the original source of the transaction.
        amounts:
          $ref: '#/components/schemas/Amounts'
      description: The data required in all advice messages
    BasicReversal:
      type: object
      required:
        - id
        - requestId
        - reversalReason
        - thirdPartyIdentifiers
        - time
      properties:
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this advice, as defined for
            a variant 4 UUID in [RFC 4122](https://tools.ietf.org/html/rfc4122)
        requestId:
          type: string
          description: The UUID identifying the request that this advice relates to
        time:
          type: string
          format: date-time
          description: >-
            The date and time of the message as recorded by the sender. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is
            recommended that the optional time-secfrac be included up to
            millisecond precision
        thirdPartyIdentifiers:
          type: array
          description: >-
            The unaltered thirdPartyIdentifiers array as supplied in the related
            BasicResponse message. Required if thirdPartyIdentifiers field was
            present in the BasicResponse. If no thirdPartyIdentifiers was
            received in the BasicResponse or no BasicResponse was received then
            this should be set to the thirdPartyIdentifiers sent in the original
            request.
          items:
            $ref: '#/components/schemas/ThirdPartyIdentifier'
        stan:
          type: string
          description: >-
            The System Trace Audit Number can be used to locate transactions
            across different systems.
        rrn:
          type: string
          description: This is a reference set by the original source of the transaction.
        amounts:
          $ref: '#/components/schemas/Amounts'
        reversalReason:
          type: string
          description: The reason for the reversal
          enum:
            - TIMEOUT
            - CANCELLED
            - RESPONSE_NOT_FINAL
            - REFUND
            - VOID
      description: >-
        An advice that notifies of the negative completion of a transaction.
        This can be either due to customer cancellation, as a result of
        receiving a non-final response (or no response) to a request, customer
        being refunded during the transaction, or the transaction being voided
    Board:
      type: object
      required:
        - quickPick
      properties:
        quickPick:
          type: boolean
          description: >-
            Boolean indicating whether or not the selections are determined by
            Ithuba.
          default: false
        selections:
          type: array
          description: >-
            The outcome of a draw which will allow the customer to win a
            monetary prize.
          items:
            type: string
        betType:
          type: string
          description: >-
            An indication of how the board is to match the three digit number
            drawn by Ithuba. This is only used for the Pick3 game.
          enum:
            - STRAIGHT
            - BOX3
            - BOX6
            - FRONT2
            - BACK2
            - SPLIT
        systemBetType:
          type: string
          description: >-
            An indication of how varied the results of a QuickPick selection may
            be.
          enum:
            - NONE
            - FREE
            - IQP4
            - IQP8
            - IQP16
            - IQP24
            - IQP32
            - IQP64
            - IQP128
            - IQP256
      description: Board related data.
    CardPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - pan
          properties:
            posInfo:
              $ref: '#/components/schemas/PosInfo'
            pin:
              $ref: '#/components/schemas/Pin'
            pan:
              type: string
              description: Primary account number that uniquely identifies this card.
              pattern: '[0-9]{1,19}'
            expiryDate:
              type: string
              description: The card expiry date, in YYMM format.
              pattern: '[0-9]{4}'
            threeDSecureData:
              $ref: '#/components/schemas/ThreeDSecureData'
            encryptedPin:
              $ref: '#/components/schemas/EncryptedPin'
          description: Model for card-based payments
    EncryptedPin:
      type: object
      required:
        - pinBlock
      properties:
        pinBlock:
          type: string
          description: Hexadecimal string representing the encrypted PIN to be used.
          pattern: '[a-fA-F0-9]{16}|[a-fA-F0-9]{32}'
        encryptionParameters:
          $ref: '#/components/schemas/EncryptionParameters'
      description: >-
        A PIN required to authorise a transaction. EncryptionParameters should
        be provided where the service will be performing operations on the
        encrypted PIN, such as PIN translation. Only the PIN block need be
        provided where the service is expected to forward it to a third party,
        where the calling client and said third party have agreed upon
        encryption parameters beforehand.
    EncryptionParameters:
      type: object
      required:
        - accountNumber
      properties:
        pinBlockFormat:
          type: string
          description: >-
            PIN block format that was used when encrypting the PIN. Defaults to
            ISO_9564_FORMAT_0.
          default: ISO_9564_FORMAT_0
          enum:
            - ISO_9564_FORMAT_0
            - ISO_9564_FORMAT_1
            - ISO_9564_FORMAT_3
            - ISO_9564_FORMAT_4
        accountNumber:
          type: string
          description: >-
            12 digit account number used when encrypting the PIN. When account
            number is a card number (PAN), this is the rightmost 12 digits
            excluding the check digit.
          pattern: '[0-9]{12}'
        keyIndex:
          type: integer
          format: int32
          description: >-
            Index of the key under which the PIN block is encrypted. Where keys
            are exchanged in TR-31 KeyBlock format, this should be set to the
            key version number field of the key used for encryption. If this
            field is not populated, the most recently exchanged key will be
            used. Note that omitting this field may require a higher level of
            synchronization during automated key exchange in some environments.
      description: >-
        Parameters pertaining to the generation of the PIN block. Required if
        the service is to perform any operations on the encrypted PIN, such as
        translation.
    ErrorDetail:
      type: object
      required:
        - errorMessage
        - errorType
        - id
        - requestType
      properties:
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this errorDetail, as defined
            for a variant 4 UUID in [RFC
            4122](https://tools.ietf.org/html/rfc4122)
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-(3|4)[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
        originalId:
          type: string
          description: >-
            The UUID of the original request message in the case of an error
            occurring for an advice message
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-(3|4)[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
        errorType:
          type: string
          description: The type of error that occurred
          enum:
            - DUPLICATE_RECORD
            - FORMAT_ERROR
            - FUNCTION_NOT_SUPPORTED
            - GENERAL_ERROR
            - INVALID_AMOUNT
            - ROUTING_ERROR
            - TRANSACTION_NOT_SUPPORTED
            - UNABLE_TO_LOCATE_RECORD
            - UPSTREAM_UNAVAILABLE
            - INVALID_PRODUCT
            - ACCOUNT_ALREADY_SETTLED
            - AUTH_ERROR
            - INVALID_MERCHANT
            - REVISION_CHANGE
            - DRAW_NOT_OPEN
            - TIME_LIMIT_EXCEEDED
            - DO_NOT_HONOR
            - SYSTEM_MALFUNCTION
            - TRANSACTION_DECLINED
            - INVALID_ACCOUNT
            - LIMIT_EXCEEDED
            - INSUFFICIENT_FUNDS
        errorMessage:
          type: string
          description: A short description of the error
          pattern: ^[ -;=\?-Z\^-z\|~]{0,20}$
        requestType:
          type: string
          description: The type of request that preceeded the error
          enum:
            - WAGER_REQUEST
            - WAGER_REVERSAL
            - WAGER_CONFIRMATION
            - GET_GAME_RULES
            - LOOKUP_WAGER
        detailMessage:
          type: object
          description: >-
            A free form detailed description of a particular failure condition
            may optionally be supplied
      description: Represents the outcome of a completed transaction.
    GameRule:
      type: object
      required:
        - basePrice
        - gameName
        - maxPrice
        - revision
      properties:
        isQuickPickAvailable:
          type: boolean
          description: Indicates if quick pick is available for this game.
          default: false
        gameName:
          type: string
          description: The name of the game.
          enum:
            - LOTTO
            - LOTTO_PLUS1
            - LOTTO_PLUS2
            - POWERBALL
            - POWERBALL_PLUS1
            - PICK_3
            - SPORTS_STAKE_13
            - RAFFLE
            - DAILY_LOTTO
            - SPORTSTAKE_8
            - DAILY_LOTTO_PLUS
            - DAILY_LOTTO_PLUS_PLUS1
            - LOTTO658
            - LOTTO658_PLUS1
            - LOTTO658_PLUS2
        basePrice:
          $ref: '#/components/schemas/LedgerAmount'
        maxPrice:
          $ref: '#/components/schemas/LedgerAmount'
        minBoards:
          type: integer
          format: int32
          description: The minimum number of boards that can be played per wager.
          minimum: 0
        maxBoards:
          type: integer
          format: int32
          description: The maximum number of boards that can be played per wager
          minimum: 0
        minSelections:
          type: integer
          format: int32
          description: >-
            The minimum number of selections that can be made for the primary
            selection.
          minimum: 0
        maxSelections:
          type: integer
          format: int32
          description: >-
            The maximum number of selections that can be made for the primary
            selection.
          minimum: 0
        minSecondarySelections:
          type: integer
          format: int32
          description: >-
            The minimum number of selections that can be made for the secondary
            selection.
          minimum: 0
        maxSecondarySelections:
          type: integer
          format: int32
          description: >-
            The maximum number of selections that can be made for the secondary
            selection.
          minimum: 0
        selectionLowNumber:
          type: string
          description: The lowest number that can be selected. Not applicable to all games.
          pattern: ^[0-9]{6}$
        selectionHighNumber:
          type: string
          description: >-
            The highest number that can be selected. Not applicable to all
            games.
          pattern: ^[0-9]{6}$
        secondarySelectionLowNumber:
          type: string
          description: >-
            The lowest number that can be selected for the secondary selection.
            Not applicable to all games.
          pattern: ^[0-9]{6}$
        secondarySelectionHighNumber:
          type: string
          description: >-
            The highest number that can be selected for the secondary selection.
            Not applicable to all games.
          pattern: ^[0-9]{6}$
        maxDuration:
          type: integer
          format: int32
          description: The maximum duration of a game.
          minimum: 0
        revision:
          type: string
          description: >-
            The current revision version of the game rules. The revision is
            retrieved from the game provider.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        ticketMessage:
          type: string
          description: A message to print on tickets.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,1500}$
        addonGames:
          type: array
          description: Returns the list of all add-on games.
          items:
            $ref: '#/components/schemas/AddonGame'
    GameRuleResponse:
      type: object
      properties:
        gameRules:
          type: array
          description: The list of game rules, per game.
          items:
            $ref: '#/components/schemas/GameRule'
      description: Contains the list of requested game rules.
    HashedPinParameters:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the hashing algorithm.
          minLength: 0
          maxLength: 20
      description: >-
        A collection of parameters required to reliably reproduce the hashed
        value (excluding the actual PIN value).
    Institution:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: >-
            The institution's ID. API implementations should take care to set
            this field as appropriate for the implementation.
        name:
          type: string
          description: The institutions's name
          minLength: 0
          maxLength: 40
      description: Originating, acquiring, processing, or receiving institution details
    LedgerAmount:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          format: int64
          description: Amount in minor denomination, e.g. R799.95 is encoded as 79995
        currency:
          type: string
          description: >-
            Three digit currency number from ISO 4217, e.g. South African Rand
            is encoded as 710
          pattern: '[0-9]{3}'
        ledgerIndicator:
          type: string
          description: >-
            Indicates whether this amount is a debit or a credit. Only required
            when the amount can be either a debit or a credit
          enum:
            - DEBIT
            - CREDIT
      description: >-
        An amount object only containing value and currency, and optionally an
        indicator of DEBIT/CREDIT
    LoyaltyCardPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - cardNumber
          properties:
            cardNumber:
              type: string
              description: >-
                Primary account number of the loyalty programme card used to
                make a payment
              pattern: '[0-9]{16}'
          description: Model for payments made using loyalty programme cards
    Merchant:
      type: object
      required:
        - merchantId
        - merchantName
        - merchantType
      properties:
        merchantType:
          type: string
          description: The assigned four digit merchant category code
          pattern: '[0-9]{4}'
        merchantId:
          type: string
          description: The assigned merchant identifier. Also known as card acceptor id
          minLength: 15
          maxLength: 15
        merchantName:
          $ref: '#/components/schemas/MerchantName'
      description: Merchant related data. Must be included if available
    MerchantName:
      type: object
      required:
        - city
        - country
        - name
        - region
      properties:
        name:
          type: string
          description: The merchant or trading as name associated with the merchant
          minLength: 0
          maxLength: 23
        city:
          type: string
          description: The city where the merchant is located
          minLength: 0
          maxLength: 13
        region:
          type: string
          description: The state or region where the merchant is located
          minLength: 0
          maxLength: 2
        country:
          type: string
          description: The country where the merchant is located
          minLength: 0
          maxLength: 2
      description: A container object representing the Merchant Name and Location
    Originator:
      type: object
      required:
        - institution
        - merchant
        - terminalId
      properties:
        institution:
          $ref: '#/components/schemas/Institution'
        terminalId:
          type: string
          description: >-
            The ID that uniquely identifies each device or system in an
            originator's institution capable of sending requests. Required for
            transactions initiated from physical card entry or point-of-sale
            devices
          minLength: 8
          maxLength: 8
        merchant:
          $ref: '#/components/schemas/Merchant'
        operatorId:
          type: string
          description: >-
            The ID that uniquely identifies the person operating the terminal
            specified by the terminalId field.
          minLength: 0
          maxLength: 30
        channelId:
          type: string
          description: >-
            The ID that uniquely identifies the originator's channel that this
            transaction was received through.
          minLength: 0
          maxLength: 50
      description: >-
        The Originator object encapsulates data relating to the originator of
        the transaction
    PaymentMethod:
      type: object
      required:
        - type
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
          description: The general method of payment used
          enum:
            - AN_32_TOKEN
            - LOYALTY_CARD
            - CARD
            - ACCOUNT
            - REWARD
            - WALLET
            - QR
        name:
          type: string
          description: The specific method of payment used
        amount:
          $ref: '#/components/schemas/LedgerAmount'
        issuer:
          $ref: '#/components/schemas/Institution'
        pin:
          $ref: '#/components/schemas/Pin'
        proxy:
          type: string
          description: >-
            An alternative identifier for the customer's source of funds. Acts
            as a stand in for the customer identifier. E.g. a customer's MSISDN
            or email address.
          minLength: 0
          maxLength: 40
        proxyType:
          type: string
          description: An enumerated value describing the type of value used as the proxy.
          enum:
            - MSISDN
            - EMAIL
            - UNKNOWN
      description: Base model for all payment types
    Pin:
      type: object
      required:
        - type
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
          description: Whether the PIN is communicated in the clear or encrypted.
          enum:
            - CLEAR_PIN
            - ENCRYPTED_PIN
            - HASHED_PIN
      description: Base model for capturing either a clear PIN or encrypted PIN
    PinClear:
      allOf:
        - $ref: '#/components/schemas/Pin'
        - type: object
          required:
            - pin
          properties:
            pin:
              type: string
              description: A clear PIN
              pattern: .{0,20}
          description: A clear PIN required to authorise a transaction.
    PinEncrypted:
      allOf:
        - $ref: '#/components/schemas/Pin'
        - type: object
          required:
            - pinBlock
          properties:
            pinBlock:
              type: string
              description: Hexadecimal string representing the encrypted PIN to be used.
              pattern: '[a-fA-F0-9]{16}|[a-fA-F0-9]{32}'
            encryptionParameters:
              $ref: '#/components/schemas/EncryptionParameters'
          description: >-
            A PIN required to authorise a transaction. EncryptionParameters
            should be provided where the service will be performing operations
            on the encrypted PIN, such as PIN translation. Only the PIN block
            need be provided where the service is expected to forward it to a
            third party, where the calling client and said third party have
            agreed upon encryption parameters beforehand.
    PinHashed:
      allOf:
        - $ref: '#/components/schemas/Pin'
        - type: object
          required:
            - hash
          properties:
            hash:
              type: string
              description: A hashed PIN expressed as an ASCII string of hexadecimal values.
              pattern: '[0-9,A-F]{1,512}'
            hashedPinParameters:
              $ref: '#/components/schemas/HashedPinParameters'
          description: >-
            A PIN, required to authorise a transaction, which has been hashed
            according to some hashing algorithm.
    PosEntryMode:
      type: object
      required:
        - panEntryMode
        - pinEntryCapability
      properties:
        panEntryMode:
          type: string
          description: Describes the method by which the PAN was captured.
          enum:
            - UNKNOWN
            - MANUAL
            - MAGSTRIPE_NO_CVV
            - BARCODE
            - OCR
            - ICC_CVV
            - CONTACTLESS_ICC
            - MAGSTRIPE_CVV
            - CONTACTLESS_MAGSTRIPE
            - ICC_NO_CVV
            - ORIG_MODE
            - FALLBACK
        pinEntryCapability:
          type: string
          description: Describes whether the PIN can be entered.
          enum:
            - UNKNOWN
            - CAN_ACCEPT
            - CANNOT_ACCEPT
      description: Describes how the PAN and PIN were captured by the POS.
    PosInfo:
      type: object
      properties:
        entryMode:
          $ref: '#/components/schemas/PosEntryMode'
        posConditionCode:
          type: string
          description: Describes the circumstances of the transaciton at the POS.
          enum:
            - NORMAL_PRESENTMENT
            - CUSTOMER_NOT_PRESENT
            - CUSTOMER_PRESENT_AND_CARD_NOT_PRESENT
            - CUSTOMER_IDENTITY_VERIFIED
            - PUBLIC_UTILITY_TERMINAL
            - CUSTOMER_TERMINAL
            - MANUAL_REVERSAL
            - UNATTENDED_TERMINAL_AND_CARD_CAN_BE_RETAINED
            - UNATTENDED_TERMINAL_AND_CARD_CANNOT_BE_RETAINED
      description: POS related data.
    QrPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - tranId
          properties:
            tranId:
              type: string
              description: >-
                The unique transaction identifier related to this transaction.
                In QRs styled on the EMVCo specification, the tranId is embedded
                in sub-Tag 00 of the Electrum MAIT.
            partnerPaymentToken:
              type: string
              description: A payment token received from the Partner.
          description: >-
            Model for QR-based payments. This payment method should be used when
            a QR code is presented for payment.
    RewardPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - rewardCode
          properties:
            rewardCode:
              type: string
              description: A code used to recognise the reward programme
              minLength: 0
              maxLength: 40
          description: >-
            Model for reward-based payments. This payment method should be used
            when the payment is offset using a reward programme
    SlipData:
      type: object
      properties:
        messageLines:
          type: array
          description: >-
            An array of text lines and optional formatting to be printed on the
            customer slip.
          items:
            $ref: '#/components/schemas/SlipLine'
        slipWidth:
          type: integer
          format: int32
          description: The width of the slip in normal (unformatted) characters.
        issuerReference:
          type: string
          description: >-
            An identifier that is printed on the customer slip and uniquely
            identifies the payment on the service provider's system. This value
            is used by the customer to request a refund when the service
            supports this function, and it is thus important that this number is
            unique.
          pattern: '[A-Z0-9]{1,40}'
      description: Data that may be printed on the customer slip for information purposes
    SlipLine:
      type: object
      required:
        - text
      properties:
        barcode:
          $ref: '#/components/schemas/Barcode'
        text:
          type: string
          description: Text contained on the line
        fontWidthScaleFactor:
          type: number
          format: double
          description: >-
            Scale factor for font width. Assume 1.0 (i.e. normal size) if not
            present.
        fontHeightScaleFactor:
          type: number
          format: double
          description: >-
            Scale factor for font height. Assume 1.0 (i.e. normal size) if not
            present.
        line:
          type: boolean
          description: Denotes a solid line on the slip. Assume false if not present.
          default: false
        cut:
          type: boolean
          description: >-
            Indicates the slip should be cut at this line. Assume false if not
            present.
          default: false
      description: A line of text to be printed on the till slip
    Tender:
      type: object
      required:
        - amount
        - tenderType
      properties:
        accountType:
          type: string
          description: The type of account
          enum:
            - DEFAULT
            - SAVINGS
            - CHEQUE
            - CREDIT
            - UNIVERSAL
            - ELECTRONIC_PURSE
            - STORED_VALUE
        amount:
          $ref: '#/components/schemas/LedgerAmount'
        cardNumber:
          type: string
          description: >-
            A PCI compliant masked card number, with at least the first 6 digits
            in the clear. Only applicable to card based transactions
          pattern: '[0-9]{6}[0-9*]{0,13}'
        reference:
          type: string
          description: A free text reference
          minLength: 0
          maxLength: 40
        tenderType:
          type: string
          description: The type of tender used
          enum:
            - CASH
            - CHEQUE
            - CREDIT_CARD
            - DEBIT_CARD
            - WALLET
            - ROUNDING
            - GIFT_CARD
            - LOYALTY_CARD
            - OTHER
            - REWARD
      description: Details of the Tender used by a customer towards a payment
    TenderAdvice:
      type: object
      required:
        - id
        - requestId
        - tenders
        - thirdPartyIdentifiers
        - time
      properties:
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this advice, as defined for
            a variant 4 UUID in [RFC 4122](https://tools.ietf.org/html/rfc4122)
        requestId:
          type: string
          description: The UUID identifying the request that this advice relates to
        time:
          type: string
          format: date-time
          description: >-
            The date and time of the message as recorded by the sender. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is
            recommended that the optional time-secfrac be included up to
            millisecond precision
        thirdPartyIdentifiers:
          type: array
          description: >-
            The unaltered thirdPartyIdentifiers array as supplied in the related
            BasicResponse message. Required if thirdPartyIdentifiers field was
            present in the BasicResponse. If no thirdPartyIdentifiers was
            received in the BasicResponse or no BasicResponse was received then
            this should be set to the thirdPartyIdentifiers sent in the original
            request.
          items:
            $ref: '#/components/schemas/ThirdPartyIdentifier'
        stan:
          type: string
          description: >-
            The System Trace Audit Number can be used to locate transactions
            across different systems.
        rrn:
          type: string
          description: This is a reference set by the original source of the transaction.
        amounts:
          $ref: '#/components/schemas/Amounts'
        tenders:
          type: array
          description: An array of tenders used to pay for the transaction
          items:
            $ref: '#/components/schemas/Tender'
      description: An advice that notifies of the successful completion of a transaction.
    ThirdPartyIdentifier:
      type: object
      required:
        - institutionId
        - transactionIdentifier
      properties:
        institutionId:
          type: string
          description: The entity's institution ID.
        transactionIdentifier:
          type: string
          description: >-
            The identifier assigned to this transaction by the institution
            represented in institutionId. This value should be unique within the
            institution's system.
      description: >-
        An identifier assigned by an entity which process the message.
        Identifiers are keyed by institution ID thereby enabling any institution
        to recall a transaction within the entity's own system using the
        entity's own identifier. Entities must not alter the identifier set by
        another entity. Once an identifier has been set by an entity, all other
        entities must send that identifier in subsequent messages.
    ThreeDSecureData:
      type: object
      required:
        - version
      discriminator:
        propertyName: version
      properties:
        authenticationValue:
          type: string
          description: >-
            A 20-byte value that has been Base64 encoded. This value is provided
            by the Access Control Server as a proof of authentication.
        cardHolderAuthVerificationResult:
          type: string
          description: Authentication outcome set by the Access Control Server or Issuer.
          enum:
            - CAVV_VALIDATION_PASSED
            - CAVV_VALIDATION_FAILED_ISSUER_SYSTEM_ERROR
            - CAVV_VALIDATION_FAILED_ISSUER_ATTEMPT_INCOMPLETE
            - CAVV_NOT_VALIDATED
            - CAVV_NOT_VALIDATED_INVALID_DATA
            - CAVV_VALIDATION_FAILED
        version:
          type: string
          description: >-
            The version of the 3-D Secure protocol that was used for cardholder
            authentication. Note that the version determines the format of the
            transaction identifier
          enum:
            - V1
            - V2
        eci:
          type: string
          description: >-
            Electronic Commerce Indicator. This is Payment System-specific value
            provided by the Access Control Server to indicate the results of the
            attempt to authenticate the Cardholder.
          enum:
            - AUTHENTICATION_NOT_ATTEMPTED_OR_UNSUCCESSFUL_00
            - AUTHENTICATION_NOT_ENABLED_01
            - AUTHENTICATION_SUCCESSFUL_02
            - AUTHENTICATION_SUCCESSFUL_05
            - AUTHENTICATION_NOT_ENABLED_06
            - AUTHENTICATION_NOT_ATTEMPTED_OR_UNSUCCESSFUL_07
        transactionStatus:
          type: string
          description: >-
            Indicates whether a transaction qualifies as an authenticated
            transaction or account verification. The values and their meanings
            are as follows: 

            Y = Authentication Verification Successful.
             N = Not Authenticated /Account Not Verified; Transaction denied.
             U = Authentication/ Account Verification Could Not Be Performed; Technical or other problem.
             A = Attempts Processing Performed; Not Authenticated/ Verified, but a proof of attempted authentication/verification is provided.
             C = Challenge Required; Additional authentication is required using the CReq/CRes 
             D = Challenge Required; Decoupled Authentication confirmed. 
             R = Authentication/ Account Verification Rejected; Issuer is rejecting authentication/verification and request that authorisation not be attempted.
             I = Informational Only; 3DS Requestor challenge preference acknowledged.
             S = Challenge using SPC 
             
          enum:
            - 'Y'
            - 'N'
            - U
            - A
            - C
            - D
            - R
            - I
            - S
      description: >-
        Data used to facilitate and communicate the result of 3-D Secure
        cardholder authentication.
    ThreeDSecureDataV1:
      allOf:
        - $ref: '#/components/schemas/ThreeDSecureData'
        - type: object
          properties:
            transactionId:
              type: string
              description: >-
                A 20-byte base 64 encoded string assigned by the 3DS Server to
                identify a single transaction. This ID can be used to prevent
                transaction replay.
          description: >-
            3-D Secure data in which the transaction identifier takes the format
            of a byte string.
    ThreeDSecureDataV2:
      allOf:
        - $ref: '#/components/schemas/ThreeDSecureData'
        - type: object
          properties:
            transactionId:
              type: string
              format: uuid
              description: >-
                A UUID assigned by the 3DS Server to identify a single
                transaction. This ID can be used to prevent transaction replay.
                This is based on version 2 the EMVCo 3-D Secure specification.
          description: >-
            3-D Secure data in which the transaction identifier takes the format
            of a UUID.
    TransactionLabel:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: >-
            Label name that indicates the type and intended use of the
            transaction label. The meaning of label names must be agreed upon by
            the parties involved in transaction processing.
          pattern: ^[a-zA-Z0-9_]{1,100}$
        value:
          type: string
          description: The value assigned to the transaction label.
          pattern: ^[a-zA-Z.-9 _-]{1,100}$
      description: >-
        A label assigned to a transaction by the entity processing the
        transaction. Labels are used for grouping or discovering transactions
        after transaction processing. Note that no transaction processing
        decision is made based on transaction labels.
    Wager:
      type: object
      required:
        - boards
      properties:
        drawId:
          type: string
          description: >-
            The drawId of the draw the Wager pertains to. If the Wager spans
            multiple draws this will be the drawId of the first draw the Wager
            pertains to.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        duration:
          type: integer
          format: int32
          description: The number of draws this Wager pertains to.
          minimum: 0
        gameName:
          type: string
          description: The name of the game this Wager pertains to.
          enum:
            - LOTTO
            - LOTTO_PLUS1
            - LOTTO_PLUS2
            - POWERBALL
            - POWERBALL_PLUS1
            - PICK_3
            - SPORTS_STAKE_13
            - RAFFLE
            - DAILY_LOTTO
            - SPORTSTAKE_8
            - DAILY_LOTTO_PLUS
            - DAILY_LOTTO_PLUS_PLUS1
            - LOTTO658
            - LOTTO658_PLUS1
            - LOTTO658_PLUS2
        barcode:
          type: string
          description: An alternative indication of the wager's game.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        serialNumber:
          type: string
          description: The serial number of the ticket representing this Wager.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        securityCode:
          type: string
          description: >-
            The security code needed to validate the ticket representing this
            Wager.
        boards:
          type: array
          description: The collection of Boards which make up the Wager.
          items:
            $ref: '#/components/schemas/Board'
        groupMemberId:
          type: string
          description: Required to be printed on the receipt.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        groupId:
          type: string
          description: Required to be printed on the receipt.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
        drawStartDate:
          type: string
          format: date-time
          description: >-
            The date and time of the first draw covered by this wager. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
        drawEndDate:
          type: string
          format: date-time
          description: >-
            The date and time of the last draw covered by this wager. The format
            shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
        revision:
          type: string
          description: >-
            The current revision version of the game rules. The revision is
            retrieved from the game provider.
          pattern: ^[ -;=\?-Z\^-z\|~]{0,50}$
      description: >-
        Describes the variety or boards the customer wishes to play for a game
        for a number of draws.
    WagerLookupResponse:
      type: object
      properties:
        wagerResponse:
          $ref: '#/components/schemas/WagerResponse'
        isReversed:
          type: boolean
          description: >-
            Indicates whether or not the current wager has been reversed, or has
            a reversal pending.
          default: false
      description: Information about a successful wager lookup.
    WagerRequest:
      type: object
      required:
        - client
        - id
        - originator
        - thirdPartyIdentifiers
        - time
        - wager
      properties:
        transactionLabels:
          type: array
          description: >-
            A list containing labels that can be used to discover this
            transaction or group it with other transactions sharing labels with
            the same label name and value. Transaction labels should never be
            used to make transaction processing decisions.
          items:
            $ref: '#/components/schemas/TransactionLabel'
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this transaction, as defined
            for a variant 4 UUID in [RFC
            4122](https://tools.ietf.org/html/rfc4122)
        time:
          type: string
          format: date-time
          description: >-
            The date and time of the message as recorded by the sender. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is
            recommended that the optional time-secfrac be included up to
            millisecond precision
        originator:
          $ref: '#/components/schemas/Originator'
        client:
          $ref: '#/components/schemas/Institution'
        settlementEntity:
          $ref: '#/components/schemas/Institution'
        receiver:
          $ref: '#/components/schemas/Institution'
        thirdPartyIdentifiers:
          type: array
          description: >-
            An array of identifiers which each identify the transaction within
            each entity's system.
          items:
            $ref: '#/components/schemas/ThirdPartyIdentifier'
        slipData:
          $ref: '#/components/schemas/SlipData'
        basketRef:
          type: string
          description: >-
            Used to group multiple transactions which would otherwise be
            considered independent.
        tranType:
          type: string
          description: >-
            Data relating to the type of transaction taking place (i.e. cash
            withdrawal, goods and services etc.).
          enum:
            - GOODS_AND_SERVICES
            - CASH_WITHDRAWAL
            - DEBIT_ADJUSTMENT
            - GOODS_AND_SERVICES_WITH_CASH_BACK
            - NON_CASH
            - RETURNS
            - DEPOSIT
            - CREDIT_ADJUSTMENT
            - GENERAL_CREDIT
            - AVAILABLE_FUNDS_INQUIRY
            - BALANCE_INQUIRY
            - GENERAL_INQUIRY
            - CARD_VERIFICATION_INQUIRY
            - CARDHOLDER_ACCOUNTS_TRANSFER
            - GENERAL_TRANSFER
            - PAYMENT_FROM_ACCOUNT
            - GENERAL_PAYMENT
            - PAYMENT_TO_ACCOUNT
            - PAYMENT_FROM_ACCOUNT_TO_ACCOUNT
            - PLACE_HOLD_ON_CARD
            - GENERAL_ADMIN
            - CHANGE_PIN
            - CARD_HOLDER_INQUIRY
            - POINTS_INQUIRY
        srcAccType:
          type: string
          description: >-
            This specifies the type of source account being used in the
            transaction (i.e. cheque, savings).
          enum:
            - DEFAULT
            - SAVINGS
            - CHEQUE
            - CREDIT
            - UNIVERSAL
            - ELECTRONIC_PURSE
            - GIFT_CARD
            - STORED_VALUE
        destAccType:
          type: string
          description: >-
            This specifies the type of destination account being used in the
            transaction (i.e. cheque, savings).
          enum:
            - DEFAULT
            - SAVINGS
            - CHEQUE
            - CREDIT
            - UNIVERSAL
            - ELECTRONIC_PURSE
            - GIFT_CARD
            - STORED_VALUE
        stan:
          type: string
          description: >-
            The System Trace Audit Number can be used to locate transactions
            across different systems.
        rrn:
          type: string
          description: This is a reference set by the original source of the transaction.
        amounts:
          $ref: '#/components/schemas/Amounts'
        wager:
          $ref: '#/components/schemas/Wager'
        paymentMethods:
          type: array
          description: >-
            An array of payment methods to be used as payment for the
            transaction. This is used if payment is not tendered at the point of
            sale, but is effected through one or more calls to third party
            payment providers as part of the request. A PaymentMethod differs
            from a Tender in that the former represents payment that still needs
            to be collected from a third party, whereas the latter represents
            payment that has already been collected at the point of sale.
          items:
            $ref: '#/components/schemas/PaymentMethod'
        tenders:
          type: array
          description: >-
            An array of tenders used to pay for the transaction. This is used if
            payment is tendered at the point of sale. A Tender differs from a
            PaymentMethod in that the former represents a payment that has
            already been collected at the point of sale, whereas the latter
            represents a payment that still needs to be collected from a third
            party.
          items:
            $ref: '#/components/schemas/Tender'
      description: Information about the wager request.
    WagerResponse:
      type: object
      required:
        - client
        - id
        - originator
        - thirdPartyIdentifiers
        - time
        - wager
      properties:
        transactionLabels:
          type: array
          description: >-
            A list containing labels that can be used to discover this
            transaction or group it with other transactions sharing labels with
            the same label name and value. Transaction labels should never be
            used to make transaction processing decisions.
          items:
            $ref: '#/components/schemas/TransactionLabel'
        id:
          type: string
          description: >-
            The randomly generated UUID identifying this transaction, as defined
            for a variant 4 UUID in [RFC
            4122](https://tools.ietf.org/html/rfc4122)
        time:
          type: string
          format: date-time
          description: >-
            The date and time of the message as recorded by the sender. The
            format shall be as defined for date-time in [RFC 3339 section
            5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is
            recommended that the optional time-secfrac be included up to
            millisecond precision
        originator:
          $ref: '#/components/schemas/Originator'
        client:
          $ref: '#/components/schemas/Institution'
        settlementEntity:
          $ref: '#/components/schemas/Institution'
        receiver:
          $ref: '#/components/schemas/Institution'
        thirdPartyIdentifiers:
          type: array
          description: >-
            An array of identifiers which each identify the transaction within
            each entity's system.
          items:
            $ref: '#/components/schemas/ThirdPartyIdentifier'
        slipData:
          $ref: '#/components/schemas/SlipData'
        basketRef:
          type: string
          description: >-
            Used to group multiple transactions which would otherwise be
            considered independent.
        tranType:
          type: string
          description: >-
            Data relating to the type of transaction taking place (i.e. cash
            withdrawal, goods and services etc.).
          enum:
            - GOODS_AND_SERVICES
            - CASH_WITHDRAWAL
            - DEBIT_ADJUSTMENT
            - GOODS_AND_SERVICES_WITH_CASH_BACK
            - NON_CASH
            - RETURNS
            - DEPOSIT
            - CREDIT_ADJUSTMENT
            - GENERAL_CREDIT
            - AVAILABLE_FUNDS_INQUIRY
            - BALANCE_INQUIRY
            - GENERAL_INQUIRY
            - CARD_VERIFICATION_INQUIRY
            - CARDHOLDER_ACCOUNTS_TRANSFER
            - GENERAL_TRANSFER
            - PAYMENT_FROM_ACCOUNT
            - GENERAL_PAYMENT
            - PAYMENT_TO_ACCOUNT
            - PAYMENT_FROM_ACCOUNT_TO_ACCOUNT
            - PLACE_HOLD_ON_CARD
            - GENERAL_ADMIN
            - CHANGE_PIN
            - CARD_HOLDER_INQUIRY
            - POINTS_INQUIRY
        srcAccType:
          type: string
          description: >-
            This specifies the type of source account being used in the
            transaction (i.e. cheque, savings).
          enum:
            - DEFAULT
            - SAVINGS
            - CHEQUE
            - CREDIT
            - UNIVERSAL
            - ELECTRONIC_PURSE
            - GIFT_CARD
            - STORED_VALUE
        destAccType:
          type: string
          description: >-
            This specifies the type of destination account being used in the
            transaction (i.e. cheque, savings).
          enum:
            - DEFAULT
            - SAVINGS
            - CHEQUE
            - CREDIT
            - UNIVERSAL
            - ELECTRONIC_PURSE
            - GIFT_CARD
            - STORED_VALUE
        stan:
          type: string
          description: >-
            The System Trace Audit Number can be used to locate transactions
            across different systems.
        rrn:
          type: string
          description: This is a reference set by the original source of the transaction.
        amounts:
          $ref: '#/components/schemas/Amounts'
        wager:
          $ref: '#/components/schemas/Wager'
        paymentMethods:
          type: array
          description: >-
            An array of payment methods to be used as payment for the
            transaction. This is used if payment is not tendered at the point of
            sale, but is effected through one or more calls to third party
            payment providers as part of the request. A PaymentMethod differs
            from a Tender in that the former represents payment that still needs
            to be collected from a third party, whereas the latter represents
            payment that has already been collected at the point of sale.
          items:
            $ref: '#/components/schemas/PaymentMethod'
      description: Information about a successful wager request.
    WalletPayment:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod'
        - type: object
          required:
            - walletId
          properties:
            walletId:
              type: string
              description: The unique identifier of the wallet account making the payment.
              readOnly: true
            walletPocket:
              $ref: '#/components/schemas/WalletPocket'
          description: Model for mobile wallet payments
    WalletPocket:
      type: object
      required:
        - pocketName
      properties:
        pocketName:
          type: string
          description: The name given to this wallet pocket.
        pocketId:
          type: string
          description: >-
            A programmatic ID that can be used to identify this pocket when the
            name is not enough
