- Open your subscriptions page:
https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_=mys_nav_op_D
- Paste into devtools console
- Wait a few moments, and then refresh/repeat for any additional pages
- Confirm by checking to see if you've received cancellation emails
await Promise.all([...document.querySelectorAll('[data-subscription-id]')]
.map(el => el.getAttribute('data-subscription-id'))
.map(async (subscriptionId) => {
try {
const res = await fetch(`https://www.amazon.com/auto-deliveries/ajax/cancelSubscription?deviceType=desktop&deviceContext=web&subscriptionId=${subscriptionId}`)
const cancelPanel = await res.text()
const div = document.createElement('div')
div.innerHTML = cancelPanel
document.body.appendChild(div)
const form = div.querySelector("form[name='cancelForm']")
if (form) {
const formData = new FormData(form)
const formEntries = Object.fromEntries(formData.entries())
await fetch(form.action, {
method: form.method,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams(formEntries)
})
div.remove()
}
return 'ok'
} catch (reason) {
return `error: ${reason}`
}
})
)
This script was a lifesaver! Thank you! Works for different domains too. Just needed to change from
.com
to.com.au
.