## Autogenerated by Scribe. DO NOT MODIFY.

name: Payments
description: |-

  APIs for processing payments in POS
endpoints:
  -
    custom: []
    httpMethods:
      - GET
    uri: api/v1/tenant/payments
    metadata:
      custom: []
      groupName: Payments
      groupDescription: |-

        APIs for processing payments in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'List Payments'
      description: 'Get paginated list of payments'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters: []
    cleanUrlParameters: []
    queryParameters:
      page:
        custom: []
        name: page
        description: 'Page number.'
        required: false
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      per_page:
        custom: []
        name: per_page
        description: 'Items per page (max 100).'
        required: false
        example: 15
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      payment_method:
        custom: []
        name: payment_method
        description: 'Filter by payment method.'
        required: false
        example: cash
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      date_from:
        custom: []
        name: date_from
        description: 'Filter from date (Y-m-d).'
        required: false
        example: '2025-11-01'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      date_to:
        custom: []
        name: date_to
        description: 'Filter to date (Y-m-d).'
        required: false
        example: '2025-11-30'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanQueryParameters:
      page: 1
      per_page: 15
      payment_method: cash
      date_from: '2025-11-01'
      date_to: '2025-11-30'
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "data": []
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: api/v1/tenant/payments
    metadata:
      custom: []
      groupName: Payments
      groupDescription: |-

        APIs for processing payments in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Create Payment'
      description: 'Process a payment for an order'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters: []
    cleanUrlParameters: []
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      order_id:
        custom: []
        name: order_id
        description: 'Order ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      amount:
        custom: []
        name: amount
        description: 'Payment amount.'
        required: true
        example: 45.5
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      payment_method:
        custom: []
        name: payment_method
        description: 'Payment method (cash, card, credit, mobile_money).'
        required: true
        example: cash
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      transaction_id:
        custom: []
        name: transaction_id
        description: 'optional Transaction/reference ID.'
        required: false
        example: TXN123456
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
      amount_paid:
        custom: []
        name: amount_paid
        description: 'optional Amount tendered (for change calculation).'
        required: false
        example: 50.0
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
    cleanBodyParameters:
      order_id: 1
      amount: 45.5
      payment_method: cash
      transaction_id: TXN123456
      amount_paid: 50.0
    fileParameters: []
    responses:
      -
        custom: []
        status: 201
        content: |-
          {
            "success": true,
            "message": "Payment processed successfully",
            "data": {
              "payment": {},
              "change": 4.50
            }
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - GET
    uri: 'api/v1/tenant/payments/{id}'
    metadata:
      custom: []
      groupName: Payments
      groupDescription: |-

        APIs for processing payments in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Get Single Payment'
      description: 'Get payment details'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Payment ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 401
        content: '{"message":"Unauthenticated."}'
        headers:
          cache-control: 'no-cache, private'
          content-type: application/json
          access-control-allow-origin: '*'
        description: null
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - GET
    uri: 'api/v1/tenant/payments/{id}/receipt'
    metadata:
      custom: []
      groupName: Payments
      groupDescription: |-

        APIs for processing payments in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Get Receipt'
      description: 'Get payment receipt data'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Payment ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters: []
    cleanBodyParameters: []
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "data": {
              "payment": {},
              "order": {},
              "restaurant": {}
            }
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
  -
    custom: []
    httpMethods:
      - POST
    uri: 'api/v1/tenant/payments/{id}/refund'
    metadata:
      custom: []
      groupName: Payments
      groupDescription: |-

        APIs for processing payments in POS
      subgroup: ''
      subgroupDescription: ''
      title: 'Refund Payment'
      description: 'Process a payment refund'
      authenticated: true
      deprecated: false
    headers:
      Authorization: 'Bearer YOUR_TOKEN_HERE'
      Content-Type: application/json
      Accept: application/json
    urlParameters:
      id:
        custom: []
        name: id
        description: 'Payment ID.'
        required: true
        example: 1
        type: integer
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
    cleanUrlParameters:
      id: 1
    queryParameters: []
    cleanQueryParameters: []
    bodyParameters:
      amount:
        custom: []
        name: amount
        description: 'optional Refund amount (defaults to full amount).'
        required: false
        example: 20.0
        type: number
        enumValues: []
        exampleWasSpecified: true
        nullable: false
        deprecated: false
      reason:
        custom: []
        name: reason
        description: 'optional Refund reason.'
        required: false
        example: 'Customer complaint'
        type: string
        enumValues: []
        exampleWasSpecified: true
        nullable: true
        deprecated: false
    cleanBodyParameters:
      amount: 20.0
      reason: 'Customer complaint'
    fileParameters: []
    responses:
      -
        custom: []
        status: 200
        content: |-
          {
            "success": true,
            "message": "Payment refunded successfully",
            "data": {}
          }
        headers: []
        description: ''
    responseFields: []
    auth:
      - headers
      - Authorization
      - 'Bearer 6g43cv8PD1aE5beadkZfhV6'
    controller: null
    method: null
    route: null
