All Collections
Integrations
Templates and dynamic plans in Paythen (for eCommerce & third party forms)
Templates and dynamic plans in Paythen (for eCommerce & third party forms)

Templates let you use Paythen payment plans with ecommerce (or other scenarios) where the total amount for each customer is different.

Roohbir Singh avatar
Written by Roohbir Singh
Updated over a week ago

A template in Paythen is basically a set of rules you define which affects any plans created from that template. The main benefit/reason being that each customer's total amount is going to be different (like for eCommmerce).

Eg: when creating a template, you set a specific billing interval (like 10 weekly installments or 6 monthly installments, etc), the number of payments, the currency, and more. When a plan is created from this template, it inherits these values.

With date-based templates, you can add pre-set dates for payment milestones and assign percentages to each milestone so a customer's total gets split up based on those percentages but all customers are charged on the same dates.

The best way to get started is to create a template yourself and see it in action. At the moment, to see templates in your Paythen account, you need to go to Settings > Integrations and switch ON the WooCommerce integration. This will enable a new menu option called "Templates".

From here, you can create and view payment plan templates.

To create a date-based payment plan template, go to the date-based dashboard and choose the new template option instead.

Once you create a template, we'll show your template link which is what you need to paste into our ecommerce plugins. You can also use this template link in other scenarios like in a custom integration, or via any third party tools like form builders, to pass values to it via url parameters. This will automatically generate and display a payment plan for your customers on the fly.

Here's an example of how our templates work. Use this link below and paste it into your browser – you can change the name and price fields below and you will see that it will generate a payment plan based on whatever you enter:
​
​https://demo.paythen.co/template/qyl3kogwn1?price=1000&plan_name=Paythen+Demo+Payment+Plan
​
You can change the price above to anything you want and then paste it into your browser. This will create a new plan with that price as the total. This template creates a plan that has 10 weekly installments. When you create a template, you can choose the billing interval, number of payments, add a surcharge, upfront deposit and more.

If you're using our WooCommmerce plugin, you can ignore all of the information below as it happens automatically once you've installed our plugin. Read more about our WooCommerce plugin and setup instructions here.

If you're interested in using Paythen with Shopify, read more here.


URL parameters & templates

There are 8 default dynamic values you can pass to template links giving you a lot of control over plans that are generated this way. Plan name (plan_name) and the total payment amount (price) are the only two that are required.

Plan name (required)

Field ID: plan_name

Total payment amount (required)

Field ID: price

Plan description (optional)

Field ID: description

Currency (optional)

Field ID: currency

Billing interval (optional)

Field ID: billing_interval

Number of payments (optional)

Field ID: number_of_payments

Start payments after (optional)

Field ID: start_payments_after

Custom confirmation page (optional)

Field ID: customer_redirect_url

In addition to these, you can also pass values to any custom fields you added when creating the template. Eg: If you added a custom field called Mobile phone in your template, then that can be passed as a value also.

Mobile phone

Field ID: mobile_phone

eg: mobile_phone=(213) 123 4567

Any values you pass here automatically overwrite any pre-set values you might have entered in the template. Eg: If you had set a description in the template, but you pass a new value for description in the url, we will use the new value in the plan. Or if you've set a default currency to USD but then pass a currency value as EUR then the plan will be generated with Euro as the currency.

If you're not sure about how you can pass values in the url, read our help article about utm parameters here.

Eg: A template url can have the above values appended to it in this format. Here is an example with 5 parameters. You can pass some or all of the values, as long as the two required ones (price and plan_name) are present:
​
https://[your-template-link-goes-here]?plan_name=ABC Shop Payment Plan&price=1000&description=This is a payment plan order via ABC Shop&customer_redirect_url=https://abc.com/thanks

And this can be further expanded on with custom fields. Eg:
​
https://[your-template-link-goes-here]?plan_name=ABC Shop Payment Plan&price=1000&description=This is a payment plan order via ABC Shop&customer_redirect_url=https://abc.com/thanks&customer_source=influencer-campaign&preferred_color=purple&mobile_phone=(213) 123 4567

You can pass almost any value in the url parameters – including spaces, most punctuation, numbers and most symbols.

All this happens automatically behind the scenes when you're using our ecommerce plugins, like WooCommerce. But you can use the template url however you want, with any other system, as long as you pass the two required fields to it.

At the moment, templates are only available for payment plans and date-based payment plans in Paythen. Support for the Pay your way plan type and others will be added in the future.
​

Our WooCommerce plugin automates the above. Read more about the WooCommerce setup here. You can set up a payment plan flow on Shopify with these step by step instructions – there isn't a Shopify app at the moment.

You can also use the templates functionality above with any other system, form builder tools like Formstack and JotForm or any other setup where you can pass values to url parameters. We outline an example flow using a third party tool here.


​


Need additional functionality? Questions? Ask as anything, and let us know what you'd like to see in Paythen via the chat icon or email hello@paythen.co.


​

Did this answer your question?