---
updatedAt: 2025-11-13T14:39:35.000Z
agentTools:
  siteIndex: https://docs.affirm.com/llms.txt
  projectIndex: https://docs.affirm.com/developers/v1.0-Global-Integration/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": "Transactions API",
    "version": "2.0"
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/transactions/{transaction_id}": {
      "post": {
        "tags": [
          "Transactions API"
        ],
        "x-swagger-router-controller": "affirm.http.api.merchant.transaction.v1.api",
        "operationId": "update_transaction",
        "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.",
        "parameters": [
          {
            "in": "path",
            "name": "transaction_id",
            "description": "A unique ID representing the transaction’s loan or charge ID.",
            "required": true,
            "example": "ABCD-1234",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "country-code",
            "description": "Required param to identify the country in which Affirm is used and uses an \"alpha-3\" three-letter country code. Supported countries are the United States (`USA`), Canada (`CAN`), and the United Kingdom (`GBR`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequest"
              }
            }
          },
          "description": "The request body used to update a transaction.",
          "x-nullable": true
        },
        "responses": {
          "200": {
            "description": "HTTP 200 OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionEvent3"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.global.sandbox.affirm.com/api/v1"
    },
    {
      "url": "https://api.global.affirm.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "ErrorBadRequest": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Bad Request",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 400,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "BAD_REQUEST",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "BAD_REQUEST",
            "type": "string"
          },
          "token": {
            "description": "The error response embedded in a JWT token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorNotFound": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Not Found",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 404,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "NOT_FOUND",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "NOT_FOUND",
            "type": "string"
          },
          "token": {
            "description": "The error response embedded in a JWT token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorUnauthorized": {
        "properties": {
          "message": {
            "description": "The error message.",
            "example": "Unauthorized",
            "type": "string"
          },
          "status_code": {
            "description": "The HTTP status code.",
            "example": 401,
            "type": "integer"
          },
          "type": {
            "description": "The error type.",
            "example": "UNAUTHORIZED",
            "type": "string"
          },
          "code": {
            "description": "The error type.",
            "example": "UNAUTHORIZED",
            "type": "string"
          },
          "token": {
            "description": "The error response embedded in a JWT token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateRequest": {
        "type": "object",
        "properties": {
          "order_id": {
            "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",
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "reference_id": {
            "description": "An optional, unique identifier that may be associated with each transaction event and reconciled with the system of record used by the merchant.",
            "example": "W1X2Y3Z4",
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "nullable": true
          },
          "shipping_carrier": {
            "description": "The shipping carrier used to ship the items.",
            "example": "USPS",
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "nullable": true
          },
          "shipping_confirmation": {
            "description": "The tracking number of the shipment.",
            "example": "C12345678901234",
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "nullable": true
          },
          "shipping": {
            "type": "object",
            "properties": {
              "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.",
                    "example": "BC",
                    "maxLength": 2,
                    "minLength": 2
                  },
                  "postal_code": {
                    "type": "string",
                    "description": "The postal code or zipcode of the address.",
                    "example": "V7X 3S9"
                  },
                  "country-code": {
                    "type": "string",
                    "description": "An \"alpha-3\" three-letter country code.",
                    "example": "CAN",
                    "maxLength": 3,
                    "minLength": 3
                  }
                }
              },
              "email": {
                "description": "The email address of the customer.",
                "example": "test@example.com",
                "type": "string",
                "nullable": true
              },
              "name": {
                "type": "object",
                "properties": {
                  "first": {
                    "description": "The first name of the customer.",
                    "type": "string"
                  },
                  "full": {
                    "description": "The full name of the customer, which must contain at least two words.",
                    "type": "string"
                  },
                  "last": {
                    "description": "The last name of the customer.",
                    "type": "string"
                  }
                },
                "nullable": true
              },
              "phone_number": {
                "description": "The phone number of the customer.",
                "example": "1234567890",
                "type": "string",
                "nullable": true
              }
            },
            "nullable": true
          }
        }
      },
      "TransactionEvent3": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of event,such as auth, auth_expired, capture, charge_off, confirm, confirmation_expired, partial_void, refund, refund_voided, split_capture, update, and void.",
            "example": "update",
            "type": "string"
          },
          "created": {
            "description": "The time when the transaction event was created. The value is formatted in RFC 3339.",
            "example": "2019-01-01T00:00:00Z",
            "type": "string"
          },
          "id": {
            "description": "A unique ID for the transaction event.",
            "example": "ABCD-1234",
            "type": "string"
          },
          "order_id": {
            "description": "Identifies the order within the merchant's order management system that this transaction corresponds to.",
            "example": "order_125",
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

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