> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Return payment by orderId

> Return payment by orderId



## OpenAPI

````yaml oms_v1 post /api-order/orders/payment
openapi: 3.0.0
info:
  description: Order Management System
  version: 1.0.0
  title: Orders v1 (OMS v1)
  contact:
    email: oms-team@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Cart
    description: >-
      Cart APIs<br /><br />**Note:** These are the legacy Cart APIs. To view
      fabric's new Cart APIs, navigate to *Cart API > Cart* from the left side
      navigation pane.
  - name: Bill To
    description: Bill To APIs [Deprecated]
  - name: Ship To
    description: >-
      Ship To APIs<br /><br />**Note:** These are the legacy Ship To APIs. To
      view fabric's new Shipping APIs, navigate to *Cart API > Shipping* from
      the left side navigation pane.
  - name: Wishlist
    description: Wishlist APIs
  - name: Cart Decoupled
    description: Cart Decoupled APIs
  - name: Warehouse
    description: Warehouse APIs
  - name: Inventory
    description: Inventory APIs
  - name: Attributes
    description: >-
      Attributes APIs<br /><br />**Note:** These are the legacy Attribute APIs.
      To view fabric's new Attribute APIs, navigate to *Cart API > Attribute*
      from the left side navigation pane.
  - name: List
    description: List APIs
  - name: Tax/Address Validate
    description: Tax/Address Validate APIs
  - name: Shipping
    description: Shipping APIs
  - name: Payments
    description: Payments APIs
  - name: Order
    description: Order APIs
