swagger: "2.0"
schemes:
  - https
host: sandbox.whapi.com
basePath: /v2/accounts
info:
  contact:
    email: platform@williamhill.com
    name: William Hill Labs
    url: http://developer.williamhill.com
    x-twitter: WilliamHill
  description: The Accounts API is a collection of methods used to query a customer account. It allows the developer to retrieve account-related data such as the user account balance. It should be noted that regional variations may exist - so some fields may not be returned for certain territories.
  title: Accounts API
  version: 2.0.0
  x-apisguru-categories:
    - entertainment
  x-logo:
    url: https://twitter.com/WillHillHelp/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://developer.williamhill.com/wh-docs/docs-sdks/accounts/swagger/docs
      version: "2.0"
  x-providerName: whapi.com
  x-serviceName: accounts
consumes:
  - application/json
produces:
  - application/json
parameters:
  param_apiCountryCode:
    default: GB
    description: A two-character ISO 3166-1-Alpha-2 code representing the country API to use.
    in: header
    name: apiCountryCode
    pattern: ^(GB|ES|IT)$
    required: false
    type: string
    x-eg: ES
  param_apiKey:
    description: A unique identifier of your application that is generated by the API portal.
    in: header
    name: apiKey
    pattern: ^[a-zA-Z0-9]{19,50}$
    required: true
    type: string
    x-eg: l7xxa54460c573b5497c9b24b505xxxxxxxx
  param_apiSecret:
    description: Another unique identifier for your application.
    in: header
    name: apiSecret
    pattern: ^[a-zA-Z0-9]{19,50}$
    required: true
    type: string
    x-eg: 355b1e522c544222ab4ff318xxxxxxxx
  param_apiTicket:
    description: Ticket Granting Ticket obtained from a previous request
    in: header
    name: apiTicket
    pattern: ^[a-zA-Z][a-zA-Z0-9-]{39,100}$
    required: true
    type: string
    x-eg: TGT-1920-Cl7l4e0hzFWK9aoKeiggDexuWcmAMf9brh6IFpVdsQxxxxxxxx-brsux349
  param_exclude:
    collectionFormat: csv
    description: Specify fields from the default to exclude (Comma-Separated List)
    in: query
    items:
      type: string
    name: exclude
    required: false
    type: array
    x-eg: expiryDateTime
  param_fields:
    collectionFormat: csv
    description: Specify an absolute field list to return (Comma-Separated List)
    in: query
    items:
      type: string
    name: fields
    required: false
    type: array
    x-eg: extended
  param_fromDateTime:
    description: The FROM datetime from payments to be returned. (yyyy-MM-ddTHH:mm:ss)
    in: query
    name: dateFrom
    pattern: ^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})$
    type: string
    x-eg: 2013-09-25T13:34:20+01:00
  param_include:
    collectionFormat: csv
    description: Specify fields in addition to the default to return (Comma-Separated List)
    in: query
    items:
      type: string
    name: include
    required: false
    type: array
    x-eg: extended
  param_languageAsPerTerritory:
    default: true
    description: Defines response field name language, true (default) returns in language defined by territory, false returns in English
    in: query
    name: languageAsPerTerritory
    pattern: ^(true|false)$
    required: false
    type: string
    x-eg: false
  param_oldPhoneNumber:
    description: Old phone number to replace
    in: path
    name: oldPhoneNumber
    required: true
    type: string
    x-eg: "+447870818838"
  param_page:
    default: 1
    description: The page number to return (Used with pageSize)
    in: query
    name: page
    pattern: ^[1-9]{1,7}$
    type: number
    x-eg: 10
  param_pageSize:
    default: 100
    description: Specify the number of results to return per page.
    in: query
    name: pageSize
    pattern: ^[1-9]{1,7}$
    type: number
    x-eg: 15
  param_sort:
    default: date,asc
    description: The order the response will be retuned by. i.e. date,desc
    in: query
    name: sort
    required: false
    type: string
    x-eg: date,desc
  param_territory:
    description: Territory from which request originates
    in: header
    name: territory
    pattern: ^(COM|ES|IT)$
    required: false
    type: string
    x-eg: ES
  param_toDateTime:
    description: The TO datetime for payments to be returned. (yyyy-MM-ddTHH:mm:ss)
    in: query
    name: dateTo
    pattern: ^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})\:(\d{2})$
    type: string
    x-eg: 2013-09-25T13:34:20+01:00
  param_transactionFilter:
    description: Allows the user to select with they want to see withdrawls or deposits. If it is omitted from the query both types will be returned
    in: query
    name: transactionType
    pattern: ^(W|D)$
    required: false
    type: string
    x-eg: W
