AppDirect Payment API

The Payment API from AppDirect — 5 operation(s) for payment.

OpenAPI Specification

appdirect-payment-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed Payment API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Payment
  x-displayName: Payments v1
paths:
  /billing/v1/companies/{companyId}/payments:
    get:
      description: List all of  the payments for the given company
      tags:
      - Payment
      summary: List all payments for a company
      operationId: resource_Other_readCompanyPayments_GET
      parameters:
      - description: Company UUID
        name: companyId
        in: path
        required: true
        schema:
          type: string
      - description: Number of results to fetch. Used for paging.
        name: count
        in: query
        schema:
          type: integer
          default: 250
      - description: From date
        name: fromDate
        in: query
        schema:
          type: number
      - description: Payment method
        name: method
        in: query
        schema:
          type: string
          enum:
          - ADP_INVOICE
          - ARIBAPAY
          - BT_BILL
          - CLICKANDBUY
          - CLOUDFOUNDRY
          - CREDIT_CARD
          - CUMULA_BILL
          - DTAG
          - EXTERNAL_INVOICE
          - KREDITKARTE
          - LASTSCHRIFT_MRNEXNET
          - MANO_TEO_BILL
          - MANUAL
          - MARKETPLACE_CREDITS
          - NETS_ARVATO_INVOICE
          - NEXTEL
          - PAYPAL
          - ROGERS_CC_DTMF
          - ROGERS_CC_POS
          - SNAP
          - TBILL
          - THISTLE
          - TOICLEARING
      - description: Payment result
        name: result
        in: query
        schema:
          type: string
          enum:
          - FAILED
          - GATEWAY_NOT_AVAILABLE
          - MANUAL
          - SUCCESSFUL
      - description: Sort field
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - AMOUNT
          - DATE
          - PAYMENT_ID
          default: PAYMENT_ID
      - description: Sort order
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: DESC
      - description: First result index. Used for paging.
        name: start
        in: query
        schema:
          type: integer
          default: 0
      - description: To date
        name: toDate
        in: query
        schema:
          type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
              examples:
                response:
                  value:
                  - paymentNumber: 21
                    date: 1481002410613
                    amount: 10
                    currency: USD
                    result: SUCCESSFUL
                    method: CREDIT_CARD
                    transactionId: 123456abcdef
                    user:
                      id: a18c91e8-d5d5-4fb8-915c-726535a0bc8a
                      href: http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
                    company:
                      id: 644eb32e-4afa-4699-9dae-5d3394320968
                      href: http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968
                    gatewayResponse:
                      avs: true
                      cvv: true
                      code: null
                      message: null
                    links:
                    - rel: self
                      href: http://appdirect/api/billing/v1/payments/21
            application/xml:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
        '404':
          description: Not Found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/payments?count=SOME_INTEGER_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&toDate=SOME_NUMBER_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/payments',\n  qs: {\n    count: 'SOME_INTEGER_VALUE',\n    fromDate: 'SOME_NUMBER_VALUE',\n    method: 'SOME_STRING_VALUE',\n    result: 'SOME_STRING_VALUE',\n    sortField: 'SOME_STRING_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    start: 'SOME_INTEGER_VALUE',\n    toDate: 'SOME_NUMBER_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/payments?count=SOME_INTEGER_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&toDate=SOME_NUMBER_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /billing/v1/companies/{companyId}/users/{userId}/payments:
    get:
      description: List all of the payments for the given user
      tags:
      - Payment
      summary: List all payments for a user
      operationId: resource_Other_readUserPayments_GET
      parameters:
      - description: Company UUID
        name: companyId
        in: path
        required: true
        schema:
          type: string
      - description: User UUID
        name: userId
        in: path
        required: true
        schema:
          type: string
      - description: Number of results to fetch. Used for paging.
        name: count
        in: query
        schema:
          type: integer
          default: 250
      - description: From date
        name: fromDate
        in: query
        schema:
          type: number
      - description: Payment method
        name: method
        in: query
        schema:
          type: string
          enum:
          - ADP_INVOICE
          - ARIBAPAY
          - BT_BILL
          - CLICKANDBUY
          - CLOUDFOUNDRY
          - CREDIT_CARD
          - CUMULA_BILL
          - DTAG
          - EXTERNAL_INVOICE
          - KREDITKARTE
          - LASTSCHRIFT_MRNEXNET
          - MANO_TEO_BILL
          - MANUAL
          - MARKETPLACE_CREDITS
          - NETS_ARVATO_INVOICE
          - NEXTEL
          - PAYPAL
          - ROGERS_CC_DTMF
          - ROGERS_CC_POS
          - SNAP
          - TBILL
          - THISTLE
          - TOICLEARING
      - description: Payment result
        name: result
        in: query
        schema:
          type: string
          enum:
          - FAILED
          - GATEWAY_NOT_AVAILABLE
          - MANUAL
          - SUCCESSFUL
      - description: Sort field
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - AMOUNT
          - DATE
          - PAYMENT_ID
          default: PAYMENT_ID
      - description: Sort order
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: ASC
      - description: First result index. Used for paging.
        name: start
        in: query
        schema:
          type: integer
          default: 0
      - description: To date
        name: toDate
        in: query
        schema:
          type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
              examples:
                response:
                  value:
                  - paymentNumber: 21
                    date: 1481002410613
                    amount: 10
                    currency: USD
                    result: SUCCESSFUL
                    method: CREDIT_CARD
                    transactionId: 123456abcdef
                    user:
                      id: a18c91e8-d5d5-4fb8-915c-726535a0bc8a
                      href: http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a
                    company:
                      id: 644eb32e-4afa-4699-9dae-5d3394320968
                      href: http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968
                    gatewayResponse:
                      avs: true
                      cvv: true
                      code: null
                      message: null
                    links:
                    - rel: self
                      href: http://appdirect/api/billing/v1/payments/21
            application/xml:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
        '404':
          description: Not Found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/payments?count=SOME_INTEGER_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&toDate=SOME_NUMBER_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/payments',\n  qs: {\n    count: 'SOME_INTEGER_VALUE',\n    fromDate: 'SOME_NUMBER_VALUE',\n    method: 'SOME_STRING_VALUE',\n    result: 'SOME_STRING_VALUE',\n    sortField: 'SOME_STRING_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    start: 'SOME_INTEGER_VALUE',\n    toDate: 'SOME_NUMBER_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/payments?count=SOME_INTEGER_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE&toDate=SOME_NUMBER_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /billing/v1/payments:
    get:
      description: List all payments matching the input filters
      tags:
      - Payment
      summary: List all payments
      operationId: resource_Other_readPayments_GET
      parameters:
      - description: Number of results to fetch. Used for paging.
        name: count
        in: query
        schema:
          type: string
          default: '250'
      - description: From date
        name: fromDate
        in: query
        schema:
          type: number
      - description: Payment method
        name: method
        in: query
        schema:
          type: string
          enum:
          - ADP_INVOICE
          - ARIBAPAY
          - BT_BILL
          - CLICKANDBUY
          - CLOUDFOUNDRY
          - CREDIT_CARD
          - CUMULA_BILL
          - DTAG
          - EXTERNAL_INVOICE
          - KREDITKARTE
          - LASTSCHRIFT_MRNEXNET
          - MANO_TEO_BILL
          - MANUAL
          - MARKETPLACE_CREDITS
          - NETS_ARVATO_INVOICE
          - NEXTEL
          - PAYPAL
          - ROGERS_CC_DTMF
          - ROGERS_CC_POS
          - SNAP
          - TBILL
          - THISTLE
          - TOICLEARING
      - description: Payment result
        name: result
        in: query
        schema:
          type: string
          enum:
          - FAILED
          - GATEWAY_NOT_AVAILABLE
          - MANUAL
          - SUCCESSFUL
      - description: Sort field
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - AMOUNT
          - DATE
          - PAYMENT_ID
          default: PAYMENT_ID
      - description: Sort order
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: ASC
      - description: First result index. Used for paging.
        name: start
        in: query
        schema:
          type: string
          default: '0'
      - description: To date
        name: toDate
        in: query
        schema:
          type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
              examples:
                response:
                  value:
                  - paymentNumber: 1
                    date: 1480980392947
                    amount: 10
                    currency: USD
                    result: SUCCESSFUL
                    method: CREDIT_CARD
                    transactionId: null
                    user:
                      id: 46b7ee79-5cb4-4ccf-b6cb-5ec869c67ffc
                      href: http://appdirect/api/account/v1/users/46b7ee79-5cb4-4ccf-b6cb-5ec869c67ffc
                    company:
                      id: 13febe65-6774-4c99-aee4-85a57dab94e4
                      href: http://appdirect/api/account/v1/companies/13febe65-6774-4c99-aee4-85a57dab94e4
                    gatewayResponse:
                      avs: true
                      cvv: true
                      code: null
                      message: null
                    links:
                    - rel: self
                      href: http://appdirect/api/billing/v1/payments/1
            application/xml:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
        '204':
          description: No content
          content:
            application/json:
              schema:
                description: No content
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
              examples:
                response:
                  value:
                    amount: 12345
                    company:
                      href: '...'
                      id: '...'
                    currency: SEK
                    date: 12345
                    gatewayResponse:
                      avs: true
                      code: '...'
                      cvv: true
                      message: '...'
                    id: 12345
                    links:
                    - href: '...'
                      rel: '...'
                    - href: '...'
                      rel: '...'
                    method: TBILL
                    result: GATEWAY_NOT_AVAILABLE
                    transactionId: '...'
                    user:
                      href: '...'
                      id: '...'
            application/xml:
              schema:
                description: No content
                type: array
                items:
                  $ref: '#/components/schemas/PaymentWS'
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/billing/v1/payments?count=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/billing/v1/payments',\n  qs: {\n    count: 'SOME_STRING_VALUE',\n    fromDate: 'SOME_NUMBER_VALUE',\n    method: 'SOME_STRING_VALUE',\n    result: 'SOME_STRING_VALUE',\n    sortField: 'SOME_STRING_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    start: 'SOME_STRING_VALUE',\n    toDate: 'SOME_NUMBER_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/billing/v1/payments?count=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&method=SOME_STRING_VALUE&result=SOME_STRING_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /billing/v1/payments/{paymentNumber}:
    get:
      description: Retrieve a payment given its payment number
      tags:
      - Payment
      summary: Retrieve a payment
      operationId: resource_Other_readPayment_GET
      parameters:
      - description: Payment number
        name: paymentNumber
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentWS'
              examples:
                response:
                  value:
                    paymentNumber: 1
                    date: 1480980388022
                    amount: 10
                    currency: USD
                    result: SUCCESSFUL
                    method: CREDIT_CARD
                    transactionId: null
                    user:
                      id: 24cf38da-ca99-4ea6-ac63-ed7b310456bc
                      href: http://appdirect/api/account/v1/users/24cf38da-ca99-4ea6-ac63-ed7b310456bc
                    company:
                      id: a5e58cc5-1162-4066-9d07-2275d9759d4e
                      href: http://appdirect/api/account/v1/companies/a5e58cc5-1162-4066-9d07-2275d9759d4e
                    gatewayResponse:
                      avs: true
                      cvv: true
                      code: null
                      message: null
                    links: []
            application/xml:
              schema:
                $ref: '#/components/schemas/PaymentWS'
        '404':
          description: Not Found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D'\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
  /billing/v1/payments/{paymentNumber}/invoices:
    get:
      description: List all invoices attached to a given payment
      tags:
      - Payment
      summary: List all payment invoices
      operationId: resource_Other_readPaymentInvoices_GET
      parameters:
      - description: Payment number
        name: paymentNumber
        in: path
        required: true
        schema:
          type: integer
      - description: Number of results to fetch. Used for paging.
        name: count
        in: query
        schema:
          type: string
          default: '250'
      - description: Exclude free invoices
        name: excludeFree
        in: query
        schema:
          type: boolean
      - description: From date
        name: fromDate
        in: query
        schema:
          type: number
      - description: Sort field
        name: sortField
        in: query
        schema:
          type: string
          enum:
          - DATE
          - INVOICE_ID
          - TOTAL
          default: INVOICE_ID
      - description: Sort order
        name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: ASC
      - description: First result index. Used for paging.
        name: start
        in: query
        schema:
          type: string
          default: '0'
      - description: Status of the related invoice(s)
        name: status
        in: query
        schema:
          type: string
          enum:
          - CARRIED
          - PAID
          - UNPAID
          - VOIDED
      - description: To date
        name: toDate
        in: query
        schema:
          type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceListingWS'
              examples:
                response:
                  value:
                  - invoiceId: 1
                    referenceNumber: null
                    creationDate: null
                    dueDate: null
                    status: PAID
                    total: null
                    currency: USD
                    user:
                      id: 5e496e63-0ccd-42e1-a880-8c636619df7d
                      href: http://appdirect/api/account/v1/users/5e496e63-0ccd-42e1-a880-8c636619df7d
                    company:
                      id: 6a8921e7-6f15-4f36-9ab3-5663d67ba88f
                      href: http://appdirect/api/account/v1/companies/6a8921e7-6f15-4f36-9ab3-5663d67ba88f
                    links:
                    - rel: user
                      href: http://appdirect/api/account/v2/users/5e496e63-0ccd-42e1-a880-8c636619df7d
                    - rel: company
                      href: http://appdirect/api/account/v2/companies/6a8921e7-6f15-4f36-9ab3-5663d67ba88f
                    - rel: self
                      href: http://appdirect/api/billing/v1/invoices/1
            application/xml:
              schema:
                description: OK
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceListingWS'
        '204':
          description: No content
          content:
            application/json:
              schema:
                description: No content
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceListingWS'
            application/xml:
              schema:
                description: No content
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceListingWS'
        '404':
          description: Not Found
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D/invoices?count=SOME_STRING_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D/invoices',\n  qs: {\n    count: 'SOME_STRING_VALUE',\n    excludeFree: 'SOME_BOOLEAN_VALUE',\n    fromDate: 'SOME_NUMBER_VALUE',\n    sortField: 'SOME_STRING_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    start: 'SOME_STRING_VALUE',\n    status: 'SOME_STRING_VALUE',\n    toDate: 'SOME_NUMBER_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/billing/v1/payments/%7BpaymentNumber%7D/invoices?count=SOME_STRING_VALUE&excludeFree=SOME_BOOLEAN_VALUE&fromDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_STRING_VALUE&status=SOME_STRING_VALUE&toDate=SOME_NUMBER_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
components:
  schemas:
    GatewayResponseWS:
      type: object
      title: GatewayResponse
      properties:
        avs:
          description: True if address is validated.
          type: boolean
        code:
          description: Code.
          type: string
          nullable: true
        cvv:
          description: True if credit card is validated.
          type: boolean
        message:
          description: Message.
          type: string
          nullable: true
      example:
        avs: true
        code: '...'
        cvv: true
        message: '...'
    PaymentMethod:
      type: string
      description: The supported payment methods
      title: PaymentMethod
      enum:
      - CREDIT_CARD
      - PAYPAL
      - MANUAL
      - EXTERNAL_INVOICE
      - MARKETPLACE_CREDITS
    InvoiceStatus:
      type: string
      title: InvoiceStatus
      enum:
      - PAID
      - UNPAID
      - CARRIED
      - VOIDED
    InvoiceListingWS:
      allOf:
      - $ref: '#/components/schemas/ResourceSupport'
      - type: object
        title: InvoiceListing
        properties:
          company:
            $ref: '#/components/schemas/LinkWS'
          creationDate:
            description: Creation date for the invoice.
            type: number
            nullable: true
          orderIds:
            type: array
            description: Array of Order IDs
            items:
              type: string
          currency:
            $ref: '#/components/schemas/Currency'
          dueDate:
            description: Due date for the invoice.
            type: number
            nullable: true
          invoiceId:
            description: Invoice ID.
            type: number
            nullable: true
          referenceNumber:
            description: Reference number.
            type: string
            nullable: true
          status:
            $ref: '#/components/schemas/InvoiceStatus'
          total:
            description: Invoice total.
            type: number
            nullable: true
          user:
            $ref: '#/components/schemas/LinkWS'
        example:
          company:
            href: '...'
            id: '...'
          creationDate: 12345
          currency: DKK
          dueDate: 12345
          invoiceId: 12345
          links:
          - href: '...'
            rel: '...'
          - href: '...'
            rel: '...'
          referenceNumber: '...'
          status: PAID
          total: 12345
          user:
            href: '...'
            id: '...'
    LinkWS:
      type: object
      title: LinkWS
      properties:
        href:
          type: string
        id:
          type: string
      example:
        href: '...'
        id: '...'
      nullable: true
    Link:
      type: object
      title: Link
      properties:
        href:
          type: string
        rel:
          type: string
      example:
        href: '...'
        rel: '...'
      nullable: true
    PaymentWS:
      allOf:
      - $ref: '#/components/schemas/ResourceSupport'
      - type: object
        title: Payment
        properties:
          amount:
            description: Payment amount.
            type: number
            nullable: true
          company:
            $ref: '#/components/schemas/LinkWS'
          currency:
            $ref: '#/components/schemas/Currency'
          date:
            description: Payment date.
            type: number
            nullable: true
          gatewayResponse:
            $ref: '#/components/schemas/GatewayResponseWS'
          id:
            description: Payment number.
            type: number
            nullable: true
          method:
            $ref: '#/components/schemas/PaymentMethod'
          result:
            $ref: '#/components/schemas/PaymentResult'
          transactionId:
            description: Transaction ID.
            type: string
            nullable: true
          user:
            $ref: '#/components/schemas/LinkWS'
        example:
          amount: 12345
          company:
            href: '...'
            id: '...'
          currency: INR
          date: 12345
          gatewayResponse:
            avs: true
            code: '...'
            cvv: true
            message: '...'
          id: 12345
          links:
          - href: '...'
            rel: '...'
          - href: '...'
            rel: '...'
          method: PAYPAL
          result: GATEWAY_NOT_AVAILABLE
          transactionId: '...'
          user:
            href: '...'
            id: '...'
    ResourceSupport:
      type: object
      title: ResourceSupport
      description: Resource links
      properties:
        links:
          type: array
          description: Resource links
          items:
            $ref: '#/components/schemas/Link'
      example:
        links:
        - href: '...'
          rel: '...'
        - href: '...'
          rel: '...'
      nullable: true
    Currency:
      description: Supported currencies for the system
      type: string
      title: Currency
      enum:
      - USD
      - CAD
      - EUR
      - JPY
      - GBP
      - KRW
      - CHF
      - SEK
      - SGD
      - MYR
      - AUD
      - MXN
      - INR
      - BRL
      - DKK
      - NZD
      - NOK
      - ZAR
      - PHP
      - CNY
      - SAR
      - GTQ
      - IDR
      - ARS
      - COP
      - PEN
      default: USD
    PaymentResult:
      type: string
      title: PaymentResult
      enum:
      - SUCCESSFUL
      - FAILED
      - GATEWAY_NOT_AVAILABLE
      - MANUAL