---
title: "Fechar Pedido de Pagamento"
method: PATCH
path: "/order/{order_id}/closed"
tags: ["Pedidos"]
---

# Fechar Pedido de Pagamento

`PATCH /order/{order_id}/closed`

## Path parameters

- `order_id` string, required

## Request body

- CloseOrderRequestDTO
  - `status` string, required — Status do pedido

## Response `200`

Pedido fechado com sucesso

- OrderDetailResponseDTO
  - `order_id` string, required
  - `closed` boolean, required
  - `items` ItemResponseDTO[], required
    - `product_id` string, required
    - `amount` number, required
    - `type` string, nullable
    - `status` 'pending' | 'processing' | 'paid' | 'canceled' | 'failed' | 'settled', required
    - `description` string, nullable
    - `metadata` object, nullable
  - `customer` CustomerResponseDTO
    - `name` string, required
    - `phone` string, nullable
    - `email` string, nullable
    - `document` string, nullable
    - `address` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasAddressResponseDTO
      - `zip_code` string, nullable
      - `state` string, nullable
      - `city` string, nullable
      - `line_1` string, nullable
      - `line_2` string, nullable
      - `metadata` object
    - `metadata` object
  - `status` 'pending' | 'processing' | 'paid' | 'canceled' | 'cancellation_requested' | 'failed', required
  - `closed_at` string, nullable
  - `external_id` string, nullable
  - `charges` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasChargeResponseDTO[], required
    - `charge_id` string, required
    - `code` string, nullable
    - `gateway_id` string, nullable
    - `amount` number, required
    - `original_amount` number, nullable
    - `status` string, required
    - `payment_method` string, nullable
    - `paid_at` string, date-time, nullable
    - `last_transaction` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasLastTransactionResponseDTO
      - `transaction_id` string, required
      - `transaction_type` string, required
      - `amount` number, required
      - `status` string, nullable
      - `success` boolean, nullable
      - `installments` integer, nullable
      - `operation_type` string, nullable
      - `gateway_id` string, nullable
      - `acquirer_name` string, nullable
      - `acquirer_transaction_id` string, nullable
      - `acquirer_nsu` string, nullable
      - `acquirer_auth_code` string, nullable
      - `acquirer_message` string, nullable
      - `acquirer_return_code` string, nullable
      - `card` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasCardResponseDTO
        - `last_four_digits` union
          - string
          - integer
        - `brand` string, nullable
        - `holder_name` string, nullable
        - `exp_month` integer, nullable
        - `exp_year` integer, nullable
        - `status` string, nullable
        - `billing_address` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasAddressResponseDTO
          - `zip_code` string, nullable
          - `state` string, nullable
          - `city` string, nullable
          - `line_1` string, nullable
          - `line_2` string, nullable
          - `metadata` object
        - `type` string, nullable
        - `created_at` string, date-time
        - `updated_at` string, date-time
      - `bank_slip` BankSlipResponseDTO
        - `line` string, nullable
        - `barcode` string, nullable
        - `url` string, nullable
        - `pdf` string, nullable
        - `qr_code` string, nullable
        - `nosso_numero` string, nullable
        - `document_number` string, nullable
        - `instructions` string, nullable
        - `due_at` string, date-time, nullable
      - `pix` PixResponseDTO
        - `qr_code` string, nullable
        - `qr_code_url` string, nullable
        - `additional_information` object, nullable
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `gateway_response` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasGatewayResponseDTO
        - `name` string, nullable
        - `message` string, nullable
        - `code` string, nullable
        - `metadata` object, nullable
      - `antifraud_response` V2PackagesEnterpriseSchemasOrderOrderResponseSchemasAntifraudResponseDTO
        - `name` string, nullable
        - `status` string, nullable
        - `message` string, nullable
        - `code` string, nullable
        - `score` integer, nullable
        - `metadata` object, nullable
    - `chargeback_reason` ChargebackReasonDTO
      - `chageback_date` string, date-time, nullable
      - `reason` string, nullable
      - `code` string, nullable
      - `justification` string, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `created_at` string, nullable
  - `updated_at` string, nullable
  - `metadata` object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usezapay/apis/zapi.md) · [All operations](https://skmtc.net/usezapay/apis/zapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usezapay/zapi/versions/50c96157fff4/schema)
