Skip to main content
PATCH
/
transactions
/
{transaction_id}
Update a transaction
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    discount_id: 'dsc_01gtgztp8fpchantd5g1wrksa3',
    items: [
      {quantity: 50, price_id: 'pri_01gsz91wy9k1yn7kx82aafwvea'},
      {quantity: 1, price_id: 'pri_01gsz96z29d88jrmsf2ztbfgjg'},
      {quantity: 1, price_id: 'pri_01gsz98e27ak2tyhexptwc58yk'}
    ]
  })
};

fetch('https://api.paddle.com/transactions/{transaction_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "id": "txn_01hv8m0mnx3sj85e7gxc6kga03",
    "status": "ready",
    "customer_id": "ctm_01hv6y1jedq4p1n0yqn5ba3ky4",
    "address_id": "add_01hv8gq3318ktkfengj2r75gfx",
    "business_id": null,
    "custom_data": null,
    "origin": "api",
    "collection_mode": "manual",
    "subscription_id": null,
    "invoice_id": "inv_01hv8m0nn5nbvdejcvv9cpg8jf",
    "invoice_number": null,
    "billing_details": {
      "enable_checkout": false,
      "payment_terms": {
        "interval": "day",
        "frequency": 14
      },
      "purchase_order_number": "PO-123",
      "additional_information": null
    },
    "billing_period": {
      "starts_at": "2024-04-12T00:00:00Z",
      "ends_at": "2025-04-11T23:59:00Z"
    },
    "currency_code": "USD",
    "discount_id": "dsc_01gtgztp8fpchantd5g1wrksa3",
    "created_at": "2024-04-12T07:40:38.00704Z",
    "updated_at": "2024-04-12T10:00:03.871169408Z",
    "billed_at": null,
    "revised_at": null,
    "items": [
      {
        "price": {
          "id": "pri_01gsz91wy9k1yn7kx82aafwvea",
          "description": "Annual",
          "type": "standard",
          "name": "Annual (per seat)",
          "product_id": "pro_01gsz4vmqbjk3x4vvtafffd540",
          "billing_cycle": {
            "interval": "year",
            "frequency": 1
          },
          "trial_period": null,
          "tax_mode": "account_setting",
          "unit_price": {
            "amount": "50000",
            "currency_code": "USD"
          },
          "unit_price_overrides": [],
          "custom_data": null,
          "quantity": {
            "minimum": 1,
            "maximum": 100
          },
          "status": "active",
          "created_at": "2023-02-23T13:57:54.249913Z",
          "updated_at": "2024-04-05T14:32:00.471447Z",
          "import_meta": null
        },
        "quantity": 50
      },
      {
        "price": {
          "id": "pri_01gsz96z29d88jrmsf2ztbfgjg",
          "description": "Annual (recurring addon)",
          "type": "standard",
          "name": "Annual (recurring addon)",
          "product_id": "pro_01gsz92krfzy3hcx5h5rtgnfwz",
          "billing_cycle": {
            "interval": "year",
            "frequency": 1
          },
          "trial_period": null,
          "tax_mode": "account_setting",
          "unit_price": {
            "amount": "300000",
            "currency_code": "USD"
          },
          "unit_price_overrides": [],
          "custom_data": null,
          "quantity": {
            "minimum": 1,
            "maximum": 1
          },
          "status": "active",
          "created_at": "2023-02-23T14:00:40.265185Z",
          "updated_at": "2024-03-25T14:31:18.587603Z",
          "import_meta": null
        },
        "quantity": 1
      },
      {
        "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
      }
    ],
    "details": {
      "tax_rates_used": [
        {
          "tax_rate": "0.08875",
          "totals": {
            "subtotal": "2819900",
            "discount": "281990",
            "tax": "225239",
            "total": "2763149"
          }
        }
      ],
      "totals": {
        "subtotal": "2819900",
        "tax": "225239",
        "discount": "281990",
        "total": "2763149",
        "grand_total": "2763149",
        "fee": null,
        "credit": "0",
        "credit_to_balance": "0",
        "balance": "2763149",
        "earnings": null,
        "currency_code": "USD"
      },
      "adjusted_totals": {
        "subtotal": "2537910",
        "tax": "225239",
        "total": "2763149",
        "grand_total": "2763149",
        "fee": "0",
        "earnings": "0",
        "currency_code": "USD"
      },
      "payout_totals": null,
      "adjusted_payout_totals": null,
      "line_items": [
        {
          "id": "txnitm_01hv8vzz0sjdj6grvpxyyjsmvf",
          "price_id": "pri_01gsz91wy9k1yn7kx82aafwvea",
          "quantity": 50,
          "totals": {
            "subtotal": "2500000",
            "tax": "199687",
            "discount": "250000",
            "total": "2449687"
          },
          "product": {
            "id": "pro_01gsz4vmqbjk3x4vvtafffd540",
            "name": "AeroEdit Enterprise",
            "description": "The ultimate solution for organizations, featuring all Pro capabilities plus multi-user support, advanced data storage capabilities, plus personalized onboarding, dedicated account management, and the ability to pay via invoice.",
            "type": "standard",
            "tax_category": "standard",
            "image_url": "https://paddle.s3.amazonaws.com/user/165798/Ws808ziTS76a6YbnMkiK_enterprise.png",
            "custom_data": {
              "features": {
                "aircraft_performance": true,
                "compliance_monitoring": true,
                "flight_log_management": true,
                "payment_by_invoice": true,
                "route_planning": true,
                "sso": true
              },
              "suggested_addons": [],
              "upgrade_description": "Ready to reach new heights? Upgrade to enterprise to unlock single sign-on, payment by invoice, and dedicated account management."
            },
            "status": "active",
            "created_at": "2023-02-23T12:44:34.923Z",
            "updated_at": "2024-04-05T15:58:28.309Z",
            "import_meta": null
          },
          "tax_rate": "0.08875",
          "unit_totals": {
            "subtotal": "50000",
            "tax": "3994",
            "discount": "5000",
            "total": "48994"
          }
        },
        {
          "id": "txnitm_01hv8vzz0sjdj6grvpy1fzm46f",
          "price_id": "pri_01gsz96z29d88jrmsf2ztbfgjg",
          "quantity": 1,
          "totals": {
            "subtotal": "300000",
            "tax": "23962",
            "discount": "30000",
            "total": "293962"
          },
          "product": {
            "id": "pro_01gsz92krfzy3hcx5h5rtgnfwz",
            "name": "VIP support",
            "description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.",
            "type": "standard",
            "tax_category": "standard",
            "image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png",
            "custom_data": null,
            "status": "active",
            "created_at": "2023-02-23T13:58:17.615Z",
            "updated_at": "2024-04-05T15:44:02.893Z",
            "import_meta": null
          },
          "tax_rate": "0.08875",
          "unit_totals": {
            "subtotal": "300000",
            "tax": "23962",
            "discount": "30000",
            "total": "293962"
          }
        },
        {
          "id": "txnitm_01hv8vzz0sjdj6grvpy6g84gyw",
          "price_id": "pri_01gsz98e27ak2tyhexptwc58yk",
          "quantity": 1,
          "totals": {
            "subtotal": "19900",
            "tax": "1590",
            "discount": "1990",
            "total": "19500"
          },
          "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": "1590",
            "discount": "1990",
            "total": "19500"
          }
        }
      ]
    },
    "payments": [],
    "checkout": {
      "url": null
    }
  },
  "meta": {
    "request_id": "ba7c3eb9-e88d-4239-be61-a47b8aceab66"
  }
}

