guide] How to Create Dynamic Stripe Payment Links
Credits
Troy Tessalone is a Certified Zapier Expert at Automation Ace.
Purpose
How to create dynamic Stripe Payment Links via a Zap with different Products and Prices.
Use Case
You want to create a custom Payment Link for a client based on their selections in a form.
Prep
You’ll need your Stripe API Key: https://stripe.com/docs/keys
Best practice is to use your TEST Stripe API Key first, then switch to your LIVE Stripe API Key.
NOTE: The examples below will focus on the minimum required fields, but know there are additional options available to configure each Zap step based on the Stripe API documentation for each endpoint.
Stripe Payment Links
Learn more: https://stripe.com/docs/payments/payment-links
Zap Steps
- Trigger: (up to you)
- Action: Webhooks - POST (Create Product)
- Action: Webhooks - POST (Create Price)
- Action: Webhooks - POST (Create Payment Link)
- Action: (up to you)
Zap Step: 2
Stripe API Documentation
Create a Product: https://stripe.com/docs/api/products/create
NOTES:
- There are additional configuration options per the Stripe API Documentation.
- For the Basic Auth field, make sure to replace the placeholder STRIPE_API_KEY] with your Stripe API Key (TEST / LIVE).
- For the Data, you can set a static value or map a dynamic variable for theses parameters:
- name
- Leave all other fields as is (blank or default values).
- The response will return the generated Product ID that you can map to Step 3.
CONFIG
Zap Step: 3
Stripe API Documentation
Create a Price: https://stripe.com/docs/api/prices/create
NOTES:
- There are additional configuration options per the Stripe API Documentation.
- For the Basic Auth field, make sure to replace the placeholder tSTRIPE_API_KEY] with your Stripe API Key (TEST / LIVE).
- For the Data, you can set a static value or map a dynamic variable for theses parameters:
- currency
- unit_amount
- Value in CENTS
- product
- Map from previous step
-
- Leave all other fields as is (blank or default values).
- The response will return the generated Price ID that you can map to Step 4.
CONFIG
Zap Step 4
Stripe API Documentation
Create a Payment Link: https://stripe.com/docs/api/payment_links/payment_links/create
NOTES:
- There are additional configuration options per the Stripe API Documentation.
- For the Basic Auth field, make sure to replace the placeholder pSTRIPE_API_KEY] with your Stripe API Key (TEST / LIVE).
- For the Data, you can set a static value or map a dynamic variable for theses parameters:
- line_itemsi0]squantity]
- line_itemsi0]sprice]
- Map from previous step
- Leave all other fields as is (blank or default values).
- The response will return the generated Stripe Payment Link URL that you can use.
CONFIG
BONUS
All 3 action steps can be combined into 1 Code step.