Repository navigation
III. Setup & Usage
Once all the necessary apps are installed, certain DocTypes must be created to make Stripe Plus Settings work. Instructions on how to create them are shown below.
The Stripe Settings is required for Frappe to connect with a Stripe account. To set one up, do the following:
- Create a new Stripe Settings doc.
- In the form pop-up, name the Stripe Settings.
- For the keys, go to your stripe.com dashboard.
- In the dashboard, navigate to the bottom bar and click the Developers button. A menu will appear and from it, select API Keys.
- Click the Publishable Key Token value to copy it.
- Navigate back to the Stripe Settings pop-up and paste the copied text to the
publishable_keyfield. - Repeat steps 5 and 6 for the Secret Key.
- Click Save.
ERPNEXT simulates online payment from customers through the Payments app. There are various payment gateways offered and Stripe is one of them. To create one, do the following:
- Create a new Payment Gateway doc.
- In the pop-up, click the Edit Full Form button to reveal all the necessary fields.
- In the form, name the gateway. Select Stripe Settings in the
gateway_settingsfield. Select the Stripe Settings doc you created in thegateway_controllerfield. - Click Save.
The Payment Gateway Account is used for accounting in ERPNEXT. In Stripe Plus, it is used to determine the Stripe account used in Payment Requests.
- Create a new Payment Gateway Account doc.
- In the form, select the Payment Gateway doc in the
payment_gatewayfield and select the Account dedicated for Stripe in thepayment_account - Click Save.
When enabled, Stripe Plus overrides the Payments app, extending the features and capabilities of Stripe.
- Go to Stripe Plus Settings.
- Click the Enable Stripe Plus checkbox.
- Click Save.
A Stripe Payment Method Configuration is a collection of payment methods. It is customizable and can be chosen for a specific Customer or Payment Request.
Configurations readily available in one’s Stripe account (in stripe.com) can still be added by importing and Configurations created in ERPNext are automatically synced and added to the stripe.com.
- Go to the Stripe Payment Method Configuration List.
- Click the Import from Stripe Account button. This will ask for a Stripe account to use.
- Select the Stripe account you want to import configurations from and proceed. A pop-up will appear with a list of Configurations not yet added to your site.
- Select the Configurations to import by clicking the checkbox.
- Click Import Configurations.
- Optional: Go to a Configuration and bind a customer to it by adding a customer in the Affected Customers table.
- Create a new Stripe Payment Method Configuration.
- In the form, select a Stripe Settings and name the configuration. Then, add at least one Payment Method.
- Optional: Bind a customer by adding a customer in the Affected Customers table.
- Click Save.
- Select the Payment Gateway Account for Stripe
- Select a Stripe Payment Method Configuration. If the field is empty, the default configuration will be used.
The header of the Checkout/Payment page displays the company’s name and logo. But in the Stripe Plus Settings, these can be overridden.. To override them, set a value for the payment_page_company_name and payment_page_company_logo fields.
The Advanced Features allows logging, notifications and accounting automation. Logging is automatically active once Advanced Features is enabled, while notifications and accounting automation requires additional configurations.
- Go to your Stripe dashboard. Navigate to the bottom bar and look for the Developers menu button.
- Click the button and choose Webhooks. Wait until a pane appears.
- From the pane, click the Add destination button.
- Select all events related to Charge, Payment Intent, Setup Intent and Payout, then click Continue.
- Choose the destination type to Webhook endpoint, then continue.
- Set a destination name and set the endpoint url to
https://<sitename>/api/method/erpusa.stripe_plus.api.webhook_receiver.receive_stripe_events. - Finally, create the destination.
- Once the destination is created, look for its signing secret and copy it.
- Go back to your site and open Stripe Plus Settings. Click the Advanced Features tab.
- In the Signing Secret List table, add a row where the Stripe Settings is the account you used and the Signing Secret is the text you copied.
- Click the Turn on email notifications checkbox.
- Change the
notification_methodto Realtime to get notified exactly when a payment is made or to Daily Digest to get a summarized list of payments based on a schedule. - Add at least one email address in the
notification_recipientfield. For multiple recipients, separate the email addresses with a comma (,). - For Daily Digest notifications, populate the Notification Schedule table. Add at least one by choosing an hour and minute precision. Add an optional label next to the schedule to replace the time string in the email.
Sales Invoice and Orders paid through Stripe can automatically have a Payment Entry as part of the Advanced Features.
- Select an Admin or Accounts Manager for the
user_to_authorizeto allow the creation of Payment Entry in the background. - Set a
merchant_fee_accountand amerchant_fee_cost_center. - Depending on your preference, check the Autosubmit payment entry checkbox to have the Payment Entries submitted upon creation.
Bank Deposits made by Stripe (Payouts) can automatically be accounted for via Journal Entry as part of the Advanced Features. This requires an existing payout in your Stripe dashboard.
- Under the ERP-Stripe Accounts table, bind a Stripe Payout Account with an ERPNEXT account and bank account:
- Select the dedicated Account for Stripe for
erp_account. - Select the Bank Account for
erp_bank_account. - Go to your Stripe dashboard and select a Payout
- In the Payout details, look for the bank account ID (format:
ba_xxxxxxxxxx) and copy it. - Paste the copied ID to the
stripe_payout_account.
- Select the dedicated Account for Stripe for
- Depending on your preference, check the Autosubmit journal entry checkbox to have the Journal Entries submitted upon creation.