> ## Documentation Index
> Fetch the complete documentation index at: https://holder.docs.fiskil.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Agreed Payment Schedule

> Obtain the agreed payment schedule and details, if any, for a specific energy account.
Some general notes about this end point:
  * This API describes how the consumer has elected to pay for their account
  * Payments initiated by the consumer are classified as manual payments. The billing frequency is captured for manual payments. The consumer may choose to pay on a different schedule/frequency. The payment method and frequency is not captured for manual payments
  * Payments that can be initiated by the retailer, based on a consumer's preferences and permission, include payments based on a direct debit, card debit or digital wallet setup. Each of these requires a payment frequency to be provided along with other relevant fields
  * Information about payment plans related to debt repayments or arrangements due to hardship is not captured within this API




## OpenAPI

````yaml /openapi/cdr.yml get /v1/energy/customer/{customerId}/accounts/{accountId}/payment-schedule
openapi: 3.0.3
info:
  description: Fiskil Data Holder as a Service (DHaaS) endpoints for the Energy sector
  title: Fiskil Data APIs
  version: 1.5.0
servers:
  - url: https://api.provider.fiskil.com
security:
  - bearerAuth: []
paths:
  /v1/energy/customer/{customerId}/accounts/{accountId}/payment-schedule:
    get:
      tags:
        - Energy
        - Payment Schedule
      summary: Get Agreed Payment Schedule
      description: >
        Obtain the agreed payment schedule and details, if any, for a specific
        energy account.

        Some general notes about this end point:
          * This API describes how the consumer has elected to pay for their account
          * Payments initiated by the consumer are classified as manual payments. The billing frequency is captured for manual payments. The consumer may choose to pay on a different schedule/frequency. The payment method and frequency is not captured for manual payments
          * Payments that can be initiated by the retailer, based on a consumer's preferences and permission, include payments based on a direct debit, card debit or digital wallet setup. Each of these requires a payment frequency to be provided along with other relevant fields
          * Information about payment plans related to debt repayments or arrangements due to hardship is not captured within this API
      operationId: getPaymentSchedule
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/accountId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnergyPaymentScheduleResponse'
          description: The customer's payment schedule
        '404':
          $ref: '#/components/responses/responseErrorCustomerIdNotFound'