paths:
  /api-order/orders/payment:
    post:
      tags:
        - Order
      summary: Return payment by orderId
      description: Return payment by orderId
      operationId: returnPaymentByOrderId
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
            example: 0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k
        - $ref: '#/components/parameters/xSiteContent'
        - in: query
          name: Pagination parameters
          schema:
            type: object
            properties:
              offset:
                type: integer
                default: 0
                minimum: 0
              limit:
                type: integer
                default: 10
                minimum: 1
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                orders:
                  type: array
                  items:
                    type: string
                    example: 4809-7758-87594
      responses:
        '200':
          description: returned orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: object
                    properties:
                      limit:
                        type: number
                        example: 10
                      offset:
                        type: number
                        example: 0
                      count:
                        type: number
                        example: 2
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          example: 61160edde8af410009827c28
                        isSugarRefunded:
                          type: boolean
                        tags:
                          type: array
                        cartId:
                          type: string
                          example: 61160ddbffac450008316d70
                        attributes:
                          type: array
                        customerEmail:
                          type: string
                          example: mike@fabric.inc
                        orderCurrency:
                          type: string
                          example: USD
                        orderTotal:
                          type: number
                          example: 6011.99
                        taxTotal:
                          type: number
                          example: 0
                        channel:
                          type: number
                          example: 12
                        status:
                          type: string
                          example: ORDER_CREATED
                        statusLog:
                          type: string
                          example: Order has been created
                        orderReference:
                          type: string
                          example: 3635-1613-42753
                        orderId:
                          type: string
                          example: 4809-7758-87594
                        shipTo:
                          type: array
                          items:
                            type: object
                            properties:
                              address:
                                type: object
                                properties:
                                  name:
                                    type: object
                                    properties:
                                      first:
                                        type: string
                                        example: First
                                      last:
                                        type: string
                                        example: Last
                                  phone:
                                    type: object
                                    properties:
                                      number:
                                        type: string
                                        example: 123-992-9404
                                      kind:
                                        type: string
                                        example: Mobile
                                  street1:
                                    type: string
                                    example: 888 Broadway
                                  city:
                                    type: string
                                    example: New York
                                  state:
                                    type: string
                                    example: NY
                                  country:
                                    type: string
                                    example: United States
                                  zipCode:
                                    type: string
                                    example: 10003
                                  kind:
                                    type: string
                                    example: shipping
                                  email:
                                    type: string
                                    example: first@fabric.inc
                              delivery:
                                type: object
                                properties:
                                  actual:
                                    type: string
                                    format: nullable
                              shipping:
                                type: object
                                properties:
                                  actual:
                                    type: string
                                    format: nullable
                              promosApplied:
                                type: array
                              _id:
                                type: string
                                example: 61160dea8e37e00008266191
                              shipToType:
                                type: string
                                example: SHIP_TO_ADDRESS
                              taxCode:
                                type: string
                                example: FR1000
                              shipToId:
                                type: number
                                example: 1499
                              price:
                                type: number
                                example: 11.99
                              shipmentMethodId:
                                type: string
                                example: 10002
                              estimatedTax:
                                type: number
                                example: 0
                              shipmentCarrier:
                                type: string
                                example: 2 Day
                              total:
                                type: number
                                example: 11.99
                              readyForPickups:
                                type: array
                              id:
                                type: string
                                example: 61160dea8e37e00008266191
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              group:
                                type: array
                                items:
                                  type: string
                                  example: 1.2312312312312322e+23
                              promosApplied:
                                type: array
                              _id:
                                type: string
                                example: 61160ddbffac450008316d71
                              price:
                                type: number
                                example: 600
                              weightUnit:
                                type: string
                                example: kg
                              isPickup:
                                type: boolean
                              itemId:
                                type: number
                                example: 1000011164
                              quantity:
                                type: number
                                example: 10
                              priceListId:
                                type: number
                                example: 100000
                              sku:
                                type: string
                                example: BLUETEST
                              taxCode:
                                type: string
                                example: PH060771
                              title:
                                type: string
                                example: Loki Cat
                              weight:
                                type: number
                                example: 7
                              lineItemId:
                                type: number
                                example: 1
                              attributeTotalPrice:
                                type: number
                                example: 0
                              attributes:
                                type: array
                              currency:
                                type: string
                                example: USD
                              shipToId:
                                type: number
                                example: 1499
                              discount:
                                type: number
                                example: 0
                              estimatedTax:
                                type: number
                                example: 0
                              total:
                                type: number
                                example: 6000
                              reservedLocation:
                                type: array
                              id:
                                type: string
                                example: 61160ddbffac450008316d71
                        shipments:
                          type: array
                        payments:
                          type: array
                          items:
                            type: object
                            properties:
                              billToAddress:
                                type: object
                                properties:
                                  name:
                                    type: object
                                    properties:
                                      first:
                                        type: string
                                        example: John
                                      last:
                                        type: string
                                        example: Smith
                                  phone:
                                    type: object
                                    properties:
                                      number:
                                        type: string
                                        example: 7780811973
                                      kind:
                                        type: string
                                        example: mobile
                                  email:
                                    type: string
                                    example: johnsmith@gmail.com
                                  street1:
                                    type: string
                                    example: 600 Congress Ave
                                  street2:
                                    type: string
                                    example: suite 219
                                  city:
                                    type: string
                                    example: Austin
                                  state:
                                    type: string
                                    example: Tx
                                  country:
                                    type: string
                                    example: US
                                  zipCode:
                                    type: string
                                    example: 10033
                              shipToId:
                                type: array
                                items:
                                  type: number
                                  example: 1499
                              _id:
                                type: string
                                example: 61160edde8af410009827c2b
                              paymentStatus:
                                type: string
                                example: authorized
                              amount:
                                type: number
                                example: 5000
                              currency:
                                type: string
                                example: USD
                              paymentIdentifier:
                                type: object
                                properties:
                                  cardIdentifier:
                                    type: string
                                    example: 4242
                              paymentMethod:
                                type: string
                                example: visa
                              paymentKind:
                                type: string
                                example: CARD_STRIPE
                              conversion:
                                type: number
                                example: 1
                              paymentToken:
                                type: object
                                properties:
                                  token:
                                    type: string
                                    example: pi_3JNthOJxr7zyIFb91Tp0jQTG
                                  type:
                                    type: string
                                    example: CARD_STRIPE
                              id:
                                type: string
                                example: 61160edde8af410009827c2b
                        revision:
                          type: number
                          example: 0
                        totalQuantity:
                          type: number
                          example: 10
                        statusDescriptions:
                          type: array
                        events:
                          type: array
                        pickups:
                          type: array
                        createdAt:
                          type: string
                          example: '2021-08-13T06:19:09.589Z'
                        updatedAt:
                          type: string
                          example: '2021-08-13T06:19:09.589Z'
                        __v:
                          type: number
                          example: 0
        '400':
          $ref: '#/components/responses/GenericClientError'
        '403':
          $ref: '#/components/responses/MissingXApiKeyHeader'
        '500':
          $ref: '#/components/responses/GenericServerError'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  responses:
    GenericClientError:
      description: A generic client error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string
    MissingXApiKeyHeader:
      description: Missing x-api-key in header
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: The error message
                example: Forbidden
                type: string
    GenericServerError:
      description: A generic server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string

````