How To Install tryton-modules-account-payment-stripe on Debian 12
Introduction
In this tutorial we learn how to install tryton-modules-account-payment-stripe
on Debian 12.
What is tryton-modules-account-payment-stripe
tryton-modules-account-payment-stripe is:
Tryton is a high-level general purpose application platform. It is the base of a complete business solution as well as a comprehensive health and hospital information system (GNUHealth).
The account_payment_stripe module allows one to receive payments from
Stripe
. It uses Stripe.js and Stripe Elements
in a checkout form to
handle Setup Intent
and Payment Intent
by card.
Note: The checkout form loads Javascript from stripe.com. It can be considered a potential privacy breach by fetching data from an external website at runtime. Nevertheless stripe.com claims: To be PCI compliant, you must load Stripe.js directly from https://js.stripe.com. So please use this module at your discretion.
- Stripe: https://stripe.com/
- Stripe.js and Stripe Elements: https://stripe.com/docs/web
- Setup Intent: https://stripe.com/docs/api/setup_intents
- Payment Intent: https://stripe.com/docs/api/payment_intents
- PCI compliance: https://stripe.com/docs/security/guide#validating-pci-compliance
Account
The Account stores the information about the Stripe account like the secret key, the publishable key and the webhook signing secret.
The account’s webhook endpoint is the URL used by stripe webhooks. For
additional security, the Stripe’s requests signature can be verified if the
webhook signing secret
is set on the Account.
If no webhook is setup, a cron task fetches the new events.
- webhooks: https://stripe.com/docs/webhooks
- signing secret: https://stripe.com/docs/webhooks/signatures
Customer
The customer allows to register parties as Stripe customers. The checkout button opens the Stripe checkout form.
A cron task runs every hour to create new customers on Stripe and another to delete them if they are inactivated.
Journal
The journal has a new field for the Stripe account.
Payment
The payment has also a checkout button which opens the Stripe checkout form. A payment can be processed off-session using a source or payment method from the customer. In case the payment method requires authorization, an email is sent to the party with a link to the checkout form. In case of error, it has also new fields which display the error messages.
A cron task runs every 15 minutes to charge each processing payment.
The capture box can be unchecked to only authorize on processing and capture the amount in a second step.
If the payment is disputed, it will be updated at the closure of the dispute.
It is possible to partially or completely refund a payment.
Configuration
The account_payment_stripe module uses the section account_payment_stripe
to
retrieve some parameters:
sources_cache: defines the duration in seconds the sources are kept in the cache. The default value is
15 = 60
.max_network_retries: defines the maximum number of retries the Stripe library may perform. The default value is
3
.
There are three methods to install tryton-modules-account-payment-stripe
on Debian 12. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install tryton-modules-account-payment-stripe Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install tryton-modules-account-payment-stripe
using apt-get
by running the following command:
sudo apt-get -y install tryton-modules-account-payment-stripe
Install tryton-modules-account-payment-stripe Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install tryton-modules-account-payment-stripe
using apt
by running the following command:
sudo apt -y install tryton-modules-account-payment-stripe
Install tryton-modules-account-payment-stripe Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install tryton-modules-account-payment-stripe
using aptitude
by running the following command:
sudo aptitude -y install tryton-modules-account-payment-stripe
How To Uninstall tryton-modules-account-payment-stripe on Debian 12
To uninstall only the tryton-modules-account-payment-stripe
package we can use the following command:
sudo apt-get remove tryton-modules-account-payment-stripe
Uninstall tryton-modules-account-payment-stripe And Its Dependencies
To uninstall tryton-modules-account-payment-stripe
and its dependencies that are no longer needed by Debian 12, we can use the command below:
sudo apt-get -y autoremove tryton-modules-account-payment-stripe
Remove tryton-modules-account-payment-stripe Configurations and Data
To remove tryton-modules-account-payment-stripe
configuration and data from Debian 12 we can use the following command:
sudo apt-get -y purge tryton-modules-account-payment-stripe
Remove tryton-modules-account-payment-stripe configuration, data, and all of its dependencies
We can use the following command to remove tryton-modules-account-payment-stripe
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge tryton-modules-account-payment-stripe
Dependencies
tryton-modules-account-payment-stripe have the following dependencies:
- python3-pkg-resources
- python3-stripe
- python3-werkzeug
- tryton-modules-account
- tryton-modules-account-payment
- tryton-modules-party
- tryton-server
- tryton-server-api-6.0
- python3
References
- tryton-modules-account-payment-stripe website
- tryton-modules-account-payment-stripe on packages.debian.org
Summary
In this tutorial we learn how to install tryton-modules-account-payment-stripe
package on Debian 12 using different package management tools: apt
, apt-get
and aptitude
.