Payment gateways

In order to receive payment from clients payment gateways should be configured.

Enabling and configuring payment gateways

Configuration templates for payment gateway settings are present in settings.py file. If nothing related to gateways is present in the settings.py then probably you upgraded your Fleio installation and you will need to copy the settings template from settings.template file.

Enabling a payment gateway

In order to enable a payment gateway you need to edit the settings.py file and uncomment and edit the settings related to the payment gateway that needs to be enabled. Once you finish editing the settings.py file restart the fleio backend webserver and navigate to Billing/Gateways section in staff panel - the enabled payment gateway should be detected and displayed there.

For specific configuration parameters details for a payment gateway see instructions below:

  • Paypal - visit https://developer.paypal.com/developer/applications/ log-in with your account and generate credentials at Rest API Apps section then edit PAYPAL_SETTINGS in settings.py ( you can generate credentials both for testing and live transactions )

    Note: Make sure you set the payment receiver account to accept all currencies configured in fleio

    Use https://fleio_backend/api/billing/gateway/paypal/callback for webhooks to get event notifications

  • Romcard - you need to contact romcard via https://romcard.ro to obtain your API credentials then edit ROMCARD_SETTINGS in settings.py

  • Stripe - login to http://stripe.com go to API menu and you should find the API keys then edit STRIPE_SETTINGS in settings.py

    Note: to get the signing_secret key you first need to create a webhook to https://fleio_backend/api/billing/gateway/stripe/callback on the stripe dashboard’s webhooks section

Configuring a payment gateway

After a gateway is enabled you can configure it from Billing/Gateways. The following options are available for a gateway:

  • Enabled - when enabled is checked the payment gateway can be used by staff to add manual payments
  • Visible to user - when visible to user is checked the payment gateway will appear in the payment options available to regular users
  • Fixed fee & Percent fee - the fees used by the payment gateway for each transactions - these will be stored in journal entries related to transactions