Would you like to pass the payment amount to forms in a URL parameter?
Imagine a one-time payment form where the payment amount can be entered by the client.
If you’d like to set the initial payment amount by passing an URL parameter, like on the screenshot below, then this article is for you:
If you’d like to set the initial payment amount of your one-time payment form via an URL parameter, then you have to do the following:
The following subsections explain these steps in detail.
You can set the “Payment Type” option to “Custom Amount” on the “Payment” tab of the form:
You have to pass the payment amount in the wpfsAmount parameter, like this (you can try it): https://demo.paymentsplugin.com/settle-invoices-inline/?wpfsAmount=4999
The payment amount must be specified the smallest unit for the currency.
For $10.00 enter 1000, for ¥10 enter 10.
For the sake of security, the plugin doesn’t let anyone set the payment amount without your consent.
You can give consent by implementing a short piece of code to approve the amount in the form of a Wordpress filter. The code needs to be added to the functions.php file of your active Wordpress theme.
This is the default implementation:
You can customize the code depending on your needs. For example, you can limit the payment amount based on form name and amount range:
Our support team is happy to help you.Contact support
Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.