Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Gringotts is a subscription service currently in beta

License

NotificationsYou must be signed in to change notification settings

geprog/gringotts

Repository files navigation

npm versiondocker image Version (latest by date)

Gringotts is a service which can be used as gateway between your payment provider and for example your SAAS application. It allows you to easily handle customers, subscriptions and invoice generation for your users.

Gringotts

Some (current) opinions

  • Subscriptions are always monthly
  • Subscription-periods start at the first day the customer started the subscription (exp. 2021-01-15 to 2021-02-14, 2021-02-15 to 2021-03-14, ...)
  • Invoices are generated at the end of the subscription-period (exp. 2021-01-15 to 2021-02-14 => invoice is generated on 2021-02-14)

Usage

Container image

The container image can be found atghcr.io/geprog/gringotts.

Environment Variables

NameDescriptionDefault
PORTPort on which the server should listen7171
PUBLIC_URLUrl on which the server is reachablehttp://localhost:7171
POSTGRES_URLUrl to the postgres databasepostgres://postgres:postgres@localhost:5432/gringotts
ADMIN_TOKENToken which is used to authenticate admin endpoints like project
CREATE_PROJECT_DATAJson string which is used to create the first project
DATA_PATHPath to the data directoryLocal: ./data Container: /app/data
GOTENBERG_URLUrl to the gotenberg serverhttp://localhost:3000
JWT_SECRETSecret used to sign jwt tokenssupersecret
MAIL_FROMFrom address for emails `My Projectmy-project@example.org
MAIL_HOSTHostname of the smtp server
MAIL_PORTPort of the smtp server25
MAIL_USERNAMEUsername for the smtp server
MAIL_PASSWORDPassword for the smtp server
MAIL_SECUREUse secure connection for the smtp serverfalse
MAIL_REQUIRE_TLSRequire tls for the smtp serverfalse

To create a project on start you can set theCREATE_PROJECT_DATA environment variable to a json string like this:

CREATE_PROJECT_DATA='{ "name": "TestProject", "mollieApiKey": "123", "paymentProvider": "mollie", "webhookUrl": "http://localhost:4000/payments/webhook", "currency": "EUR", "vatRate": 19.0, "invoiceData": { "email": "test@example.com", "name": "Company ABC", "addressLine1": "Diagon Alley 1337", "addressLine2": "string", "zipCode": "12345", "city": "London", "country": "Germany", "logo": "data:image/svg+xml;base64,...." } }'

Keep in mind that this wont be updated later if you change the environment variables after the first start.

OpenApi Documention

The OpenApi documentation can be found athttps://<PUBLIC_URL>/docs likehttp://localhost:7171/docs

Development

Setup

docker-compose up -d# install dependenciespnpm i# copy .env.example to .env and adjust the valuescp .env.example .env# start the serverpnpm start

[8]ページ先頭

©2009-2025 Movatter.jp