components:
  parameters:
    customerId:
      description: >-
        Unique ID of a customer. This ID must not change for the lifecycle of
        the customer
      explode: false
      in: path
      name: customerId
      required: true
      schema:
        type: string
      style: simple
    accountId:
      description: ID of a specific account to obtain data for.
      explode: false
      in: path
      name: accountId
      required: true
      schema:
        type: string
      style: simple
  schemas:
    EnergyPaymentScheduleResponse:
      example:
        data:
          paymentSchedules:
            - directDebit:
                bsb: '111222'
                calculationType: BALANCE
                accountNumber: '12345678'
                paymentFrequency: P3M
                isTokenised: false
              paymentScheduleUType: directDebit
      properties:
        data:
          $ref: '#/components/schemas/EnergyPaymentScheduleResponse_data'
      required:
        - data
      type: object
    EnergyPaymentScheduleResponse_data:
      properties:
        paymentSchedules:
          description: Array may be empty if no payment schedule exist
          items:
            $ref: '#/components/schemas/EnergyPaymentSchedule'
          type: array
      required:
        - paymentSchedules
      type: object
    GenericError:
      example:
        error: An error message
      type: object
      properties:
        error:
          type: string
          description: A message describing what caused the error
      required:
        - error
    EnergyPaymentSchedule:
      properties:
        amount:
          description: >-
            Optional payment amount indicating that a constant payment amount is
            scheduled to be paid (used in bill smoothing scenarios)
          type: string
          x-cds-type: AmountString
        paymentScheduleUType:
          description: The type of object present in this response
          enum:
            - cardDebit
            - directDebit
            - manualPayment
            - digitalWallet
          type: string
        cardDebit:
          $ref: '#/components/schemas/EnergyPaymentSchedule_cardDebit'
        directDebit:
          $ref: '#/components/schemas/EnergyPaymentSchedule_directDebit'
        digitalWallet:
          $ref: '#/components/schemas/EnergyPaymentSchedule_digitalWallet'
        manualPayment:
          $ref: '#/components/schemas/EnergyPaymentSchedule_manualPayment'
      required:
        - paymentScheduleUType
      type: object
      x-conditional:
        - cardDebit
        - directDebit
        - manualPayment
        - digitalWallet
    EnergyPaymentSchedule_cardDebit:
      description: >-
        Represents a regular credit card payment schedule. Mandatory if
        paymentScheduleUType is set to cardDebit
      example:
        calculationType: STATIC
        cardScheme: VISA
        paymentFrequency: paymentFrequency
      properties:
        cardScheme:
          description: The type of credit card held on file
          enum:
            - VISA
            - MASTERCARD
            - AMEX
            - DINERS
            - OTHER
            - UNKNOWN
          type: string
        paymentFrequency:
          description: >-
            The frequency that payments will occur.  Formatted according to [ISO
            8601 Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations)
            (excludes recurrence syntax)
          type: string
          x-cds-type: ExternalRef
        calculationType:
          description: >-
            The mechanism by which the payment amount is calculated. 
            Explanation of values are as follows:<br/><ul><li>**STATIC** -
            Indicates a consistent, static amount, per
            payment</li><li>**BALANCE** - Indicates that the outstanding balance
            for the account is paid per period</li><li>**CALCULATED** -
            Indicates that the payment amount is variable and calculated using a
            pre-defined algorithm</li></ul>
          enum:
            - STATIC
            - BALANCE
            - CALCULATED
          type: string
      required:
        - calculationType
        - cardScheme
        - paymentFrequency
      type: object
    EnergyPaymentSchedule_directDebit:
      description: >-
        Represents a regular direct debit from a specified bank account.
        Mandatory if paymentScheduleUType is set to directDebit
      example:
        bsb: '111222'
        calculationType: BALANCE
        accountNumber: '12345678'
        paymentFrequency: P3M
      properties:
        isTokenised:
          description: >-
            Flag indicating that the account details are tokenised, or held in a
            closed system, and is not accessible through any other channels.
            False if absent
          type: boolean
        bsb:
          description: >-
            The unmasked BSB for the account to be debited. Is expected to be
            formatted as digits only with leading zeros included and no
            punctuation or spaces.  Is required if isTokenised is absent or
            false
          type: string
        accountNumber:
          description: >-
            The unmasked account number for the account to be debited. Is
            expected to be formatted as digits only with leading zeros included
            and no punctuation or spaces.  Is required if isTokenised is absent
            or false
          type: string
        paymentFrequency:
          description: >-
            The frequency that payments will occur.  Formatted according to [ISO
            8601 Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations)
            (excludes recurrence syntax)
          type: string
          x-cds-type: ExternalRef
        calculationType:
          description: >-
            The mechanism by which the payment amount is calculated. 
            Explanation of values are as follows:<br/><ul><li>**STATIC** -
            Indicates a consistent, static amount, per
            payment</li><li>**BALANCE** - Indicates that the outstanding balance
            for the account is paid per period</li><li>**CALCULATED** -
            Indicates that the payment amount is variable and calculated using a
            pre-defined algorithm</li></ul>
          enum:
            - STATIC
            - BALANCE
            - CALCULATED
          type: string
      required:
        - calculationType
        - paymentFrequency
      type: object
      x-conditional:
        - bsb
        - accountNumber
    EnergyPaymentSchedule_digitalWallet:
      description: >-
        Represents a regular payment from a digital wallet. Mandatory if
        paymentScheduleUType is set to digitalWallet
      example:
        calculationType: STATIC
        identifier: hello@example.com
        provider: PAYPAL_AU
        name: P Sherman
        type: EMAIL
        paymentFrequency: P1M
      properties:
        name:
          description: >-
            The display name of the wallet as given by the customer, else a
            default value defined by the data holder
          type: string
        identifier:
          description: The identifier of the digital wallet (dependent on type)
          type: string
        type:
          description: The type of the digital wallet identifier
          enum:
            - EMAIL
            - CONTACT_NAME
            - TELEPHONE
          type: string
        provider:
          description: The provider of the digital wallet
          enum:
            - PAYPAL_AU
            - OTHER
          type: string
        paymentFrequency:
          description: >-
            The frequency that payments will occur.  Formatted according to [ISO
            8601 Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations)
            (excludes recurrence syntax)
          type: string
          x-cds-type: ExternalRef
        calculationType:
          description: >-
            The mechanism by which the payment amount is calculated. 
            Explanation of values are as follows:<br/><ul><li>**STATIC** -
            Indicates a consistent, static amount, per
            payment</li><li>**BALANCE** - Indicates that the outstanding balance
            for the account is paid per period</li><li>**CALCULATED** -
            Indicates that the payment amount is variable and calculated using a
            pre-defined algorithm</li></ul>
          enum:
            - STATIC
            - BALANCE
            - CALCULATED
          type: string
      required:
        - calculationType
        - identifier
        - name
        - paymentFrequency
        - provider
        - type
      type: object
    EnergyPaymentSchedule_manualPayment:
      description: >-
        Represents a manual payment schedule where the customer pays in response
        to a delivered statement. Mandatory if paymentScheduleUType is set to
        manualPayment
      example:
        billFrequency: P3M
      properties:
        billFrequency:
          description: >-
            The frequency with which a bill will be issued.  Formatted according
            to [ISO 8601
            Durations](https://en.wikipedia.org/wiki/ISO_8601#Durations)
            (excludes recurrence syntax)
          type: string
          x-cds-type: ExternalRef
      required:
        - billFrequency
      type: object
  responses:
    responseErrorCustomerIdNotFound:
      description: The customer ID in the URL path is invalid or not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericError'
            example:
              error: Customer not found
  securitySchemes:
    bearerAuth:
      description: >
        The Fiskil Data Provider will include a self-signed JWT as a Bearer
        token in the `Authorization` header.

        You should verify this JWT using the JWKS URL you can find for your Data
        Provider instance in the Fiskil

        Console. To verify the JWT you **must**:
          * Verify the signature
          * Ensure the token has not expired by checking the `exp` claim
          * The `sub` and `iss` claims are your data provider subdomain
          * The `aud` claim is the URI of the resource being requested (excluding any query parameters)
          * The `jti` value is unique
        For further detail on security and authentication refer to our
        [Authentication](/docs/get-started/authentication) documentation
      type: http
      scheme: bearer
      bearerFormat: JWT

````