---
updatedAt: 2026-08-17T16:30:44.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/developers/llms.txt
---

# Update Transaction

Updates a transaction by specifying the values of the parameters passed. Any parameters that you don't provide won't change.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Merchant Transaction API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sandbox.affirm.com/api/v1"
    },
    {
      "url": "https://api.affirm.com/api/v1"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/transactions/{transaction_id}": {
      "post": {
        "tags": [
          "Transactions API"
        ],
        "summary": "Update Transaction",
        "description": "Updates a transaction by specifying the values of the parameters passed. Any parameters that you don't provide won't change.",
        "operationId": "update_transaction",
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "description": "A unique ID representing the transaction’s loan or charge ID.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "ABCD-1234"
            }
          }
        ],
        "requestBody": {
          "description": "The request body used to update a transaction.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              }
            }
          },
          "x-nullable": true
        },
        "responses": {
          "200": {
            "description": "HTTP 200 OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionEvent6"
                }
              }
            }
          },
          "400": {
            "description": "HTTP 400 Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "HTTP 401 Unauthorized",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorUnauthorized"
                }
              }
            }
          },
          "404": {
            "description": "HTTP 404 Not Found",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorNotFound"
                }
              }
            }
          }
        },
        "x-swagger-router-controller": "affirm.http.api.merchant.transaction.v1.api"
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorBadRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message.",
            "example": "Bad Request"
          },
          "status_code": {
            "type": "integer",
            "description": "The HTTP status code.",
            "example": 400
          },
          "type": {
            "type": "string",
            "description": "The error type.",
            "example": "BAD_REQUEST"
          },
          "code": {
            "type": "string",
            "description": "The error type.",
            "example": "BAD_REQUEST"
          }
        }
      },
      "ErrorNotFound": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message.",
            "example": "Not Found"
          },
          "status_code": {
            "type": "integer",
            "description": "The HTTP status code.",
            "example": 404
          },
          "type": {
            "type": "string",
            "description": "The error type.",
            "example": "NOT_FOUND"
          },
          "code": {
            "type": "string",
            "description": "The error type.",
            "example": "NOT_FOUND"
          }
        }
      },
      "ErrorUnauthorized": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message.",
            "example": "Unauthorized"
          },
          "status_code": {
            "type": "integer",
            "description": "The HTTP status code.",
            "example": 401
          },
          "type": {
            "type": "string",
            "description": "The error type.",
            "example": "UNAUTHORIZED"
          },
          "code": {
            "type": "string",
            "description": "The error type.",
            "example": "UNAUTHORIZED"
          }
        }
      },
      "UpdateRequest": {
        "type": "object",
        "properties": {
          "order_id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "description": "Identifies the order within the merchant's order management system that this transaction corresponds to. It is only returned in the response if included in the request.",
            "example": "order_125"
          },
          "reference_id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "description": "An optional, unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.",
            "nullable": true,
            "example": "202307011027"
          },
          "shipping_carrier": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "description": "The shipping carrier used to ship the items.",
            "nullable": true,
            "example": "USPS"
          },
          "shipping_confirmation": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "description": "The tracking number of the shipment.",
            "nullable": true,
            "example": "C12345678901234"
          },
          "shipping": {
            "$ref": "#/components/schemas/UpdateRequest_shipping"
          }
        }
      },
      "TransactionEvent6": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique ID for the transaction event.",
            "example": "ABCD-1234"
          },
          "type": {
            "type": "string",
            "description": "The type of event, such as auth, auth_expired, capture, charge_off, confirm, confirmation_expired, expire_authorization, expire_confirmation, refund, split_capture, update, void, partial_void, and refund_voided.",
            "example": "update"
          },
          "created": {
            "type": "string",
            "description": "The time when the transaction event was created. The value is formatted in RFC 3339.",
            "example": "2019-01-01T00:00:00.000Z"
          },
          "order_id": {
            "type": "string",
            "description": "The Partner Order ID.",
            "example": "order_125"
          }
        }
      },
      "UpdateRequest_shipping_address": {
        "type": "object",
        "properties": {
          "street1": {
            "type": "string",
            "description": "Address line 1 (e.g., street, PO Box, or company name).",
            "example": "123 Example Street"
          },
          "street2": {
            "type": "string",
            "description": "Address line 2 (The apartment#, floor or suite that complements the street address).",
            "example": "Apt 123"
          },
          "city": {
            "type": "string",
            "description": "City of the shipping address.",
            "example": "Vancouver"
          },
          "region1_code": {
            "type": "string",
            "description": "The 2-letter postal abbreviation or two character state code such as CA for California.",
            "example": "BC"
          },
          "postal_code": {
            "type": "string",
            "description": "The postal code or zipcode of the address.",
            "example": "V7X 3S9"
          },
          "country_code": {
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1 alpha-2) such as US for United States or CA for Canada.\"",
            "example": "CA"
          }
        }
      },
      "UpdateRequest_shipping_name": {
        "type": "object",
        "properties": {
          "first": {
            "type": "string",
            "description": "The first name of the customer."
          },
          "full": {
            "type": "string",
            "description": "The full name of the customer, which must contain at least two words."
          },
          "last": {
            "type": "string",
            "description": "The last name of the customer."
          }
        }
      },
      "UpdateRequest_shipping": {
        "type": "object",
        "properties": {
          "address": {
            "$ref": "#/components/schemas/UpdateRequest_shipping_address"
          },
          "email": {
            "type": "string",
            "description": "The email address of the customer.",
            "example": "test@example.com",
            "x-nullable": true
          },
          "name": {
            "$ref": "#/components/schemas/UpdateRequest_shipping_name"
          },
          "phone_number": {
            "type": "string",
            "description": "The phone number of the customer.",
            "nullable": true,
            "example": "1234567890"
          }
        },
        "nullable": true
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```

# Sibling pages

* [List Transactions](https://docs.affirm.com/developers/reference/list_transactions.md)
* [Authorize Transaction](https://docs.affirm.com/developers/reference/authorize_transaction.md)
* [List Transaction Events](https://docs.affirm.com/developers/reference/list_transaction_events.md)
* [Read Transaction](https://docs.affirm.com/developers/reference/read_transaction.md)
* [Capture Transaction](https://docs.affirm.com/developers/reference/capture_transaction.md)
* [Refund Transaction](https://docs.affirm.com/developers/reference/refund_transaction.md)
* [Void Transaction](https://docs.affirm.com/developers/reference/void_transaction.md)
* [List Settlement Events](https://docs.affirm.com/developers/reference/list_settlement_events.md)
* [List Settlement Event Summaries](https://docs.affirm.com/developers/reference/list_settlement_event_summaries.md)