# c-lightning Plugins 04: The listpayments Plugin

Source URL: https://blog.blockstream.com/c-lightning-plugins-04-the-listpayments-plugin
Updated: 2026-11-19T20:13:47.000Z
Author: Rusty Russell
Published: Nov 8, 2019
Category: Lightning Network

---

## Overview

- **Purpose:** Quickly re-enable the listpayments command which was removed in c-lightning 0.7.3
- **Language:** Python
- **Code:** [Twitter](https://twitter.com/rusty%5Ftwit/status/1184680369574023169?s=20)

## The listpayments Plugin

Sometimes the c-lightning APIs have to change: either because we made a mistake in the initial API and it’s frequently misunderstood, or more commonly because it won’t fit with a new feature.

In v0.7.0, released in February 2019, we formally deprecated `listpayments `and replaced it with `listpays`(high-level) and `listsendpay`(low-level). This is anticipation of multi-part payments, where the same payment will be split at the low-level: `listpays` will only show it as a single payment to avoid breaking users.

We remove deprecated features after six months, so in v0.7.3 we finally removed `listpayments` and sure enough, [Spark Wallet](https://github.com/shesek/spark-wallet) broke. I only noticed this a week before release; Shesek rushed to release an update which (among other things) would fix this issue.

### There’s a Plugin for That

I was in transit on the way to the Lightning Conference, and wondered what the minimal fix for this was. Sure enough, c-lightning plugins to the rescue!

The solution was short enough to fit into a [single tweet](https://twitter.com/rusty%5Ftwit/status/1184680369574023169):

![](https://storage.googleapis.com/dxp-staging-assets/blog/body/c-lightning-plugins-04-the-listpayments-plugin/1-fZvakJtIW4lUEtA6Z45lOg.png)

## Technical Details

If you save this file as “listpayments.py” in your `~/.lightning/plugins/` directory, `chmod a+x` it then type `lightning-cli plugins rescan` your c-lightning node will regain the ability to run `listpayments`, and make older Spark Wallet versions happy.

A few hours later, Spark Wallet v0.2.9 was released, making my plugin obsolete. But it was a fun exercise!

## Get Started

You can do similar things to create your own aliases. A user asked me if there was a way to change the default settings for the `invoice` command: not yet, but you can certainly create your own `myinvoice` command by editing the plugin above, and have it call `invoice` with modified arguments!

To learn more about developing powerful plugins on c-lightning check out our [beginners guide](https://lightning.readthedocs.io/PLUGINS.html), or come chat with us on IRC (#c-lightning on [Freenode](https://freenode.net/)).

**This was the first showcase in a series on c-lightning plugins. For a regularly updated list of available articles, [head to our introduction to c-lightning plugins](https://medium.com/@blockstream/c-lighting-plugin-series-da3e9e3f6ff1).**

_Note: This blog was originally posted at <https://medium.com/p/a04c2427c31b>_

## Blog Categories

- [All Posts](https://blog.blockstream.com/)
- [Blockstream Finance](https://blog.blockstream.com/blockstream-finance)
- [Company](https://blog.blockstream.com/company)
- [Lightning Network](https://blog.blockstream.com/lightning-network)
- [Blockstream Mining](https://blog.blockstream.com/blockstream-mining)
- [Blockstream Explorer](https://blog.blockstream.com/blockstream-explorer)
- [Blockstream Satellite](https://blog.blockstream.com/blockstream-satellite)
- [Liquid Network](https://blog.blockstream.com/liquid-network)
- [Blockstream Jade](https://blog.blockstream.com/blockstream-jade)
- [Blockstream AMP](https://blog.blockstream.com/blockstream-amp)
- [Blockstream App](https://blog.blockstream.com/blockstream-app)
- [Blockstream Research](https://blog.blockstream.com/blockstream-research)
- [Cryptocurrency Data Feed](https://blog.blockstream.com/cryptocurrency-data-feed)
- [Elements](https://blog.blockstream.com/elements)
- [Layer-2 Roundup](https://blog.blockstream.com/layer-2-roundup)
- [Quarterly Report](https://blog.blockstream.com/quarterly-report)
- [Layer-2 Report](https://blog.blockstream.com/layer-2-report)
- [Simplicity Language](https://blog.blockstream.com/simplicity-language)
- [Quarterly Update](https://blog.blockstream.com/quarterly-update)
- [Quantum](https://blog.blockstream.com/quantum)
- [Enterprise](https://blog.blockstream.com/enterprise)
- [Insights](https://blog.blockstream.com/insights)
- [Simplicity](https://blog.blockstream.com/simplicity)
- [Developer](https://blog.blockstream.com/developer)
- [Security](https://blog.blockstream.com/security)
- [Jade](https://blog.blockstream.com/jade)
- [Liquid](https://blog.blockstream.com/liquid)
- [Lightning](https://blog.blockstream.com/lightning)
- [Research](https://blog.blockstream.com/research)
- [Core Lightning](https://blog.blockstream.com/core-lightning)
