Dynamically Setting Stripe Payment Description in WPForms

Would you like to dynamically set the Stripe payment description in WPForms based on the page or post where the form is embedded? In this guide, we will show you how to use a simple PHP snippet to automatically update the Stripe payment description with the current page or post title.


When using Stripe with WPForms, you can set a payment description for each transaction. This description typically appears on the customer’s credit card or bank statement.

In some cases, you might want the description to reflect the title of the page or post where the form is submitted. This is especially useful if the same form is embedded across multiple pages and you want to easily identify where each payment came from.

By adding a custom PHP snippet, you can dynamically append the page or post title to the Stripe payment description.

You can add this snippet to your site. If you need assistance in how to add snippets to your site, please check out this tutorial.

Be sure to set a base Stripe Payment Description inside your form’s payment settings so that the dynamic page or post title is appended to it. Refer to our guide on setting up Stripe Pro addon for more details.

And that’s all you need to dynamically append the page or post title to the Stripe payment description at the time of form submission.

Would you like to take this a step further and send additional information to Stripe with each payment? Check out our guide on sending metadata to Stripe.