openapi: 3.0.0
components:
  schemas:
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.currency.v1.GetSupportCurrencyReq:
      properties: {}
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.currency.v1.GetSupportCurrencyRes:
      properties:
        list:
          description: List of supported cryptocurrencies
          format: '[]v1.SupportCurrency'
          items:
            $ref: >-
              #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.currency.v1.SupportCurrency
          type: array
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.currency.v1.SupportCurrency:
      properties:
        chain:
          description: Blockchain network name
          format: string
          type: string
        token_id:
          description: Token identifier
          format: string
          type: string
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.QueryOrderReq:
      properties:
        order_id:
          description: Order id
          format: string
          type: string
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.QueryOrderRes:
      properties:
        merchant_id:
          format: string
          type: string
        request_id:
          format: string
          type: string
        order_id:
          format: string
          type: string
        client_reference:
          format: string
          type: string
        order_desc:
          format: string
          type: string
        order_currency:
          format: string
          type: string
        order_amount:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        amount_confirming:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        amount_confirmed:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        status:
          format: string
          type: string
        pay_status:
          format: string
          type: string
        created_at:
          format: int64
          type: integer
        updated_at:
          format: int64
          type: integer
        expires_at:
          format: int64
          type: integer
        merchant_info:
          $ref: >-
            #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.MerchantInfo
        exception_tag:
          format: '[]string'
          items:
            format: string
            type: string
          type: array
        success_url:
          format: string
          type: string
        failure_url:
          format: string
          type: string
      type: object
    github.com.shopspring.decimal.Decimal:
      properties: {}
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.MerchantInfo:
      properties:
        display_name:
          format: string
          type: string
        logo:
          format: string
          type: string
        default_order_ttl:
          format: int64
          type: integer
        name_type:
          format: string
          type: string
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.CreateOrderReq:
      properties:
        client_reference:
          description: Client Reference
          format: string
          type: string
        request_id:
          description: request id (unique)
          format: string
          type: string
        order_desc:
          description: Order description
          format: string
          type: string
        amount:
          description: Order amount
          format: string
          type: string
        merchant_alias:
          description: customized merchant alias (optional)
          format: string
          type: string
        expires_in:
          description: >-
            Time to live in seconds (e.g., 3600 for 1 hour, 0 for default order
            expires time)
          format: int64
          type: integer
        success_url:
          description: Success redirect Url
          format: string
          type: string
        failure_url:
          description: Failure redirect Url
          format: string
          type: string
      required:
        - request_id
        - amount
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.CreateOrderRes:
      properties:
        client_reference:
          format: string
          type: string
        request_id:
          format: string
          type: string
        order_id:
          description: Order id
          format: string
          type: string
        checkout_url:
          description: Checkout url
          format: string
          type: string
        token:
          description: Token
          format: string
          type: string
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ListOrderReq:
      properties:
        currency:
          description: USDC or USDT
          format: string
          type: string
        status:
          description: status
          format: string
          type: string
        page:
          default: 1
          description: page from 1 to n
          format: int
          type: integer
        page_size:
          default: 10
          description: size :default is 10
          format: int
          type: integer
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ListOrderRes:
      properties:
        list:
          format: '[]*v1.OrderItem'
          items:
            $ref: >-
              #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.OrderItem
          type: array
        total:
          format: int
          type: integer
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.OrderItem:
      properties:
        merchant_id:
          format: string
          type: string
        order_id:
          format: string
          type: string
        request_id:
          format: string
          type: string
        client_reference:
          format: string
          type: string
        order_desc:
          format: string
          type: string
        order_currency:
          format: string
          type: string
        order_amount:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        amount_confirming:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        amount_confirmed:
          $ref: '#/components/schemas/github.com.shopspring.decimal.Decimal'
        status:
          format: string
          type: string
        pay_status:
          format: string
          type: string
        created_at:
          format: int64
          type: integer
        updated_at:
          format: int64
          type: integer
        expires_at:
          format: int64
          type: integer
        exception_tag:
          format: '[]string'
          items:
            format: string
            type: string
          type: array
        success_url:
          format: string
          type: string
        failure_url:
          format: string
          type: string
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ReissueOrderTokenReq:
      properties:
        order_id:
          description: order_id
          format: string
          type: string
      required:
        - order_id
      type: object
    github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ReissueOrderTokenRes:
      properties:
        order_id:
          description: Order id
          format: string
          type: string
        checkout_url:
          description: Checkout url
          format: string
          type: string
        token:
          description: Token
          format: string
          type: string
      type: object
info:
  title: ''
  version: ''
paths:
  /currency:
    get:
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.currency.v1.GetSupportCurrencyRes
          description: ''
      summary: >-
        This is a method for get  all cryptocurrencies available for creating
        orders
      tags:
        - Currency
  /order:
    get:
      parameters:
        - description: Order id
          in: query
          name: order_id
          schema:
            description: Order id
            format: string
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.QueryOrderRes
          description: ''
      summary: Get a order
      tags:
        - Order
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.CreateOrderReq
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.CreateOrderRes
          description: ''
      summary: Create a new order
      tags:
        - Order
  /order/list:
    get:
      parameters:
        - description: USDC or USDT
          in: query
          name: currency
          schema:
            description: USDC or USDT
            format: string
            type: string
        - description: status
          in: query
          name: status
          schema:
            description: status
            format: string
            type: string
        - description: page from 1 to n
          in: query
          name: page
          schema:
            default: 1
            description: page from 1 to n
            format: int
            type: integer
        - description: size :default is 10
          in: query
          name: page_size
          schema:
            default: 10
            description: size :default is 10
            format: int
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ListOrderRes
          description: ''
      summary: list orders
      tags:
        - Order
  /order/token/reissue:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ReissueOrderTokenReq
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github.com.infini-money.infini-services-go.app.infini-payment-service.api.order.v1.ReissueOrderTokenRes
          description: ''
      summary: Reissue order token
      tags:
        - Order