Authorizations

Authorization
string
header
required

Requests are authenticated with API keys. Provide your API key as a Bearer token in the Authorization header.

API keys are assigned permissions, granting them access to entities and operations. Each endpoint may require one or more permissions, defined with the x-permissions extension. Values for include parameters may require specific permissions as defined in the x-enum-permissions extension. See all available permissions in the permission schema or documentation.

Get an API key and select the permissions you need from the Paddle dashboard under Paddle > Developer Tools > Authentication.

Path Parameters

transaction_id
string
required

Paddle ID of the transaction entity to work with.

Example:

"txn_01gw225vv6tjbb5gnt062a3k5v"

Query Parameters

include
enum<string>[]

Include related entities in the response. Use a comma-separated list to specify multiple entities.

Available options:
address,
adjustments,
adjustments_totals,
available_payment_methods,
business,
customer,
discount

Body

application/json

Represents a transaction entity when updating transactions.

status
enum<string>

Status of this transaction. You may set a transaction to billed or canceled. Billed transactions cannot be changed.

For manually-collected transactions, marking as billed is essentially issuing an invoice.

Available options:
draft,
ready,
billed,
paid,
completed,
canceled,
past_due
customer_id
string | null

Paddle ID of the customer that this transaction is for, prefixed with ctm_.

Example:

"ctm_01grnn4zta5a1mf02jjze7y2ys"

address_id
string | null

Paddle ID of the address that this transaction is for, prefixed with add_.

Example:

"add_01gm302t81w94gyjpjpqypkzkf"

business_id
string | null

Paddle ID of the business that this transaction is for, prefixed with biz_.

Example:

"biz_01grrebrzaee2qj2fqqhmcyzaj"

custom_data
Custom data · object

Your own structured key-value data.

Example:
{ "customer_reference_id": "abcd1234" }
currency_code
enum<string> | null

Supported three-letter ISO 4217 currency code. Must be USD, EUR, or GBP if collection_mode is manual.

Available options:
USD,
EUR,
GBP,
JPY,
AUD,
CAD,
CHF,
HKD,
SGD,
SEK,
ARS,
BRL,
CNY,
COP,
CZK,
DKK,
HUF,
ILS,
INR,
KRW,
MXN,
NOK,
NZD,
PLN,
RUB,
THB,
TRY,
TWD,
UAH,
VND,
ZAR
Required string length: 3
collection_mode
enum<string>
default:automatic

How payment is collected for this transaction. automatic for checkout, manual for invoices.

Available options:
automatic,
manual
discount_id
string | null

Paddle ID of the discount applied to this transaction, prefixed with dsc_.

Example:

"dsc_01gv5kpg05xp104ek2fmgjwttf"

billing_details
Billing details (update) · object

Details for invoicing. Required if collection_mode is manual.

billing_period
Time period · object

Time period that this transaction is for. Set automatically by Paddle for subscription renewals to describe the period that charges are for.

items
(Catalog item · object | Non-catalog price for an existing product · object | Non-catalog price and product · object)[]

List of items on this transaction.

When making a request, each object must contain either a price_id or a price object, and a quantity.

Include a price_id to charge for an existing catalog item, or a price object to charge for a non-catalog item.

Required array length: 1 - 100 elements

Add a catalog item to a transaction. In this case, the product and price that you're billing for exist in your product catalog in Paddle.

checkout
TransactionCheckout · object

Paddle Checkout details for this transaction. You may pass a URL when creating or updating an automatically-collected transaction, or when creating or updating a manually-collected transaction where billing_details.enable_checkout is true.

Response

OK

data
TransactionIncludes · object
required

Represents a transaction entity with included entities.

meta
Meta · object
required

Information about this response.