# POST /transactions/{transaction_id}/revise

**Revise customer information on a billed or completed transaction**

Revises customer information for a billed or completed transaction.

Revise a transaction to rectify incorrect customer, address, or business information on invoice documents generated by Paddle.

You can revise transaction details that don't impact the tax rates on a transaction. This includes:

* Customer name
* Business name and tax or VAT number (`tax_identifier`)
* Address details, apart from the country

You can't remove a valid tax or VAT number, only replace it with another valid one. If a valid tax or VAT number is added, Paddle automatically creates an adjustment to refund any tax where applicable.

Transactions can only be revised once.

If successful, your response includes a copy of the transaction entity. [Get a transaction](https://developer.paddle.com/api-reference/transactions/get-transaction) using the `include` parameter with the `customer`, `address`, and `business` values to see the revised customer information.

Only the customer information for this transaction is updated. The related customer, address, and business entities aren't updated.

**Required permissions:** `transaction.write`

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `transaction_id` | string | required | Paddle ID of the transaction entity to work with. |

## Request body

- `customer`: object — Revised customer information for this transaction.
  - `name`: string — Revised name of the customer for this transaction. (Max length: 1024)
- `business`: object — Revised business information for this transaction.
  - `name`: string — Revised name of the business for this transaction. (Max length: 1024)
  - `tax_identifier`: string — Revised tax or VAT number for this transaction. You can't remove a valid tax or VAT number, only replace it with another valid one. Paddle automatically creates an adjustment to refund any tax where applicable. (Max length: 1024)
- `address`: object — Revised address information for this transaction.
  - `first_line`: string — Revised first line of the address for this transaction. (Max length: 1024)
  - `second_line` — Revised second line of the address for this transaction. (Max length: 1024)
  - `city`: string — Revised city of the address for this transaction. (Max length: 200)
  - `region`: string — Revised state, county, or region of the address for this transaction. (Max length: 200)

### Request example

```json
{
  "customer": {
    "name": "Sam Miller"
  },
  "business": {
    "tax_identifier": "AB0123456789"
  },
  "address": {
    "first_line": "3811 Ditmars Blvd"
  }
}
```

## Response (200)

- `data`: object (required) — Represents a transaction entity.
  - `id`: string (required) — Unique Paddle ID for this transaction entity, prefixed with `txn_`. (pattern: `^txn_[a-z\d]{26}$`)
  - `status`: string (required) — Status of this transaction. You may set a transaction to `billed` or `canceled`, other statuses are set automatically by Paddle. Automatically-collected transactions may return `completed` if payment is captured successfully, or `past_due` if payment failed.
  - `customer_id` (required) — Paddle ID of the customer that this transaction is for, prefixed with `ctm_`.
  - `address_id` (required) — Paddle ID of the address that this transaction is for, prefixed with `add_`.
  - `business_id` (required) — Paddle ID of the business that this transaction is for, prefixed with `biz_`.
  - `custom_data` (required) — Your own structured key-value data.
  - `currency_code`: string (required) — Supported three-letter ISO 4217 currency code. Must be `USD`, `EUR`, or `GBP` if `collection_mode` is `manual`.
  - `origin` (required) — Describes how this transaction was created.
  - `subscription_id` (required) — Paddle ID of the subscription that this transaction is for, prefixed with `sub_`.
  - `invoice_id` (required) — Paddle ID of the invoice that this transaction is related to, prefixed with `inv_`. Used for compatibility with the Paddle Invoice API, which is now deprecated. This field is scheduled to be removed in the next version of the Paddle API. (pattern: `^inv_[a-z\d]{26}$`)
  - `invoice_number` (required) — Invoice number for this transaction. Automatically generated by Paddle when you mark a transaction as `billed` where `collection_mode` is `manual`.
  - `collection_mode`: string (required) — How payment is collected for this transaction. `automatic` for checkout, `manual` for invoices.
  - `discount_id` (required) — Paddle ID of the discount applied to this transaction, prefixed with `dsc_`.
  - `billing_details` (required) — Details for invoicing. Required if `collection_mode` is `manual`.
  - `billing_period` (required) — Time period that this transaction is for. Set automatically by Paddle for subscription renewals to describe the period that charges are for.
  - `items`: array (required) — List of items on this transaction. For calculated totals, use `details.line_items`. (Items: 1–100)
  - `details`: object (required) — Calculated totals for a transaction, including proration, discounts, tax, and currency conversion. Considered the source of truth for totals on a transaction.
    - `tax_rates_used`: array (required) — List of tax rates applied for this transaction.
    - `totals`: object (required) — Breakdown of the total for a transaction. These numbers can be negative when dealing with subscription updates that result in credit.
      - `subtotal`: string (required) — Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity.
      - `discount`: string (required) — Total discount as a result of any discounts applied.

Except for percentage discounts, Paddle applies tax to discounts based on the line item `price.tax_mode`. If `price.tax_mode` for a line item is `internal`, Paddle removes tax from the discount applied.
      - `tax`: string (required) — Total tax on the subtotal.
      - `total`: string (required) — Total after discount and tax.
      - `credit`: string (required) — Total credit applied to this transaction. This includes credits applied using a customer's credit balance and adjustments to a `billed` transaction.
      - `credit_to_balance`: string (required) — Additional credit generated from negative `details.line_items`. This credit is added to the customer balance.
      - `balance`: string (required) — Total due on a transaction after credits and any payments.
      - `grand_total`: string (required) — Total due on a transaction after credits but before any payments.
      - `grand_total_tax`: string (required) — Net tax amount included in `grand_total`. Equals the full `tax` amount unless credits are applied, in which case this value is proportionally reduced.
      - `fee` (required) — Total fee taken by Paddle for this transaction. `null` until the transaction is `completed` and the fee is processed.
      - `earnings` (required) — Total earnings for this transaction. This is the total minus the Paddle fee. `null` until the transaction is `completed` and the fee is processed.
      - `currency_code`: string (required) — Three-letter ISO 4217 currency code of the currency used for this transaction.
    - `adjusted_totals`: object (required) — Breakdown of the totals for a transaction after adjustments.
      - `subtotal`: string (required) — Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity.
      - `tax`: string (required) — Total tax on the subtotal.
      - `total`: string (required) — Total after tax.
      - `grand_total`: string (required) — Total due after credits but before any payments.
      - `grand_total_tax`: string (required) — Net tax amount included in `grand_total`. Equals the full `tax` amount unless credits are applied, in which case this value is proportionally reduced.
      - `fee` (required) — Total fee taken by Paddle for this transaction. `null` until the transaction is `completed` and the fee is processed.
      - `retained_fee`: string (required) — Total Paddle fees retained for this adjustment.
      - `earnings` (required) — Total earnings for this transaction. This is the total minus the Paddle fee.
`null` until the transaction is `completed` and the fee is processed.
      - `currency_code`: string (required) — Three-letter ISO 4217 currency code of the currency used for this transaction.
    - `payout_totals` (required) — Breakdown of the payout total for a transaction. `null` until the transaction is `completed`. Returned in your payout currency.
    - `adjusted_payout_totals` (required) — Breakdown of the payout total for a transaction after adjustments. `null` until the transaction is `completed`.
    - `line_items`: array (required) — Information about line items for this transaction. Different from transaction `items` as they include totals calculated by Paddle. Considered the source of truth for line item totals.
  - `payments`: array (required) — List of payment attempts for this transaction, including successful payments. Sorted by `created_at` in descending order, so most recent attempts are returned first.
  - `checkout` (required)
  - `created_at`: string (date-time) (required) — RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
  - `updated_at`: string (date-time) (required) — RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
  - `billed_at` (required) — RFC 3339 datetime string of when this transaction was marked as `billed`. `null` for transactions that aren't `billed` or `completed`. Set automatically by Paddle.
  - `revised_at` (required) — RFC 3339 datetime string of when a transaction was revised. Revisions describe an update to customer information for a billed or completed transaction. `null` if not revised. Set automatically by Paddle.
- `meta`: object (required) — Information about this response.
  - `request_id`: string (required) — Unique ID for the request relating to this response. Provide this when contacting Paddle support about a specific request.

### Response example

```json
{
  "data": {
    "id": "txn_01hv8wptq8987qeep44cyrewp9",
    "status": "completed",
    "customer_id": "ctm_01hv8wt8nffez4p2t6typn4a5j",
    "address_id": "add_01hv8wt8ny8ms5vtm71bj8vcdd",
    "business_id": null,
    "custom_data": null,
    "origin": "web",
    "collection_mode": "automatic",
    "subscription_id": "sub_01hv8x29kz0t586xy6zn1a62ny",
    "invoice_id": "inv_01hv8x29nsh54c2pgt0hnq0zkx",
    "invoice_number": "325-10566",
    "billing_details": null,
    "billing_period": {
      "starts_at": "2024-04-12T10:18:47.635628Z",
      "ends_at": "2024-05-12T10:18:47.635628Z"
    },
    "currency_code": "USD",
    "discount_id": null,
    "created_at": "2024-04-12T10:12:33.2014Z",
    "updated_at": "2024-07-26T08:46:00.746349Z",
    "billed_at": "2024-04-12T10:18:48.294633Z",
    "revised_at": "2024-07-26T08:46:00.746349Z",
    "items": [
      {
        "price": {
          "id": "pri_01gsz8x8sawmvhz1pv30nge1ke",
          "description": "Monthly",
          "type": "standard",
          "name": "Monthly (per seat)",
          "product_id": "pro_01gsz4t5hdjse780zja8vvr7jg",
          "billing_cycle": {
            "interval": "month",
            "frequency": 1
          },
          "trial_period": null,
          "tax_mode": "account_setting",
          "unit_price": {
            "amount": "3000",
            "currency_code": "USD"
          },
          "unit_price_overrides": [],
          "custom_data": null,
          "quantity": {
            "minimum": 1,
            "maximum": 999
          },
          "status": "active",
          "created_at": "2023-02-23T13:55:22.538367Z",
          "updated_at": "2024-04-11T13:54:52.254748Z",
          "import_meta": null
        },
        "quantity": 10,
        "proration": null
      },
      {
        "price": {
          "id": "pri_01h1vjfevh5etwq3rb416a23h2",
          "description": "Monthly",
          "type": "standard",
          "name": "Monthly (recurring addon)",
          "product_id": "pro_01h1vjes1y163xfj1rh1tkfb65",
          "billing_cycle": {
            "interval": "month",
            "frequency": 1
          },
          "trial_period": null,
          "tax_mode": "account_setting",
          "unit_price": {
            "amount": "10000",
            "currency_code": "USD"
          },
          "unit_price_overrides": [],
          "custom_data": null,
          "quantity": {
            "minimum": 1,
            "maximum": 100
          },
          "status": "active",
          "created_at": "2023-06-01T13:31:12.625056Z",
          "updated_at": "2024-04-09T07:23:00.907834Z",
          "import_meta": null
        },
        "quantity": 1,
        "proration": null
      },
      {
        "price": {
          "id": "pri_01gsz98e27ak2tyhexptwc58yk",
          "description": "One-time addon",
          "type": "standard",
          "name": "One-time addon",
          "product_id": "pro_01gsz97mq9pa4fkyy0wqenepkz",
          "billing_cycle": null,
          "trial_period": null,
          "tax_mode": "account_setting",
          "unit_price": {
            "amount": "19900",
            "currency_code": "USD"
          },
          "unit_price_overrides": [],
          "custom_data": null,
          "quantity": {
            "minimum": 1,
            "maximum": 1
          },
          "status": "active",
          "created_at": "2023-02-23T14:01:28.391712Z",
          "updated_at": "2024-04-09T07:23:10.921392Z",
          "import_meta": null
        },
        "quantity": 1,
        "proration": null
      }
    ],
    "details": {
      "tax_rates_used": [
        {
          "tax_rate": "0.08875",
          "totals": {
            "subtotal": "59900",
            "discount": "0",
            "tax": "5315",
            "total": "65215"
          }
        }
      ],
      "totals": {
        "subtotal": "59900",
        "tax": "5315",
        "discount": "0",
        "total": "65215",
        "grand_total": "65215",
        "grand_total_tax": "5315",
        "fee": "3311",
        "credit": "0",
        "credit_to_balance": "0",
        "balance": "0",
        "earnings": "56589",
        "currency_code": "USD"
      },
      "adjusted_totals": {
        "subtotal": "59900",
        "tax": "5315",
        "total": "65215",
        "grand_total": "65215",
        "grand_total_tax": "5315",
        "fee": "3311",
        "earnings": "56589",
        "currency_code": "USD",
        "retained_fee": "0"
      },
      "payout_totals": {
        "subtotal": "59900",
        "discount": "0",
        "tax": "5315",
        "total": "65215",
        "credit": "0",
        "credit_to_balance": "0",
        "balance": "0",
        "grand_total": "65215",
        "grand_total_tax": "5315",
        "fee": "3311",
        "earnings": "56589",
        "currency_code": "USD",
        "exchange_rate": "1",
        "fee_rate": "0.05"
      },
      "adjusted_payout_totals": {
        "subtotal": "59900",
        "tax": "5315",
        "total": "65215",
        "fee": "3311",
        "retained_fee": "0",
        "chargeback_fee": {
          "amount": "0",
          "original": null
        },
        "earnings": "56589",
        "currency_code": "USD",
        "exchange_rate": "1"
      },
      "line_items": [
        {
          "id": "txnitm_01hv8wt98jahpbm1t1tzr06z6n",
          "price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke",
          "quantity": 10,
          "totals": {
            "subtotal": "30000",
            "tax": "2662",
            "discount": "0",
            "total": "32662"
          },
          "product": {
            "id": "pro_01gsz4t5hdjse780zja8vvr7jg",
            "name": "AeroEdit Pro",
            "description": "Designed for professional pilots, including all features plus in Basic plus compliance monitoring, route optimization, and third-party integrations.",
            "type": "standard",
            "tax_category": "standard",
            "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png",
            "custom_data": {
              "features": {
                "aircraft_performance": true,
                "compliance_monitoring": true,
                "flight_log_management": true,
                "payment_by_invoice": false,
                "route_planning": true,
                "sso": false
              },
              "suggested_addons": [
                "pro_01h1vjes1y163xfj1rh1tkfb65",
                "pro_01gsz97mq9pa4fkyy0wqenepkz"
              ],
              "upgrade_description": "Move from Basic to Pro to take advantage of aircraft performance, advanced route planning, and compliance monitoring."
            },
            "status": "active",
            "created_at": "2023-02-23T12:43:46.605Z",
            "updated_at": "2024-04-05T15:53:44.687Z",
            "import_meta": null
          },
          "tax_rate": "0.08875",
          "unit_totals": {
            "subtotal": "3000",
            "tax": "266",
            "discount": "0",
            "total": "3266"
          },
          "proration": null
        },
        {
          "id": "txnitm_01hv8wt98jahpbm1t1v1sd067y",
          "price_id": "pri_01h1vjfevh5etwq3rb416a23h2",
          "quantity": 1,
          "totals": {
            "subtotal": "10000",
            "tax": "887",
            "discount": "0",
            "total": "10887"
          },
          "product": {
            "id": "pro_01h1vjes1y163xfj1rh1tkfb65",
            "name": "Analytics addon",
            "description": "Unlock advanced insights into your flight data with enhanced analytics and reporting features. Includes customizable reporting templates and trend analysis across flights.",
            "type": "standard",
            "tax_category": "standard",
            "image_url": "https://paddle.s3.amazonaws.com/user/165798/97dRpA6SXzcE6ekK9CAr_analytics.png",
            "custom_data": null,
            "status": "active",
            "created_at": "2023-06-01T13:30:50.302Z",
            "updated_at": "2024-04-05T15:47:17.163Z",
            "import_meta": null
          },
          "tax_rate": "0.08875",
          "unit_totals": {
            "subtotal": "10000",
            "tax": "887",
            "discount": "0",
            "total": "10887"
          },
          "proration": null
        },
        {
          "id": "txnitm_01hv8wt98jahpbm1t1v67vqnb6",
          "price_id": "pri_01gsz98e27ak2tyhexptwc58yk",
          "quantity": 1,
          "totals": {
            "subtotal": "19900",
            "tax": "1766",
            "discount": "0",
            "total": "21666"
          },
          "product": {
            "id": "pro_01gsz97mq9pa4fkyy0wqenepkz",
            "name": "Custom domains",
            "description": "Make AeroEdit truly your own with custom domains. Custom domains reinforce your brand identity and make it easy for your team to access your account.",
            "type": "standard",
            "tax_category": "standard",
            "image_url": "https://paddle.s3.amazonaws.com/user/165798/XIG7UXoJQHmlIAiKcnkA_custom-domains.png",
            "custom_data": null,
            "status": "active",
            "created_at": "2023-02-23T14:01:02.441Z",
            "updated_at": "2024-04-05T15:43:28.971Z",
            "import_meta": null
          },
          "tax_rate": "0.08875",
          "unit_totals": {
            "subtotal": "19900",
            "tax": "1766",
            "discount": "0",
            "total": "21666"
          },
          "proration": null
        }
      ]
    },
    "payments": [
      {
        "payment_attempt_id": "937640dd-e3dc-40df-a16c-bb75aafd8f71",
        "stored_payment_method_id": "281ff2ca-8550-42b9-bf39-15948e7de62d",
        "payment_method_id": "paymtd_01hv8x1tpjfnttxddw73xnqx6s",
        "amount": "65215",
        "status": "captured",
        "error_code": null,
        "method_details": {
          "type": "card",
          "underlying_details": null,
          "south_korea_local_card": null,
          "card": {
            "type": "visa",
            "last4": "3184",
            "expiry_month": 1,
            "expiry_year": 2025,
            "cardholder_name": "Michael McGovern"
          },
          "paypal": null
        },
        "created_at": "2024-04-12T10:18:33.579142Z",
        "captured_at": "2024-04-12T10:18:47.635628Z"
      },
      {
        "payment_attempt_id": "8f72cfa6-26b4-4a57-91dc-8f2708f7822d",
        "stored_payment_method_id": "a78ece50-356f-4e0c-b72d-ad5368b0a0d9",
        "payment_method_id": "paymtd_01hv8wx2mka7dfsqjjsxh1ne7z",
        "amount": "65215",
        "status": "error",
        "error_code": "declined",
        "method_details": {
          "type": "card",
          "underlying_details": null,
          "south_korea_local_card": null,
          "card": {
            "type": "visa",
            "last4": "0002",
            "expiry_month": 1,
            "expiry_year": 2025,
            "cardholder_name": "Michael McGovern"
          },
          "paypal": null
        },
        "created_at": "2024-04-12T10:15:57.888183Z",
        "captured_at": null
      }
    ],
    "checkout": {
      "url": "https://aeroedit.com/pay?_ptxn=txn_01hv8wptq8987qeep44cyrewp9"
    }
  },
  "meta": {
    "request_id": "d6186f6a-70f7-4f1c-a65a-f790f940cf6e"
  }
}
```
