const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paddle.com/subscriptions/{subscription_id}/update-payment-method-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "txn_01jspbekkwn03q6zp8bezp3tv2",
"status": "ready",
"customer_id": "ctm_01jspbafm96p2ppbe85921nf6p",
"address_id": "add_01jspbafmrn485m030p7kx9dbr",
"business_id": null,
"custom_data": null,
"origin": "subscription_payment_method_change",
"collection_mode": "automatic",
"subscription_id": "sub_01jspbbyjtkycfmjf7ye85yvp2",
"invoice_id": null,
"invoice_number": null,
"discount_id": null,
"billing_details": null,
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-04-25T11:29:46.915899Z"
},
"currency_code": "USD",
"created_at": "2025-04-25T11:31:14.986430069Z",
"updated_at": "2025-04-25T11:31:14.986430069Z",
"billed_at": null,
"revised_at": null,
"items": [
{
"price": {
"id": "pri_01jspaymrp8mpq0fxdgwxy5vwh",
"product_id": "pro_01jspay5m2ry6s10w1m9xfthvz",
"type": "standard",
"description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.",
"name": "AeroEdit VIP",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"tax_mode": "account_setting",
"unit_price": {
"amount": "30000",
"currency_code": "USD"
},
"unit_price_overrides": [],
"custom_data": null,
"status": "active",
"quantity": {
"minimum": 1,
"maximum": 1
},
"import_meta": null,
"created_at": "2025-04-25T11:22:31.574394Z",
"updated_at": "2025-04-25T11:22:31.574395Z"
},
"quantity": 1,
"proration": {
"rate": "0",
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-05-25T11:29:46.915899Z"
}
}
}
],
"details": {
"tax_rates_used": [
{
"tax_rate": "0.08875",
"totals": {
"subtotal": "0",
"discount": "0",
"tax": "0",
"total": "0"
}
}
],
"totals": {
"subtotal": "0",
"tax": "0",
"discount": "0",
"total": "0",
"fee": null,
"credit": "0",
"credit_to_balance": "0",
"balance": "0",
"grand_total": "0",
"earnings": null,
"currency_code": "USD"
},
"adjusted_totals": {
"subtotal": "0",
"tax": "0",
"total": "0",
"grand_total": "0",
"fee": null,
"earnings": null,
"currency_code": "USD"
},
"payout_totals": null,
"adjusted_payout_totals": null,
"line_items": [
{
"id": "txnitm_01jspbekwp0ajkz6qxj4wdmzf3",
"price_id": "pri_01jspaymrp8mpq0fxdgwxy5vwh",
"quantity": 1,
"totals": {
"subtotal": "0",
"tax": "0",
"discount": "0",
"total": "0"
},
"product": {
"id": "pro_01jspay5m2ry6s10w1m9xfthvz",
"name": "AeroEdit VIP",
"type": "standard",
"tax_category": "standard",
"description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.",
"image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png",
"custom_data": null,
"status": "active",
"import_meta": null,
"created_at": "2025-04-25T11:22:16.066Z",
"updated_at": "2025-04-25T11:22:16.066Z"
},
"tax_rate": "0.08875",
"unit_totals": {
"subtotal": "0",
"discount": "0",
"tax": "0",
"total": "0"
},
"proration": {
"rate": "0",
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-05-25T11:29:46.915899Z"
}
}
}
]
},
"payments": [],
"checkout": {
"url": "https://aeroedit.com/pay?_ptxn=txn_01hv8zbfzrnfr6b4hfexhk4e7h"
},
"customer": {
"id": "ctm_01jspbafm96p2ppbe85921nf6p",
"name": null,
"email": "[email protected]",
"locale": "en",
"marketing_consent": false,
"custom_data": null,
"status": "active",
"created_at": "2025-04-25T11:28:59.529Z",
"updated_at": "2025-04-25T11:28:59.529Z",
"import_meta": null
},
"address": {
"id": "add_01jspbafmrn485m030p7kx9dbr",
"customer_id": "ctm_01jspbafm96p2ppbe85921nf6p",
"description": null,
"first_line": null,
"second_line": null,
"city": null,
"postal_code": "10021",
"region": null,
"country_code": "US",
"status": "active",
"custom_data": null,
"import_meta": null,
"created_at": "2025-04-25T11:28:59.544Z",
"updated_at": "2025-04-25T11:28:59.544Z"
},
"adjustments_totals": {
"subtotal": "0",
"tax": "0",
"total": "0",
"fee": "0",
"earnings": "0",
"breakdown": {
"credit": "0",
"refund": "0",
"chargeback": "0"
},
"currency_code": "USD"
},
"available_payment_methods": [
"apple_pay",
"card",
"paypal",
"google_pay"
]
},
"meta": {
"request_id": "c73663c7-7308-4af5-9cf2-4cc9f7372196"
}
}Returns a transaction that you can pass to a checkout to let customers update their payment details. Only for subscriptions where collection_mode is automatic.
The transaction returned depends on the status of the related subscription:
past_due, it returns the most recent past_due transaction.active, it creates a new zero amount transaction for the items on a subscription.You can use the returned checkout.url, or pass the returned transaction ID to Paddle.js to open a checkout to present customers with a way of updating their payment details.
The customer, address, business, discount, adjustments and adjustments_totals properties are only returned in the response if the API key has read permissions for those related entities.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paddle.com/subscriptions/{subscription_id}/update-payment-method-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "txn_01jspbekkwn03q6zp8bezp3tv2",
"status": "ready",
"customer_id": "ctm_01jspbafm96p2ppbe85921nf6p",
"address_id": "add_01jspbafmrn485m030p7kx9dbr",
"business_id": null,
"custom_data": null,
"origin": "subscription_payment_method_change",
"collection_mode": "automatic",
"subscription_id": "sub_01jspbbyjtkycfmjf7ye85yvp2",
"invoice_id": null,
"invoice_number": null,
"discount_id": null,
"billing_details": null,
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-04-25T11:29:46.915899Z"
},
"currency_code": "USD",
"created_at": "2025-04-25T11:31:14.986430069Z",
"updated_at": "2025-04-25T11:31:14.986430069Z",
"billed_at": null,
"revised_at": null,
"items": [
{
"price": {
"id": "pri_01jspaymrp8mpq0fxdgwxy5vwh",
"product_id": "pro_01jspay5m2ry6s10w1m9xfthvz",
"type": "standard",
"description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.",
"name": "AeroEdit VIP",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"tax_mode": "account_setting",
"unit_price": {
"amount": "30000",
"currency_code": "USD"
},
"unit_price_overrides": [],
"custom_data": null,
"status": "active",
"quantity": {
"minimum": 1,
"maximum": 1
},
"import_meta": null,
"created_at": "2025-04-25T11:22:31.574394Z",
"updated_at": "2025-04-25T11:22:31.574395Z"
},
"quantity": 1,
"proration": {
"rate": "0",
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-05-25T11:29:46.915899Z"
}
}
}
],
"details": {
"tax_rates_used": [
{
"tax_rate": "0.08875",
"totals": {
"subtotal": "0",
"discount": "0",
"tax": "0",
"total": "0"
}
}
],
"totals": {
"subtotal": "0",
"tax": "0",
"discount": "0",
"total": "0",
"fee": null,
"credit": "0",
"credit_to_balance": "0",
"balance": "0",
"grand_total": "0",
"earnings": null,
"currency_code": "USD"
},
"adjusted_totals": {
"subtotal": "0",
"tax": "0",
"total": "0",
"grand_total": "0",
"fee": null,
"earnings": null,
"currency_code": "USD"
},
"payout_totals": null,
"adjusted_payout_totals": null,
"line_items": [
{
"id": "txnitm_01jspbekwp0ajkz6qxj4wdmzf3",
"price_id": "pri_01jspaymrp8mpq0fxdgwxy5vwh",
"quantity": 1,
"totals": {
"subtotal": "0",
"tax": "0",
"discount": "0",
"total": "0"
},
"product": {
"id": "pro_01jspay5m2ry6s10w1m9xfthvz",
"name": "AeroEdit VIP",
"type": "standard",
"tax_category": "standard",
"description": "Get exclusive access to our expert team of product specialists, available to help you make the most of your AeroEdit subscription.",
"image_url": "https://paddle.s3.amazonaws.com/user/165798/qgyipKJwRtq98YNboipo_vip-support.png",
"custom_data": null,
"status": "active",
"import_meta": null,
"created_at": "2025-04-25T11:22:16.066Z",
"updated_at": "2025-04-25T11:22:16.066Z"
},
"tax_rate": "0.08875",
"unit_totals": {
"subtotal": "0",
"discount": "0",
"tax": "0",
"total": "0"
},
"proration": {
"rate": "0",
"billing_period": {
"starts_at": "2025-04-25T11:29:46.915899Z",
"ends_at": "2025-05-25T11:29:46.915899Z"
}
}
}
]
},
"payments": [],
"checkout": {
"url": "https://aeroedit.com/pay?_ptxn=txn_01hv8zbfzrnfr6b4hfexhk4e7h"
},
"customer": {
"id": "ctm_01jspbafm96p2ppbe85921nf6p",
"name": null,
"email": "[email protected]",
"locale": "en",
"marketing_consent": false,
"custom_data": null,
"status": "active",
"created_at": "2025-04-25T11:28:59.529Z",
"updated_at": "2025-04-25T11:28:59.529Z",
"import_meta": null
},
"address": {
"id": "add_01jspbafmrn485m030p7kx9dbr",
"customer_id": "ctm_01jspbafm96p2ppbe85921nf6p",
"description": null,
"first_line": null,
"second_line": null,
"city": null,
"postal_code": "10021",
"region": null,
"country_code": "US",
"status": "active",
"custom_data": null,
"import_meta": null,
"created_at": "2025-04-25T11:28:59.544Z",
"updated_at": "2025-04-25T11:28:59.544Z"
},
"adjustments_totals": {
"subtotal": "0",
"tax": "0",
"total": "0",
"fee": "0",
"earnings": "0",
"breakdown": {
"credit": "0",
"refund": "0",
"chargeback": "0"
},
"currency_code": "USD"
},
"available_payment_methods": [
"apple_pay",
"card",
"paypal",
"google_pay"
]
},
"meta": {
"request_id": "c73663c7-7308-4af5-9cf2-4cc9f7372196"
}
}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.
Paddle ID of the subscription entity to work with.
"sub_01gvne45dvdhg5gdxrz6hh511r"