Overview
The Stripe integration can be installed and set up by any user with Settings access.
There are three main stages:
Creation of email templates
Installation of scripts
Population of account data
The Stripe integration is a Premium add-on. If you would like to use this functionality to streamline your payment processing via The Layer, please contact your Account Manager. For more information on how the integration can be used, see this article.
Email template creation
Two email templates are required. One will define the contents of the payment request email, and one will be used for payment notification emails sent to users.
Go to Settings - Mail Templates and select New Email Template on the left side.
Payment email template
This template will be used when sending a payment link from the All Payment Requests table on a customer record.
The suggested name for this template is "Stripe Payment Email Template" though another name can be used.
The snippet required to show the payment link is {{stripepayment_link}}.
Make sure to save the template.
Payment notification email
This template will be used when sending notifications to users to inform them that a payment has been made.
The suggested name for this template is "Stripe Event Template" though another name can be used.
Relevant snippets for this template are:
{{amount}}
{{name}}
{{company_name}}
{{email}}
{{reference}}
{{invoice_reference}}
Make sure to save the template.
Note that the company name snippet refers to the customer record from which the request was raised.
The other snippets all refer to the values entered when creating a payment request - they do not directly reference any records in The Layer.
The recipients of payment notification emails will be defined in the next stage.
Install Scripts from ScriptStore
This section contains instructions for installing the necessary scripts that form the basis of the feature.
Accessing the ScriptStore
From Settings - Functions, click on the ScriptStore button in the top-right.
Click on the Stripe button:
The component scripts will be shown. Click on Next to proceed.
The next screen requires us to populate some fields relating to email templates and recipients
Mail Template ID
This field requires the ID of the payment email template created before. To get this ID, open Settings - Mail Templates. The suggested name is "Stripe Payment Email Template".
The ID is the number at the end of the URL. This will be different for every instance of The Layer.
Email ID
This field is used to specify the internal recipients of payment notification emails. Enter your chosen email addresses, separated with a semi-colon, ";".
This can be changed later, if needed.
Notification Email ID
This field requires the ID of the payment notification template created before. To get this ID, open Settings - Mail Templates. The suggested name is "Stripe Event Template".
The ID is the number at the end of the URL. This will be different for every instance of The Layer.
Installing the Scripts
Once you've populated these fields, click Install.
You'll then see the installed scripts that make up the feature, under the Stripe tab of All Functions.
Changing notification email recipients
If you need to change the notification email recipients, go to Settings - Functions, click on the Stripe tab and open Stripe: Notify. You can then make changes to the Email ID field.
Account settings
The final area of configuration is accessible from Settings - Stripe.
API Configuration Details
The API Key, Publish Key, and Webhook Secret are specific to each Stripe account, and can be located from the Stripe Dashboard. See the last section of this article for more detail.
Webhook Function should always be set to "Stripe: Notify".
Payment Complete Block
The lower section allows you to change the web page shown to users after making a payment.
This is an HTML editor, similar to that used when creating an email template.
Here are some of the editing tools you can use:
Font formatting and size
Unordered lists
Images in body
Hyperlinks
HTML editor
Insert HTML
Make sure to save your changes.
Obtaining API information from Stripe
The Stripe Dashboard is accessible with this link:
Create a new webhook with this URL: https://webapi.thelayer.com/api/Public/StripeWebhook
Get the webhook secret:
You should now be able to start syncing your customer records to Stripe.
Managing User Access to Stripe Actions
⚠️Caution: All users will have access to manage all aspects of the Stripe Integration at customer and global level, including viewing and creating payment requests.
The Company tab reflects visibility of all global actions in the Operations area.
The Stripe tab on customer records will show users the option to view or create payment requests:
To limit this visibility to certain users or teams at company/global level, follow the instructions below.
Navigate to Settings - Functions - Manage Actions.
To set user or team exclusions, click the Edit pencil icon and tick the teams or users you wish to exclude this view from.
✅Tip: it may be useful to create teams specifically for the purpose of managing visibility to any area detailed in this section, to make ongoing access management easier if your team changes!
Navigate to Settings - Essentials - Teams - Create Team
Give your team a name, add the required users, then click Save. Your team will then be visible in the Exclusions menu detailed above, so you can exclude in bulk.
You can follow the same process above to limit visibility at Customer level; click on the Customer tab on the Manage Actions screen shown above and find the Action Name:
View all Payment Requests - Execution Function Stripe: Show All Payment Requests:
Finally, navigate to the Others tab to set exclusions for specific actions such as Open email window to send Stripe payment links and View all payment requests. if not excluded, these are visible to users on the Stripe menu against customer records: