# Update a transaction

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/issuing/transactions/{id}:
    post:
      summary: Update a transaction
      deprecated: false
      description: ''
      tags:
        - API Reference/Issuing/Transactions
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: string
                  description: >-
                    Set of key-value pairs that you can attach to an object.
                    This can be useful for storing additional information about
                    the object in a structured format.
              x-apifox-orders:
                - metadata
              x-apifox-ignore-properties: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apifox-refs:
                  01HJ37WZG5F4WB877KB70JP3BX:
                    $ref: '#/components/schemas/The%20Transaction%20object'
                    x-apifox-overrides:
                      balance_transaction: null
                      amount_details: null
                      purchase_details: null
                      token: null
                      wallet: null
                      network_data: &ref_0
                        type: object
                        properties:
                          transaction_id:
                            type: string
                            description: The transaction ID from VISA network
                        description: >-
                          Details about the transaction, such as processing
                          dates, set by the card network.
                        x-apifox-orders:
                          - transaction_id
                        x-apifox-ignore-properties: []
                    required: []
                x-apifox-orders:
                  - 01HJ37WZG5F4WB877KB70JP3BX
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  object:
                    type: string
                    description: >-
                      String representing the object’s type. Objects of the same
                      type share the same value.
                  amount:
                    type: integer
                    description: The transaction amount (minor unit)
                  authorization:
                    type: string
                    description: The Authorization object that led to this transaction.
                  card:
                    type: string
                    description: The card used to make this transaction.
                  cardholder:
                    type: string
                    description: The cardholder to whom this transaction belongs.
                  currency:
                    type: string
                    description: >-
                      Three-letter ISO currency code, in lowercase. Must be a
                      supported currency.
                  metadata:
                    type: object
                    properties: {}
                    x-apifox-orders: []
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                    x-apifox-ignore-properties: []
                  type:
                    type: string
                    description: The nature of the transaction.
                    enum:
                      - capture
                      - refund
                    x-apifox-enum:
                      - name: ''
                        value: capture
                        description: >-
                          Funds were captured by the acquirer. amount will be
                          negative as funds are moving out of your balance.
                      - name: ''
                        value: refund
                        description: >-
                          An acquirer initiated a refund. This transaction might
                          not be linked to an original capture, for example
                          credits are original transactions. amount will be
                          positive for refunds
                  created:
                    type: string
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  dispute:
                    type: string
                    description: If you’ve disputed the transaction, the ID of the dispute.
                  livemode:
                    type: boolean
                    description: >-
                      Has the value true if the object exists in live mode or
                      the value false if the object exists in test mode.
                  merchant_amount:
                    type: integer
                    description: >-
                      The amount that the merchant will receive, denominated in
                      merchant_currency and in the smallest currency unit. It
                      will be different from amount if the merchant is taking
                      payment in a different currency.
                  merchant_currency:
                    type: string
                    description: The currency with which the merchant is taking payment.
                  merchant_data:
                    type: object
                    properties:
                      category:
                        type: string
                        description: A categorization of the seller’s type of business.
                      category_code:
                        type: string
                        description: The merchant category code for the seller’s business
                      city:
                        type: string
                        description: City where the seller is located
                      country:
                        type: string
                        description: Country where the seller is located
                      name:
                        type: string
                        description: Name of the seller
                      network_id:
                        type: string
                        description: >-
                          Identifier assigned to the seller by the card network.
                          Different card networks may assign different
                          network_id fields to the same merchant.
                      postal_code:
                        type: string
                        description: Postal code where the seller is located
                      state:
                        type: string
                        description: State where the seller is located
                      terminal_id:
                        type: string
                        description: >-
                          An ID assigned by the seller to the location of the
                          sale.
                      url:
                        type: string
                        description: URL provided by the merchant on a 3DS request
                    x-apifox-orders:
                      - category
                      - category_code
                      - city
                      - country
                      - name
                      - network_id
                      - postal_code
                      - state
                      - terminal_id
                      - url
                    description: >-
                      Details about the seller (grocery store, e-commerce
                      website, etc.) involved in this transaction.
                    x-apifox-ignore-properties: []
                  network_data: *ref_0
                x-apifox-ignore-properties:
                  - id
                  - object
                  - amount
                  - authorization
                  - card
                  - cardholder
                  - currency
                  - metadata
                  - type
                  - created
                  - dispute
                  - livemode
                  - merchant_amount
                  - merchant_currency
                  - merchant_data
                  - network_data
          headers: {}
          x-apifox-name: OK
      security:
        - basic: []
      x-apifox-folder: API Reference/Issuing/Transactions
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/1296482/apis/api-135252902-run
components:
  schemas:
    The Transaction object:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        object:
          type: string
          description: >-
            String representing the object’s type. Objects of the same type
            share the same value.
        amount:
          type: integer
          description: The transaction amount (minor unit)
        authorization:
          type: string
          description: The Authorization object that led to this transaction.
        card:
          type: string
          description: The card used to make this transaction.
        cardholder:
          type: string
          description: The cardholder to whom this transaction belongs.
        currency:
          type: string
          description: >-
            Three-letter ISO currency code, in lowercase. Must be a supported
            currency.
        metadata:
          type: object
          properties: {}
          x-apifox-orders: []
          description: >-
            Set of key-value pairs that you can attach to an object. This can be
            useful for storing additional information about the object in a
            structured format.
          x-apifox-ignore-properties: []
        type:
          type: string
          description: The nature of the transaction.
          enum:
            - capture
            - refund
          x-apifox-enum:
            - name: ''
              value: capture
              description: >-
                Funds were captured by the acquirer. amount will be negative as
                funds are moving out of your balance.
            - name: ''
              value: refund
              description: >-
                An acquirer initiated a refund. This transaction might not be
                linked to an original capture, for example credits are original
                transactions. amount will be positive for refunds
        created:
          type: string
          description: >-
            Time at which the object was created. Measured in seconds since the
            Unix epoch.
        dispute:
          type: string
          description: If you’ve disputed the transaction, the ID of the dispute.
        livemode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
        merchant_amount:
          type: integer
          description: >-
            The amount that the merchant will receive, denominated in
            merchant_currency and in the smallest currency unit. It will be
            different from amount if the merchant is taking payment in a
            different currency.
        merchant_currency:
          type: string
          description: The currency with which the merchant is taking payment.
        merchant_data:
          type: object
          properties:
            category:
              type: string
              description: A categorization of the seller’s type of business.
            category_code:
              type: string
              description: The merchant category code for the seller’s business
            city:
              type: string
              description: City where the seller is located
            country:
              type: string
              description: Country where the seller is located
            name:
              type: string
              description: Name of the seller
            network_id:
              type: string
              description: >-
                Identifier assigned to the seller by the card network. Different
                card networks may assign different network_id fields to the same
                merchant.
            postal_code:
              type: string
              description: Postal code where the seller is located
            state:
              type: string
              description: State where the seller is located
            terminal_id:
              type: string
              description: An ID assigned by the seller to the location of the sale.
            url:
              type: string
              description: URL provided by the merchant on a 3DS request
          x-apifox-orders:
            - category
            - category_code
            - city
            - country
            - name
            - network_id
            - postal_code
            - state
            - terminal_id
            - url
          description: >-
            Details about the seller (grocery store, e-commerce website, etc.)
            involved in this transaction.
          x-apifox-ignore-properties: []
        network_data:
          type: object
          properties:
            authorization_code:
              type: string
              description: >-
                This field will be populated if the authorization message was
                approved.
              nullable: true
            processing_date:
              type: string
              description: （未实现）
              deprecated: true
            transaction_id:
              type: string
              description: The transaction ID from VISA network
          description: >-
            Details about the transaction, such as processing dates, set by the
            card network.
          x-apifox-orders:
            - authorization_code
            - processing_date
            - transaction_id
          x-apifox-ignore-properties: []
        balance_transaction:
          type: string
          deprecated: true
          description: （未实现）ID of the balance transaction associated with this transaction.
        amount_details:
          type: object
          properties: {}
          description: >-
            （未实现）Detailed breakdown of amount components. These amounts are
            denominated in currency and in the smallest currency unit.
          x-apifox-orders: []
          deprecated: true
          x-apifox-ignore-properties: []
        purchase_details:
          type: string
          description: （未实现）
          deprecated: true
        token:
          type: string
          description: （未实现）
          deprecated: true
        wallet:
          type: string
          description: >-
            （未实现）The digital wallet used for this transaction. One of apple_pay,
            google_pay, or samsung_pay.
          deprecated: true
      x-apifox-orders:
        - id
        - object
        - amount
        - authorization
        - card
        - cardholder
        - currency
        - metadata
        - type
        - created
        - dispute
        - livemode
        - merchant_amount
        - merchant_currency
        - merchant_data
        - network_data
        - balance_transaction
        - amount_details
        - purchase_details
        - token
        - wallet
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://apitest.wooshpay.com
    description: 官网测试
security:
  - basic: []

```
