Skip to content

list-order-payments

Method: GET
Path: /orders/{order_number}/payments

Tags: Orders

Summary

Retrieve order payments

Description

Retrieve order payments

Storefront SDK Usage

SDK Method: sdk.order.listOrderPayments()

Example:

typescript
const { data, error } = await sdk.order.listOrderPayments({
  order_number: "ORD-2024-001"
});

if (error) {
  console.error("Failed to get order payments:", error.message);
} else {
  console.log("Payments found:", data.payments?.length || 0);

  data.payments?.forEach(payment => {
    console.log(`Payment ${payment.id}: ${payment.status}`);
    console.log("Amount:", payment.amount);
    console.log("Gateway:", payment.payment_gateway);
    console.log("Transaction ID:", payment.transaction_id);
  });
}

TypeScript Definition

typescript
"list-order-payments": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description order number */
                order_number: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /** @default order details */
                        readonly message: string;
                        readonly success?: boolean;
                        content?: {
                            payments?: components["schemas"]["OrderPayment"][];
                        };
                    };
                };
            };
            401: components["responses"]["Unauthorized"];
            404: components["responses"]["NotFound"];
        };
    };

Component References

ReferenceResolves To
components["schemas"]["OrderPayment"]OrderPayment
components["responses"]["Unauthorized"]Unauthorized
components["responses"]["NotFound"]NotFound

Parameters

  • order_number (path): order number

Responses

200

OK

401

Not authorized for given operation on the Resource

404

Requested resource not found

OpenAPI Definition

json
{
  "tags": [
    "Orders"
  ],
  "operationId": "list-order-payments",
  "summary": "Retrieve order payments",
  "description": "Retrieve order payments",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/list-order-payments",
    "description": "API reference for the list-order-payments operation"
  },
  "parameters": [
    {
      "name": "order_number",
      "in": "path",
      "description": "order number",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "default": "order details",
                "readOnly": true
              },
              "success": {
                "type": "boolean",
                "readOnly": true
              },
              "content": {
                "properties": {
                  "payments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/OrderPayment"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "x-speakeasy-group": "orders",
  "x-speakeasy-ignore": true,
  "x-speakeasy-name-override": "listOrderPayments"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: