Allow services to signal that API execution has failed, which should free up the payment token and allow it to be used for another API call.
If the X-Charge response header is set to yes, consider the request a success and mark the payment token as spent. If the X-Charge header is set to any other value (normally no), consider the request a failure and mark the payment token as usable.
If the X-Charge response header is not specified,
If the --explicit-charge config option is set, consider the request a failure.
If the --explicit-charge config option is not set, consider the request a success if the status code is 2xx or 3xx, otherwise consider it a failure.
Freeing up the payment token means removing it from the spent table, which means we should log the execution error to a separate (new) table.
This repository is listed on the Awesome Lightning-Network list, which is a collection of useful lightning-network projects. However, it seems that the 'lightning-network' topic is missing from this repository's topics.
Adding the 'lightning-network' topic will help users discover your project more easily and recognize its relevance to the lightning-network ecosystem. To add the topic, please follow these steps:
Navigate to the main page of the repository.
Click on the gear icon next to "About" on the right side of the page.
In the "Topics" section, type 'lightning-network' and press Enter.
Click "Save changes."
Thank you for your attention and for contributing to the lightning-network community!