paths:
  /account:
    get:
      description: Retrieves a limited set of customer account details. For security purposes, only a subset is supplied, which does not include fields such as security questions and answers. argFileDR1.properties argFileDR2.properties argFileGIB1.properties argFileGIB2.properties argFileGIB3.properties argFileGIB4.properties argFilePP1.properties argFilePP2.properties argFilePP3.properties argFile.properties argFilePT1.properties argFilePTE.properties argFileSCC1.properties argFileSCC2.properties argFileSCC3.properties argFileSTG.properties argFileSYS.properties CWP GatewayMigrationUtility-1.4.00-85 GatewayMigrationUtility.jar GatewayMigrationUtility.sh gmu.log inputFile.xml lib logs migratePolicy.sh migratev2CWP.sh migratev2Policy.sh retrieveCWP.sh retrievePolicy.sh updateCWP.sh updatePolicyById.sh updatePolicy.sh returned by default, others need to be selected. argFileDR1.properties argFileDR2.properties argFileGIB1.properties argFileGIB2.properties argFileGIB3.properties argFileGIB4.properties argFilePP1.properties argFilePP2.properties argFilePP3.properties argFile.properties argFilePT1.properties argFilePTE.properties argFileSCC1.properties argFileSCC2.properties argFileSCC3.properties argFileSTG.properties argFileSYS.properties CWP GatewayMigrationUtility-1.4.00-85 GatewayMigrationUtility.jar GatewayMigrationUtility.sh gmu.log inputFile.xml lib logs migratePolicy.sh migratev2CWP.sh migratev2Policy.sh retrieveCWP.sh retrievePolicy.sh updateCWP.sh updatePolicyById.sh updatePolicy.sh returned by default only in italian region.
      operationId: getDetails
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_territory"
        - $ref: "#/parameters/param_languageAsPerTerritory"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "status*": "A",
               "userName": "wallet1",
               "accountNum*": "78041SJ",
               "accountId": "1653",
               "accountType": "DEP",
               "creationDate": "2016-06-28 10:50:27",
               "lastLogin": "2019-09-06 15:54:29",
               "countryCode": "UK",
               "title": "Prof",
               "firstName*": "Wha",
               "lastName*": "Pee",
               "secondLastName*": "Smith",
               "ipAddress": "10.211.33.1",
               "street1": "1",
               "street2": "Test",
               "county": "Gloucestershire",
               "city": "Leeds",
               "postcode": "LS1 1AA",
               "country": "United Kingdom",
               "email": "wallet1@wh2.com",
               "mobile": "07710100100",
               "telephone": "01131001000",
               "language": "en",
               "timeZone": "Europe/London",
               "nif**": "HMCQVC89T28M347J",
               "lastLogin**": "2020-03-10 06:44:09",
               "termsAndConditions":[
               {
               "name": "PlaytechCasIta",
               "url": "http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7320 http://whdn.williamhill.com/content/content/Contratto.pdf http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7113"
               },
               {
               "name": "PlaytechCasIta",
               "url": "http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7320 http://whdn.williamhill.com/content/content/Contratto.pdf http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7113"
               },
               {
               "name": "PlaytechCasIta",
               "url": "http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7320 http://whdn.williamhill.com/content/content/Contratto.pdf http://williamhill-it.custhelp.com/cgi-bin/williamhill_it.cfg/php/enduser/std_adp.php?p_faqid=7113"
               }
               ],
               "birthPlace":{
               "city": "Roma",
               "province": "RM",
               "countryCode": ""
               },
               "additionalSystemStatuses":{
               "system": "cnj",
               "estado": "OK"
               },
               "partnerContactable": true,
               "contactable": true,
               "flags": [
               {
               "pocf": true
               }
               ]
              }
          schema:
            $ref: "#/definitions/accounts"
        "401":
          description: Not Authorized
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Retrieves details of a customers account
      tags:
        - Accounts
      x-canReturnErrors:
        - 20401
  /account/balance:
    get:
      description: This method can be used to retrieve the customer’s account balance in UK Sterling.
      operationId: getBalance
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_territory"
        - $ref: "#/parameters/param_languageAsPerTerritory"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "currencyCode": "GBP",
               "balance": 234.23,
               "availableFunds": 234.23,
               "withdrawableFunds": 234.23
              }
          schema:
            $ref: "#/definitions/accountBalance"
        "401":
          description: Not Authorized
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Get a customers account balance
      tags:
        - Accounts
  /account/flags:
    post:
      description: Sets a flag based on name to value provided for the user.
      operationId: setAccountFlags
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_apiCountryCode"
        - $ref: "#/parameters/param_territory"
        - $ref: "#/parameters/param_languageAsPerTerritory"
        - description: Array of KVP for setting flags.
          in: body
          name: flags
          required: true
          schema:
            $ref: "#/definitions/flags"
      responses:
        "200":
          description: Success
          examples:
            application/json: |
              {
               "token": "e0dX/YhYaRax7aI0/SkNS9G1rXlZZWOD64t64JDijaCfEhRe0A=="
              }
          schema:
            $ref: "#/definitions/accountFlagsSet"
        "404":
          description: No such customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Sets a flag based on name to value provided for the user.
      tags:
        - flags
      x-canReturnErrors:
        - 0
  /account/payments:
    get:
      description: Retrieves the customer’s account payments in UK Sterling.
      operationId: getPayments
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_page"
        - $ref: "#/parameters/param_pageSize"
        - $ref: "#/parameters/param_fromDateTime"
        - $ref: "#/parameters/param_toDateTime"
        - $ref: "#/parameters/param_sort"
        - $ref: "#/parameters/param_transactionFilter"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
        - $ref: "#/parameters/param_territory"
        - $ref: "#/parameters/param_languageAsPerTerritory"
      responses:
        "200":
          description: Success - Payments obtained
          examples:
            application/json: |
              {
               "payments":
               [
               {
               "id": "277",
               "methodId": "111",
               "type": "CSH",
               "action": "D",
               "paymentDateTime": "2013-09-25T13:34:20",
               "amount": "20.56",
               "commission": "0.00",
               "status": "Y",
               "channel": "M",
               "ipAddress": "10.0.0.12"
               } 
               ]
              }
          schema:
            $ref: "#/definitions/getPayments"
        "400":
          description: Errors
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Gets a customer's account payments
      tags:
        - Accounts
      x-canReturnErrors:
        - 20401
  /account/plusCard:
    get:
      description: Gets a customer's plus card details if they exist.
      operationId: getPlusCardDetails
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_fields"
        - $ref: "#/parameters/param_include"
        - $ref: "#/parameters/param_exclude"
      responses:
        "200":
          description: Success - Plus Card Details
          examples:
            application/json: |
              {
               "card":
               {
               "blocked": false,
               "cardNumber": "1234123412341234"
               },
               "phone":
               {
               "phoneNumber": "09876543210"
               },
               "pin":
               {
               "blocked": false,
               "attemptsRemaining": 2
               },
               "onlineAccount":
               {
               "onlineAccountNumber": "DF412323",
               "name": "George Bernard Shaw"
               }
               "retailAccount": 
               {
               "selfExcluded": true
               }
              }
          schema:
            $ref: "#/definitions/plusCardDetails"
        "401":
          description: Unauthorized
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "403":
          description: Forbidden
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such plus card customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Gets a customer's plus card details if they exist.
      tags:
        - Plus Card
        - Omni
        - Wallet
        - Card Number
      x-canReturnErrors:
        - 20401
  /account/plusCard/lostStolen:
    post:
      description: Sets a customer's plus card as Lost/Stolen
      operationId: setLostStolen
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
      responses:
        "204":
          description: Success - Card Reported Lost / Stolen
        "401":
          description: Errors
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Unauthorised"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such plus card customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Sets a customer's plus card as Lost/Stolen
      tags:
        - Plus Card
        - Omni
        - Wallet
        - Card Number
        - Lost
        - Stolen
      x-canReturnErrors:
        - 20401
  "/account/plusCard/phone/{oldPhoneNumber}":
    post:
      description: Sets a customer's plus card phone number
      operationId: setPhoneNumber
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - $ref: "#/parameters/param_oldPhoneNumber"
        - description: Phone Number to be set.
          in: body
          name: phoneNumber
          required: true
          schema:
            $ref: "#/definitions/phone"
      responses:
        "201":
          description: Success - New Phone number Created
        "401":
          description: Unauthorized
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "403":
          description: Forbidden
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such plus card customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Sets a customer's plus card phone number
      tags:
        - Plus Card
        - Omni
        - Wallet
        - Card Number
        - Phone
      x-canReturnErrors:
        - 20401
  /account/plusCard/pin:
    post:
      description: Sets a customer's plus card pin
      operationId: setPin
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - description: PIN to be set.
          in: body
          name: pin
          required: true
          schema:
            $ref: "#/definitions/pin"
      responses:
        "201":
          description: Success - PIN Created
        "400":
          description: Errors
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such plus card customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Sets a customer's plus card pin
      tags:
        - Plus Card
        - Omni
        - Wallet
        - Card Number
        - PIN
      x-canReturnErrors:
        - 20401
    put:
      description: Updates a customer's plus card pin
      operationId: updatePin
      parameters:
        - $ref: "#/parameters/param_apiKey"
        - $ref: "#/parameters/param_apiSecret"
        - $ref: "#/parameters/param_apiTicket"
        - description: PIN to be set.
          in: body
          name: pin
          required: true
          schema:
            $ref: "#/definitions/pin"
      responses:
        "204":
          description: Success - PIN Updated
        "400":
          description: Errors
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"000000",
               "message":"Error Message Text",
               "field":"aparam"
               }
               ]
              } 
          schema:
            $ref: "#/definitions/accountErrors"
        "404":
          description: No such plus card customer
          examples:
            application/json: |
              {
               "errors" : [
               {
               "code":"10003",
               "message":"Resource Not Found",
               "field":"token"
               }
               ]
              }
          schema:
            $ref: "#/definitions/accountErrors"
      summary: Updates a customer's plus card pin
      tags:
        - Plus Card
        - Omni
        - Wallet
        - Card Number
        - PIN
      x-canReturnErrors:
        - 20401
