Awesome Go

payme

CategoryFinancial
SubcategoryFinancial
Stars92

QR code generator (ASCII & PNG) for SEPA payments

About payme

QR code generator (ASCII & PNG) for SEPA payments

PkgGoDev Go Report Card Go Coverage

What is this?

This tool makes it easier for people (in Europe) to pay with bank transfers. It does not serve as a payment gateway or anything similar. It does no payment verification at all, it simply provides the necessary payment information in a QR code, which may be scanned by the person who wants to pay.

The QR code contains the information necessary for a bank transaction in the form of a SEPA credit transfer. It can be used to prefill the transaction form if your banking app supports payment by QR code.

The process of generating the QR code is entirely local and offline. It can be printed in ASCII in the terminal, or exported as a PNG for inclusion in eg. a web page or a mail.

One QR code can be used without limit, but will always contain the same payment information: amount, remittance message, destination account. More than one person can scan the same code to pay the same amount (eg. split a bill with friends), or one person can scan the code on a recurring base (eg. you pay your internet invoice every month and it's a fixed price)

Install

$ go install github.com/jovandeginste/payme/cmd/payme@latest

Or build it from source:

$ make build

Usage:

Generate SEPA payment QR code

Usage:
  payme [flags]
  payme [command]

Available Commands:
  completion  Generate completion script
  help        Help about any command

Flags:
      --amount float              Amount of the transaction (0 = no amount)
      --bic string                BIC of the beneficiary
      --character-set int         QR code character set (default 2)
      --debug[=true|false]        print debug output
      --file string               write code to file, leave empty for stdout
  -h, --help[=true|false]         help for payme
      --iban string               IBAN of the beneficiary
      --name string               Name of the beneficiary
      --output string             output type: stdout, png, sixel or kitty (default "stdout")
      --purpose string            Purpose of the transaction
      --qr-version int            QR code version (default 2)
      --remittance string         Remittance (message)
      --structured[=true|false]   Make the remittance (message) structured
  -v, --version[=true|false]      version for payme

Use "payme [command] --help" for more information about a command.

You can set some default values in your ENV, eg.:

export PAYME_IBAN=DE71110220330123456789
export PAYME_NAME="Franz Mustermänn"
export PAYME_BIC=BHBLDEHHXXX

Generate QR code as text, print on the console:

$ payme \
  --name "Franz Mustermänn" \
  --iban "DE71110220330123456789" \
  --amount 12.3 \
  --remittance "RF18539007547034"

Generate a QR code without a fixed amount, so the payer can enter it:

$ payme \
  --name "Franz Mustermänn" \
  --iban "DE71110220330123456789" \
  --remittance "RF18539007547034"

Generate QR code as png, save as file:

$ payme \
  --name "Franz Mustermänn" \
  --iban "DE71110220330123456789" \
  --amount 12.3 \
  --remittance "RF18539007547034" \
  --output png \
  --file QR.png

Generate a sixel QR code for terminals with sixel support:

$ payme \
  --name "Franz Mustermänn" \
  --iban "DE71110220330123456789" \
  --amount 12.3 \
  --remittance "RF18539007547034" \
  --output sixel

If sixel support cannot be detected, payme refuses to write sixel output to the terminal. Use --file to write the escape sequence to a file instead.

Generate a QR code with the kitty graphics protocol (Kitty, Ghostty, WezTerm, ...):

$ payme \
  --name "Franz Mustermänn" \
  --iban "DE71110220330123456789" \
  --amount 12.3 \
  --remittance "RF18539007547034" \
  --output kitty

Support

Please provide feedback if your banking app supports or does not support these QR codes.

The QR code is tested with the mobile apps of these banks:

Belgium

BankSupport
BelfiusYes
FortisProblems with characters in the remittance
KBCYes

References

Frequently Asked Questions

What is payme?

payme is a Financial library for the Go programming language. QR code generator (ASCII & PNG) for SEPA payments

How do I install payme?

Install payme with the Go module system using `go get jovandeginste/payme`. Check the repository for the current installation instructions.

What category does payme belong to?

payme is listed under Financial, specifically Financial.

← Back to Financial