openapi: 3.0.0
servers:
  - url: https://acc-manager-demo.vultsecurity.com
    description: Demo Environment
  - url: https://account-manager-prod.vultsecurity.com
    description: Production Environment
info:
  version: 1.34.83
  title: Account Management
  description: Account Management and Payments
components:
  schemas: {}
  parameters: {}
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth-demo.vultsecurity.dev/token
          scopes: {}
paths:
  /api/account/{profile_id}:
    get:
      tags:
        - Account
      summary: List accounts for a user
      description: List accounts for a user
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: number
            minimum: 1
          required: false
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
          required: false
          name: page_size
          in: query
      responses:
        '200':
          description: Ok
          headers:
            X-Total-Count:
              schema:
                type: number
              required: true
            X-Current-Page:
              schema:
                type: number
              required: true
            X-Total-Pages:
              schema:
                type: number
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  accounts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        nickname:
                          type: string
                        institution_id:
                          type: string
                        institution_name:
                          type: string
                        institution_logo:
                          type: string
                        status_e:
                          type: string
                        rail_e:
                          type: string
                        current_balance_pennies:
                          type: number
                        available_balance_pennies:
                          type: number
                        last_four:
                          type: string
                        currency_e:
                          type: string
                        locked_at:
                          type:
                            - string
                            - 'null'
                        archived:
                          type: number
                        primary:
                          type: boolean
                      required:
                        - id
                        - name
                        - nickname
                        - institution_id
                        - institution_name
                        - institution_logo
                        - status_e
                        - rail_e
                        - current_balance_pennies
                        - available_balance_pennies
                        - last_four
                        - currency_e
                        - locked_at
                        - archived
                        - primary
                required:
                  - accounts
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/account/{profile_id}/{account_id}:
    get:
      tags:
        - Account
      summary: Get an account by id
      description: Get an account by id
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: string
          required: true
          name: account_id
          in: path
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  nickname:
                    type: string
                  institution_id:
                    type: string
                  institution_name:
                    type: string
                  institution_logo:
                    type: string
                  status_e:
                    type: string
                  rail_e:
                    type: string
                  current_balance_pennies:
                    type: number
                  available_balance_pennies:
                    type: number
                  last_four:
                    type: string
                  currency_e:
                    type: string
                  locked_at:
                    type:
                      - string
                      - 'null'
                  archived:
                    type: number
                  primary:
                    type: boolean
                required:
                  - id
                  - name
                  - nickname
                  - institution_id
                  - institution_name
                  - institution_logo
                  - status_e
                  - rail_e
                  - current_balance_pennies
                  - available_balance_pennies
                  - last_four
                  - currency_e
                  - locked_at
                  - archived
                  - primary
                description: '200'
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/invoice/{invoice_number}:
    get:
      tags:
        - Invoice
      summary: Retrieve an invoice by invoice number
      description: Retrieve an invoice by invoice number
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: invoice_number
          in: path
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  invoice_number:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  status_e:
                    type: string
                  total_amount_pennies:
                    type: number
                  tips_pennies:
                    type: number
                  amount_paid_pennies:
                    type: number
                  metadata:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                required:
                  - id
                  - invoice_number
                  - created_at
                  - updated_at
                  - status_e
                  - total_amount_pennies
                  - tips_pennies
                  - amount_paid_pennies
                description: '200'
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/invoice/:
    post:
      tags:
        - Invoice
      summary: Creates a new invoice to be paid
      description: Creates a new invoice to be paid
      security:
        - oauth2:
            - payments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payee_profile_id:
                  type: string
                due_date:
                  type:
                    - string
                    - 'null'
                total_amount_pennies:
                  type: number
                pay_in_full:
                  type: boolean
                metadata:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                idempotency_uuid:
                  type: string
              required:
                - payee_profile_id
                - total_amount_pennies
                - idempotency_uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice_id:
                    type: string
                required:
                  - invoice_id
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
  /api/invoice/{profile_id}/{invoice_id}:
    put:
      tags:
        - Invoice
      summary: Update an invoice
      description: Update an invoice
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: string
          required: true
          name: invoice_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                total_amount_pennies:
                  type: number
                pay_in_full:
                  type: boolean
                metadata:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties: {}
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
    get:
      tags:
        - Invoice
      summary: Retrieve an invoice
      description: Retrieve an invoice
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: string
          required: true
          name: invoice_id
          in: path
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  invoice_number:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  status_e:
                    type: string
                  total_amount_pennies:
                    type: number
                  tips_pennies:
                    type: number
                  amount_paid_pennies:
                    type: number
                  pay_in_full:
                    type: boolean
                  metadata:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                required:
                  - id
                  - invoice_number
                  - created_at
                  - updated_at
                  - status_e
                  - total_amount_pennies
                  - tips_pennies
                  - amount_paid_pennies
                  - pay_in_full
                description: '200'
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
    delete:
      tags:
        - Invoice
      summary: Cancel an invoice
      description: Cancel an invoice
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: string
          required: true
          name: invoice_id
          in: path
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties: {}
                description: '200'
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/invoice/{profile_id}:
    get:
      tags:
        - Invoice
      summary: List invoices
      description: List invoices
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: number
            minimum: 1
          required: false
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
          required: false
          name: page_size
          in: query
        - schema:
            type: string
          required: false
          name: transaction_id
          in: query
        - schema:
            type: string
          required: false
          name: search_term
          in: query
        - schema:
            type: string
          required: false
          name: start_date
          in: query
        - schema:
            type: string
          required: false
          name: end_date
          in: query
      responses:
        '200':
          description: Ok
          headers:
            X-Total-Count:
              schema:
                type: number
              required: true
            X-Current-Page:
              schema:
                type: number
              required: true
            X-Total-Pages:
              schema:
                type: number
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoices:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        invoice_number:
                          type: string
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        status_e:
                          type: string
                        total_amount_pennies:
                          type: number
                        tips_pennies:
                          type: number
                        amount_paid_pennies:
                          type: number
                        pay_in_full:
                          type: boolean
                        metadata:
                          type: object
                          additionalProperties:
                            anyOf:
                              - type: string
                              - type: number
                      required:
                        - id
                        - invoice_number
                        - created_at
                        - updated_at
                        - status_e
                        - total_amount_pennies
                        - tips_pennies
                        - amount_paid_pennies
                        - pay_in_full
                required:
                  - invoices
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/transaction:
    post:
      tags:
        - Transaction
      summary: Create a new transaction
      description: Create a new transaction
      security:
        - oauth2:
            - payments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payer_profile_id:
                  type: string
                invoice_id:
                  type: string
                source_account_id:
                  type: string
                amount_pennies:
                  type: number
                tip_pennies:
                  type: number
                invoice_metadata:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                metadata:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                idempotency_uuid:
                  type: string
                settings:
                  type: object
                  properties:
                    error_type:
                      anyOf:
                        - type: string
                          enum:
                            - Return
                        - type: string
                          enum:
                            - NOC
                        - type: string
                          enum:
                            - Success
                    noc_code:
                      type: string
                      enum:
                        - C01
                        - C02
                        - C03
                        - C04
                        - C05
                        - C06
                        - C07
                        - C08
                        - C09
                        - C10
                        - C11
                        - C12
                        - C13
                        - C14
                        - C15
                    return_code:
                      type: string
                      enum:
                        - R01
                        - R02
                        - R03
                        - R04
                        - R05
                        - R06
                        - R07
                        - R08
                        - R09
                        - R10
                        - R11
                        - R12
                        - R13
                        - R14
                        - R15
                        - R16
                        - R17
                        - R18
                        - R19
                        - R20
                        - R21
                        - R22
                        - R23
                        - R24
                        - R25
                        - R26
                        - R27
                        - R28
                        - R29
                        - R30
                        - R31
                        - R32
                        - R33
                        - R34
                        - R35
                        - R36
                        - R37
                        - R38
                        - R39
                        - R40
                        - R41
                        - R42
                        - R43
                        - R44
                        - R45
                        - R46
                        - R47
                        - R50
                        - R51
                        - R52
                        - R53
                        - R54
                        - R55
                        - R56
                        - R57
                        - R58
                        - R59
                        - R60
                        - R61
                        - R62
                        - R63
                        - R64
                        - R65
                        - R66
                        - R67
                        - R68
                        - R69
                        - R70
                        - R71
                        - R72
                        - R73
                        - R74
                        - R75
                        - R76
                        - R77
                        - R78
                        - R79
                        - R80
                        - R81
                        - R82
                        - R83
                        - R84
                        - R85
                    delay:
                      type: number
                  required:
                    - error_type
                    - delay
              required:
                - payer_profile_id
                - invoice_id
                - source_account_id
                - amount_pennies
                - idempotency_uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_id:
                    type: string
                  transactionEvents:
                    type:
                      - array
                      - 'null'
                    items:
                      type: string
                  notificationEmails:
                    type: array
                    items:
                      type: string
                  payee_profile_id:
                    type: string
                  date:
                    type: string
                required:
                  - transaction_id
                  - transactionEvents
                  - notificationEmails
                  - payee_profile_id
                  - date
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
  /api/transaction/:
    get:
      tags:
        - Transaction
      summary: List transactions
      description: List transactions
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: number
            minimum: 1
          required: false
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
          required: false
          name: page_size
          in: query
        - schema:
            type: string
          required: false
          name: invoice_id
          in: query
        - schema:
            type: string
          required: false
          name: profile_id
          in: query
        - schema:
            type: string
          required: false
          name: search_term
          in: query
        - schema:
            type: string
          required: false
          name: start_date
          in: query
        - schema:
            type: string
          required: false
          name: end_date
          in: query
        - schema:
            type: object
            additionalProperties:
              anyOf:
                - type: string
                - type: number
                - type: boolean
          required: false
          name: metadata
          in: query
      responses:
        '200':
          description: Ok
          headers:
            X-Total-Count:
              schema:
                type: number
              required: true
            X-Current-Page:
              schema:
                type: number
              required: true
            X-Total-Pages:
              schema:
                type: number
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        payer_profile_id:
                          type: string
                        invoice_id:
                          type: string
                        source_account_id:
                          type: string
                        amount_pennies:
                          type: number
                        tip_pennies:
                          type: number
                        idempotency_uuid:
                          type: string
                        status_e:
                          type: string
                        source_return_reason:
                          type: string
                        source_return_message:
                          type: string
                        source_return_timeframe:
                          type: string
                        source_account_nocs:
                          type: array
                          items:
                            type: object
                            properties:
                              noc_code:
                                type: string
                              noc_reason:
                                type: string
                              corrected_route_number:
                                type: string
                              corrected_account_number:
                                type: string
                              corrected_ach_transaction_code:
                                type: string
                              corrected_data:
                                type: string
                              noc_created_date:
                                type: string
                              ach_effective_entry_date:
                                type: string
                            required:
                              - noc_code
                              - noc_reason
                              - corrected_route_number
                              - corrected_account_number
                              - corrected_ach_transaction_code
                              - corrected_data
                              - noc_created_date
                              - ach_effective_entry_date
                        destination_return_reason:
                          type: string
                        destination_return_message:
                          type: string
                        destination_return_timeframe:
                          type: string
                        destination_account_nocs:
                          type: array
                          items:
                            type: object
                            properties:
                              noc_code:
                                type: string
                              noc_reason:
                                type: string
                              corrected_route_number:
                                type: string
                              corrected_account_number:
                                type: string
                              corrected_ach_transaction_code:
                                type: string
                              corrected_data:
                                type: string
                              noc_created_date:
                                type: string
                              ach_effective_entry_date:
                                type: string
                            required:
                              - noc_code
                              - noc_reason
                              - corrected_route_number
                              - corrected_account_number
                              - corrected_ach_transaction_code
                              - corrected_data
                              - noc_created_date
                              - ach_effective_entry_date
                        received_date:
                          type: string
                        settle_date:
                          type: string
                        return_date:
                          type: string
                        ach_effective_date:
                          type: string
                        ip_address:
                          type:
                            - string
                            - 'null'
                        originating_country:
                          type:
                            - string
                            - 'null'
                        originating_region:
                          type:
                            - string
                            - 'null'
                        originating_city:
                          type:
                            - string
                            - 'null'
                        originating_continent:
                          type:
                            - string
                            - 'null'
                        originating_latitude:
                          type:
                            - number
                            - 'null'
                        originating_longitude:
                          type:
                            - number
                            - 'null'
                        carrier:
                          type:
                            - string
                            - 'null'
                        mobile_country_code:
                          type:
                            - string
                            - 'null'
                        mobile_network_code:
                          type:
                            - string
                            - 'null'
                        is_flagged:
                          type: boolean
                        is_ip_tor:
                          type:
                            - boolean
                            - 'null'
                        is_ip_vpn:
                          type:
                            - boolean
                            - 'null'
                        is_ip_icloud_relay:
                          type:
                            - boolean
                            - 'null'
                        is_ip_proxy:
                          type:
                            - boolean
                            - 'null'
                        is_ip_datacenter:
                          type:
                            - boolean
                            - 'null'
                        is_ip_anonymous:
                          type:
                            - boolean
                            - 'null'
                        is_ip_known_abuser:
                          type:
                            - boolean
                            - 'null'
                        is_ip_known_attacker:
                          type:
                            - boolean
                            - 'null'
                        is_ip_threat:
                          type:
                            - boolean
                            - 'null'
                        is_ip_bogon:
                          type:
                            - boolean
                            - 'null'
                        ip_blocklists:
                          type: array
                          items:
                            type: object
                            additionalProperties:
                              type: string
                        metadata:
                          type: object
                          additionalProperties:
                            anyOf:
                              - type: string
                              - type: number
                      required:
                        - payer_profile_id
                        - invoice_id
                        - source_account_id
                        - amount_pennies
                        - tip_pennies
                        - idempotency_uuid
                        - status_e
                        - source_return_reason
                        - source_return_message
                        - source_return_timeframe
                        - source_account_nocs
                        - destination_return_reason
                        - destination_return_message
                        - destination_return_timeframe
                        - destination_account_nocs
                        - received_date
                        - settle_date
                        - return_date
                        - ach_effective_date
                        - ip_address
                        - originating_country
                        - originating_region
                        - originating_city
                        - originating_continent
                        - originating_latitude
                        - originating_longitude
                        - carrier
                        - mobile_country_code
                        - mobile_network_code
                        - is_flagged
                        - is_ip_tor
                        - is_ip_vpn
                        - is_ip_icloud_relay
                        - is_ip_proxy
                        - is_ip_datacenter
                        - is_ip_anonymous
                        - is_ip_known_abuser
                        - is_ip_known_attacker
                        - is_ip_threat
                        - is_ip_bogon
                required:
                  - transactions
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
  /api/transaction/{transaction_id}:
    get:
      tags:
        - Transaction
      summary: Get a transaction
      description: Get a transaction
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: transaction_id
          in: path
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  payer_profile_id:
                    type: string
                  invoice_id:
                    type: string
                  source_account_id:
                    type: string
                  amount_pennies:
                    type: number
                  tip_pennies:
                    type: number
                  idempotency_uuid:
                    type: string
                  status_e:
                    type: string
                  source_return_reason:
                    type: string
                  source_return_message:
                    type: string
                  source_return_timeframe:
                    type: string
                  source_account_nocs:
                    type: array
                    items:
                      type: object
                      properties:
                        noc_code:
                          type: string
                        noc_reason:
                          type: string
                        corrected_route_number:
                          type: string
                        corrected_account_number:
                          type: string
                        corrected_ach_transaction_code:
                          type: string
                        corrected_data:
                          type: string
                        noc_created_date:
                          type: string
                        ach_effective_entry_date:
                          type: string
                      required:
                        - noc_code
                        - noc_reason
                        - corrected_route_number
                        - corrected_account_number
                        - corrected_ach_transaction_code
                        - corrected_data
                        - noc_created_date
                        - ach_effective_entry_date
                  destination_return_reason:
                    type: string
                  destination_return_message:
                    type: string
                  destination_return_timeframe:
                    type: string
                  destination_account_nocs:
                    type: array
                    items:
                      type: object
                      properties:
                        noc_code:
                          type: string
                        noc_reason:
                          type: string
                        corrected_route_number:
                          type: string
                        corrected_account_number:
                          type: string
                        corrected_ach_transaction_code:
                          type: string
                        corrected_data:
                          type: string
                        noc_created_date:
                          type: string
                        ach_effective_entry_date:
                          type: string
                      required:
                        - noc_code
                        - noc_reason
                        - corrected_route_number
                        - corrected_account_number
                        - corrected_ach_transaction_code
                        - corrected_data
                        - noc_created_date
                        - ach_effective_entry_date
                  received_date:
                    type: string
                  settle_date:
                    type: string
                  return_date:
                    type: string
                  ach_effective_date:
                    type: string
                  ip_address:
                    type:
                      - string
                      - 'null'
                  originating_country:
                    type:
                      - string
                      - 'null'
                  originating_region:
                    type:
                      - string
                      - 'null'
                  originating_city:
                    type:
                      - string
                      - 'null'
                  originating_continent:
                    type:
                      - string
                      - 'null'
                  originating_latitude:
                    type:
                      - number
                      - 'null'
                  originating_longitude:
                    type:
                      - number
                      - 'null'
                  carrier:
                    type:
                      - string
                      - 'null'
                  mobile_country_code:
                    type:
                      - string
                      - 'null'
                  mobile_network_code:
                    type:
                      - string
                      - 'null'
                  is_flagged:
                    type: boolean
                  is_ip_tor:
                    type:
                      - boolean
                      - 'null'
                  is_ip_vpn:
                    type:
                      - boolean
                      - 'null'
                  is_ip_icloud_relay:
                    type:
                      - boolean
                      - 'null'
                  is_ip_proxy:
                    type:
                      - boolean
                      - 'null'
                  is_ip_datacenter:
                    type:
                      - boolean
                      - 'null'
                  is_ip_anonymous:
                    type:
                      - boolean
                      - 'null'
                  is_ip_known_abuser:
                    type:
                      - boolean
                      - 'null'
                  is_ip_known_attacker:
                    type:
                      - boolean
                      - 'null'
                  is_ip_threat:
                    type:
                      - boolean
                      - 'null'
                  is_ip_bogon:
                    type:
                      - boolean
                      - 'null'
                  ip_blocklists:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: string
                  metadata:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                required:
                  - payer_profile_id
                  - invoice_id
                  - source_account_id
                  - amount_pennies
                  - tip_pennies
                  - idempotency_uuid
                  - status_e
                  - source_return_reason
                  - source_return_message
                  - source_return_timeframe
                  - source_account_nocs
                  - destination_return_reason
                  - destination_return_message
                  - destination_return_timeframe
                  - destination_account_nocs
                  - received_date
                  - settle_date
                  - return_date
                  - ach_effective_date
                  - ip_address
                  - originating_country
                  - originating_region
                  - originating_city
                  - originating_continent
                  - originating_latitude
                  - originating_longitude
                  - carrier
                  - mobile_country_code
                  - mobile_network_code
                  - is_flagged
                  - is_ip_tor
                  - is_ip_vpn
                  - is_ip_icloud_relay
                  - is_ip_proxy
                  - is_ip_datacenter
                  - is_ip_anonymous
                  - is_ip_known_abuser
                  - is_ip_known_attacker
                  - is_ip_threat
                  - is_ip_bogon
                description: '200'
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
  /api/transaction/events/search:
    get:
      tags:
        - Transaction
      summary: List all transaction events
      description: >-
        List all transaction events, or list events for a specific transaction,
        or all events for a profile
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: number
            minimum: 1
          required: false
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
          required: false
          name: page_size
          in: query
        - schema:
            type: string
          required: false
          name: transaction_id
          in: query
        - schema:
            type: string
          required: false
          name: profile_id
          in: query
        - schema:
            type: string
          required: false
          name: event_name
          in: query
        - schema:
            type: string
          required: false
          name: start_date
          in: query
        - schema:
            type: string
          required: false
          name: end_date
          in: query
      responses:
        '200':
          description: Ok
          headers:
            X-Total-Count:
              schema:
                type: number
              required: true
            X-Current-Page:
              schema:
                type: number
              required: true
            X-Total-Pages:
              schema:
                type: number
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionEvents:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        transaction_id:
                          type: string
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        deleted_at:
                          type:
                            - string
                            - 'null'
                        event_name:
                          type: string
                        profile_id:
                          type: string
                        transaction:
                          type: object
                          properties:
                            invoice_id:
                              type: string
                            amount_pennies:
                              type: number
                            tip_pennies:
                              type: number
                            status_e:
                              type: string
                            ip_address:
                              type:
                                - string
                                - 'null'
                            originating_country:
                              type:
                                - string
                                - 'null'
                            originating_region:
                              type:
                                - string
                                - 'null'
                            originating_city:
                              type:
                                - string
                                - 'null'
                            originating_continent:
                              type:
                                - string
                                - 'null'
                            originating_latitude:
                              type:
                                - number
                                - 'null'
                            originating_longitude:
                              type:
                                - number
                                - 'null'
                            effective_date:
                              type:
                                - string
                                - 'null'
                            settle_date:
                              type:
                                - string
                                - 'null'
                            return_date:
                              type:
                                - string
                                - 'null'
                          required:
                            - invoice_id
                            - amount_pennies
                            - tip_pennies
                            - status_e
                            - ip_address
                            - originating_country
                            - originating_region
                            - originating_city
                            - originating_continent
                            - originating_latitude
                            - originating_longitude
                            - effective_date
                            - settle_date
                            - return_date
                      required:
                        - id
                        - transaction_id
                        - created_at
                        - updated_at
                        - event_name
                        - profile_id
                required:
                  - transactionEvents
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
  /api/webhook/{profile_id}:
    post:
      tags:
        - Webhook
      summary: Create webhooks for the current client credentials
      description: Create webhooks for the current client credentials
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                url:
                  type: string
              required:
                - name
                - url
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      url:
                        type: string
                    required:
                      - id
                      - name
                      - url
                required:
                  - webhook
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
    get:
      tags:
        - Webhook
      summary: List webhooks for the current client credentials
      description: List webhooks for the current client credentials
      security:
        - oauth2:
            - payments
      parameters:
        - schema:
            type: string
          required: true
          name: profile_id
          in: path
        - schema:
            type: number
            minimum: 1
          required: false
          name: page
          in: query
        - schema:
            type: number
            minimum: 1
          required: false
          name: page_size
          in: query
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        url:
                          type: string
                      required:
                        - id
                        - name
                        - url
                required:
                  - webhooks
                description: '200'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: A 400 error
        '404':
          description: The item you requested could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                description: The item you requested could not be found
