https://github.com/microdevops-com/payment-checker
Script to check payment status for providers like Hetzner and report status to telegram
https://github.com/microdevops-com/payment-checker
hetzner payment redswitches
Last synced: 8 months ago
JSON representation
Script to check payment status for providers like Hetzner and report status to telegram
- Host: GitHub
- URL: https://github.com/microdevops-com/payment-checker
- Owner: microdevops-com
- License: gpl-3.0
- Created: 2025-04-04T06:09:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-04T08:33:35.000Z (about 1 year ago)
- Last Synced: 2025-04-04T09:23:20.795Z (about 1 year ago)
- Topics: hetzner, payment, redswitches
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# payment-checker
## Description
As Hetzner and most of other cool providers do not provide an API to check the payments status, this script can help you to check it regularly, if you have a lot of accounts to check.
Both providers and consumers (us) are interesed to pay in time, but for some reason they just don't.
I even created a ticket to Hetzner to ask them to provide an API to check the payments status, they received it, but no updates yet.
So one can set up this script, check alerts in telegram chat, pay in time, and avoid suspensions.
The script uses playwright framework (headless browser).
Providers supported:
- [Hetzner](https://hetzner.com/)
- [RedSwitches](https://redswitches.com/)
- [Virtual Systems](https://vsys.host/)
- [Scaleway](https://www.scaleway.com/) - they do provide API for billing ❤️
Requirements:
- A working directory to put screenshots to (helps to debug).
- Google Service Account to access Google Sheets API and a Sheet to put checked payments.
- Telegram Bot API token to send messages to Telegram and a chat ID to send messages to.
- Docker.
## Setup
1. Create `secret.json` with Google Service Account to access Google Sheets API to put checked payments in a Google Sheet.
2. Create `config.yaml`, put working directory, google sheets, telegram setings there.
3. Define a list of provider accounts to check in `config.yaml`.
4. Build and run the docker container:
```bash
docker build -t payment-checker .
docker run -it --rm \
-v /home/user/payment-checker/secret.json:/app/secret.json \
-v /home/user/payment-checker/config.yaml:/app/config.yaml \
-v /home/user/payment-checker/screenshots:/app/screenshots payment-checker
```
6. Create a cron job like this to check the payments daily in the morning:
```
15 9 * * * docker run --rm -v /home/user/payment-checker/secret.json:/app/secret.json -v /home/user/payment-checker/config.yaml:/app/config.yaml -v /home/user/payment-checker/screenshots:/app/screenshots payment-checker > /home/user/payment-checker/cron.log 2>&1
```