definitions:
  accountBalance:
    properties:
      availableFunds:
        description: Current available funds in this account
        pattern: ([0-9]*.[0-9]{2})
        type: number
      balance:
        description: Current balance of account
        pattern: ([0-9]*.[0-9]{2})
        type: number
      currencyCode:
        description: A three-character ISO4217 currency code. This will be the currency that the user registered in
        type: string
      withdrawableFunds:
        description: Current withdrawable balance of this account
        pattern: ([0-9]*.[0-9]{2})
        type: number
    required:
      - balance
      - currencyCode
    type: object
  accountErrors:
    properties:
      errors:
        items:
          $ref: "#/definitions/error"
        type: array
    type: object
  accountFlagsSet:
    properties:
      token:
        type: string
    type: object
  accounts:
    properties:
      accountId:
        description: Account ID
        type: string
      accountNum:
        description: Account number
        type: string
      additionalSystemStatuses:
        description: Statuses of systems specific to that account - seperate from account status
        type: string
      birthPlace:
        description: Birthplace details (city, province country code) for customer - primaly used in italy
        type: string
      city:
        description: The city of the customer's address
        type: string
      contactable:
        description: Is it okay for the bookmaker to contact the customer with marketing information
        type: boolean
      country:
        description: The country of the customer's address
        type: string
      countryCode:
        description: A two-character ISO 3166-1-Alpha-2 code representing the customer's country of registration
        type: string
      county:
        description: The county of the customer's address
        type: string
      currencyCode:
        description: A three-character ISO4217 currency code. This will be the currency that the customer registered in
        type: string
      customerId:
        description: Customer ID
        type: string
      email:
        description: The primary email address of the customer with that account. Must be unique.
        type: string
      fax:
        description: The fax number of the customer
        type: string
      firstName:
        description: The first name of the customer with that account
        type: string
      flags:
        $ref: "#/definitions/flags"
      ipAddress:
        description: Registered ip address of user
        type: string
      language:
        description: The registered language of the customer
        type: string
      lastLogin:
        description: The last time customer logged in - mandatory in italy - available if populated in other territories
        type: string
      lastName:
        description: The last name of the customer with that account
        type: string
      mobile:
        description: The mobile number of the customer with that account
        type: string
      nif:
        description: The national identifcation number of the customer (italy only - mandatory response field)
        type: string
      office:
        description: Office phone number of customer
        type: string
      partnerContactable:
        description: Is it okay for the bookmaker to give the user's contact details to companies with which it has partnerships
        type: boolean
      postcode:
        description: The postCode of the customer's address
        type: string
      secondLastName:
        description: The second last name of the customer with that account - primarily used in Spanish territory
        type: string
      status:
        description: Account status
        type: string
      street1:
        description: Line number 1 of the customer's street address written out in full
        type: string
      street2:
        description: Line number 2 of the customer's street address written out in full
        type: string
      street3:
        description: Line number 3 of the customer's street address written out in full
        type: string
      terms and conditions:
        description: name and url location of terms and conditions applicable to this account
        type: string
      timeZone:
        description: The primary time zone for the customer
        type: string
      title:
        description: The title of the name of the customer with that account
        type: string
    required:
      - status
      - accountNum
      - firstName
      - lastName
      - secondLastName
      - nif (italy only)
      - lastLogin (default in Italy only)
    type: object
  error:
    properties:
      code:
        description: A unique William Hill identifier for the error
        type: string
      field:
        description: To help pinpoint the exact parameter where a request has failed
        type: string
      message:
        description: A unique William Hill text string to enable you to identify the error (in English only)
        type: string
    type: object
  flags:
    items:
      properties:
        flagName:
          description: Name of the flag to set.
          type: string
        flagReason:
          description: The reason that the flag has been set.
          type: string
        flagValue:
          description: Value to set the flag to.
          type: string
      required:
        - flagName
        - flagValue
      type: object
    type: array
  getPayments:
    properties:
      payments:
        items:
          $ref: "#/definitions/payment"
        type: array
    type: object
  onlineAccount:
    description: Online Account
    properties:
      name:
        type: string
        x-eg: George Bernard Shaw
      onlineAccountNumber:
        type: string
        x-eg: DF412323
    type: object
  payment:
    properties:
      action:
        description: Action of the payment (D = Deposit, W = withdrawal)
        pattern: (D|W)
        type: string
      amount:
        description: The amount of the payment
        pattern: ([0-9]*.[0-9]{2})
        type: number
      channel:
        description: The channel through which the payment was made
        type: string
      commision:
        description: The commision for the payment
        pattern: ([0-9]*.[0-9]{2})
        type: number
      id:
        description: ID of the payment
        type: string
      ipAddress:
        description: The IP address from which the payment was made
        type: string
      methodId:
        description: ID of the payment method
        type: string
      paymentDateTime:
        description: The date and time when the payment was made
        type: string
      status:
        description: The status of the payment
        type: string
      type:
        description: Type of the payment
        pattern: ([A-Za-z]*)
        type: string
    required:
      - id
      - action
      - paymentDateTime
      - amount
      - status
    type: object
  phone:
    description: Phone Number
    properties:
      phoneNumber:
        type: string
        x-eg: "09876543210"
    type: object
  pin:
    pattern: "[0-9]{4}"
    type: number
    x-eg: 1234
  pinStatus:
    description: PIN object - if this object is not returned in plusCardDetails object then it has not been set.
    properties:
      attemptsRemaining:
        type: number
      blocked:
        type: boolean
    type: object
  plusCard:
    description: Plus Card
    properties:
      blocked:
        type: boolean
      cardNumber:
        type: string
    type: object
  plusCardDetails:
    description: Plus Card Details and linked accounts
    properties:
      card:
        $ref: "#/definitions/plusCard"
      onlineAccount:
        $ref: "#/definitions/onlineAccount"
      phone:
        $ref: "#/definitions/phone"
      pin:
        $ref: "#/definitions/pinStatus"
      retailAccount:
        $ref: "#/definitions/retailAccount"
    type: object
  retailAccount:
    description: Retail Account
    properties:
      selfExcluded:
        type: boolean
    type: object
x-customerrors:
  - code: 20401
    message: Account details are not available for temporary accounts
    status: 400
  - code: 20402
    message: Account status not available
    status: 404
x-docchapters:
  - fieldSelection
  - apiSummary
  - headAndOptions
  - docsAndSdks
  - errorHandling
  - statusCodes
x-globalerrors: null
