Activate this automation on N8nPort with one click
We have completed the workflow installation, node configuration, and setup for you, so the automation is ready to activate without a manual import or node-by-node configuration.
Quick answers
How can I quickly create Stripe payment links?
This workflow provides a simple web form where you input product details, and it then automatically generates a Stripe payment link for you.
What information do I need to provide to generate a payment link?
You'll need to provide a product title and a price through a web form to initiate the payment link creation process.
Does this workflow create a product in Stripe?
Yes, before generating the payment link, the workflow first creates a product in your Stripe account using the details you provide.
What happens after the payment link is created?
After the payment link is successfully created, the workflow redirects you directly to that new Stripe payment link.
Overview
This workflow offers a straightforward way to generate Stripe payment links. It starts with a web form where you can enter product details like a title and price. Once you submit this form, the workflow automatically creates a new product in Stripe and then generates a unique payment link for it. The system then redirects you to this newly created payment link, ready for sharing or immediate use.
Key Questions About This Workflow
How can I quickly create Stripe payment links? This workflow provides a simple web form where you input product details, and it then automatically generates a Stripe payment link for you.
What information do I need to provide to generate a payment link? You'll need to provide a product title and a price through a web form to initiate the payment link creation process.
Does this workflow create a product in Stripe? Yes, before generating the payment link, the workflow first creates a product in your Stripe account using the details you provide.
What happens after the payment link is created? After the payment link is successfully created, the workflow redirects you directly to that new Stripe payment link.
What This Workflow Does
This workflow automates the creation of Stripe payment links. It begins by presenting a simple web form where you can input essential product information. Specifically, you'll enter a product title and its price. After you submit this form, the workflow takes over. It first communicates with Stripe to create a new product based on your input. Following this, it uses the newly created product's details to generate a unique Stripe payment link. Finally, the workflow redirects your browser to this new payment link, making it immediately accessible.
How It Works
The process starts with a Form Trigger node, which creates a public web form. This form asks for a product's title and price. When someone fills out and submits this form, the workflow activates.
Next, a Set node processes the submitted data. It takes the price you entered and converts it into cents, which is a common requirement for Stripe API calls. It also sets a default currency, which is EUR in this workflow's configuration.
An HTTP Request node then interacts with the Stripe API to create a new product. It uses the product title, the converted price, and the specified currency from the previous steps. This action establishes the product within your Stripe account.
Following the product creation, another HTTP Request node makes a second call to the Stripe API. This time, it creates the actual payment link. It references the price data from the product that was just created, ensuring the payment link is tied to the correct item.
Finally, a Respond to Webhook node completes the workflow. It takes the URL of the newly generated Stripe payment link and redirects the user's browser to it. This means the person who submitted the form will immediately see the payment link.
Prerequisites
Before you can set up and use this workflow, you'll need a few things:
An active n8n instance, such as one managed by N8nPort.
A Stripe account.
A Stripe API key with the necessary permissions to create products and payment links.
Ready to automate?
The complete installation and configuration are already prepared for your workspace. Activate the preconfigured workflow on N8nPort with one click.
Step-by-Step Setup
Setting up this workflow involves configuring your credentials and making a small adjustment to a node. Here's how you can get it ready:
1. Add Your Stripe API Credential
This workflow requires a Stripe API credential to connect to your Stripe account. You'll need to provide your Stripe secret key. To do this:
In your n8n instance, go to the 'Credentials' section.
Add a new credential of type 'Stripe API'.
Enter your Stripe secret key in the designated field. You can find this key in your Stripe Dashboard under 'Developers' > 'API keys'.
Save the credential.
The workflow's 'Create Stripe Product' and 'Create payment link' nodes are pre-configured to use this credential.
2. Configure the 'Config' Node
The 'Config' node handles some initial data processing. By default, it sets the currency to EUR. If you need a different currency, you can adjust it here:
Locate the 'Config' node in the workflow.
Open its settings.
Find the 'currency' field and change its value to your desired three-letter currency code (e.g., USD, GBP).
Save the changes to the node.
3. Activate the Workflow
Once your credential is set up and the 'Config' node is adjusted as needed, you can activate the workflow. The 'Creation Form' node will then provide a URL for your public web form. You can access this URL to start creating payment links.
Customization Ideas
This workflow provides a solid foundation, and you can extend its functionality based on your specific needs:
Add More Product Fields: The initial form only asks for a title and price. You could expand the 'Creation Form' node to include fields for a product description, image URL, or metadata, and then pass these to the 'Create Stripe Product' node.
Dynamic Currency Selection: Instead of a fixed currency in the 'Config' node, you could add a currency selection field to the 'Creation Form' to allow users to choose the currency for each payment link.
Quantity Input: While the payment link creation defaults to a quantity of 1, you could add a quantity field to the form and pass that value to the 'Create payment link' node.
Confirmation or Notification: After creating the payment link, you might want to send a confirmation email to the form submitter or a notification to an internal team via Slack or another messaging service. You could add nodes for these actions after the 'Respond to Webhook' node.
Error Handling: Implement error handling to catch issues during Stripe API calls. For example, if product creation fails, you could send an alert or display a custom error message instead of redirecting.
Limitations and Troubleshooting
When working with this workflow, consider these points:
Currency Conversion: The workflow assumes the price entered in the form is in the major unit of the currency (e.g., dollars, euros) and converts it to cents. Ensure your input matches this expectation.
Stripe API Key Permissions: Your Stripe API key must have the necessary permissions to create both products and payment links. If you encounter errors during these steps, check your API key's scope in your Stripe Dashboard.
Form Field Validation: The 'Creation Form' node requires a title and price. If these are not provided, the workflow may not proceed as expected. You might want to add more useful validation if this form is publicly accessible.
Webhook Response: The workflow redirects to the payment link. If you prefer a different response, such as displaying a success message, you would need to adjust the 'Respond to Webhook' node.
Frequently Asked Questions
What is a Stripe payment link?
A Stripe payment link is a shareable URL that allows you to accept payments without needing to build a custom checkout page. Customers click the link, enter their payment details, and complete the purchase.
Do I need a Stripe account to use this workflow?
Yes, this workflow directly integrates with Stripe to create products and payment links, so an active Stripe account and API key are essential.
Can I change the currency for the payment links?
Yes, the workflow's 'Config' node is set to EUR by default, but you can easily change this to any other currency supported by Stripe by editing the node's settings.
Is the form secure?
The 'Form Trigger' node creates a web form that is served over HTTPS, helping to protect the data entered by users. However, you should always consider your specific security requirements for public forms.
What happens if the Stripe API call fails?
If a Stripe API call fails (e.g., due to an invalid API key or incorrect data), the workflow will likely stop at that point, and the payment link will not be created. You would need to check the execution logs in n8n for details.
Source and Next Steps
This workflow was crafted by n8n.ninja and is available on the n8n.io website. You can find the original workflow and more details at the following URL:
To use this workflow, import it into your n8n instance, configure your Stripe credential, and adjust the 'Config' node as needed. Then, activate it and use the provided form URL to start creating payment links.
Activate this workflow on N8nPort
Choose your workspace and activate the fully prepared automation with one click.