This feature allows you to manage the payment amount via URL, pass customer data filled out on your platform to the payment page, and control the customer's path after a successful payment.
First, you need to create a payment link in the Allpay dashboard and set its type to <span class="u-richtext-element">Customer indicates amount</span>.
You can add the parameters <span class="u-richtext-element">amount</span> for the payment amount, <span class="u-richtext-element">client_name</span>, and <span class="u-richtext-element">client_email</span> for customer data to the payment link URL.
For example, https://allpay.to/~pay/dynamic?amount=100&client_name=Jason%20Statham&client_email=jason@go.com If the values for the parameters <span class="u-richtext-element">client_name</span> and <span class="u-richtext-element">client_email</span> are not specified, we will request them from the customer during payment.
This way, you can use a single payment link for all customers, specifying an individual amount for each of them.
Supported parameters <span class="u-richtext-element">amount</span> — payment amount.
<span class="u-richtext-element">client_name</span> — customer name.
<span class="u-richtext-element">client_email</span> — customer email.
<span class="u-richtext-element">client_tehudat</span> — the Tehudat Zehut (Social ID number). This is included in the payment receipt. To hide this field from the page, pass nine zeros.
<span class="u-richtext-element">currency</span> — payment currency. For example, ILS, USD, EUR. If the currency is not approved for the account, it will be converted to ILS.
<span class="u-richtext-element">currency_display</span> — display currency. For example, you can show the price in USD and charge in ILS at the current exchange rate. List of supported display currencies.
<span class="u-richtext-element">lang</span> — language of the payment page. It is auto-detected by the customer's browser language, but you can control it by passing values AR (Arabic), EN (English), HE (Hebrew), or RU (Russian).
Product name The product or service name cannot be passed this way, as it creates a possibility for manipulation. For example, it would allow changing the name of the provided product or service, which is automatically included in the receipt generated after payment.
Parameter add_field You can also use the parameter <span class="u-richtext-element">add_field</span>, the value of which will be passed unchanged in the redirect URL after a successful payment (see the article Redirect after payment for how to set up the redirect URL).
For example, https://allpay.to/~pay/dynamic?amount=100&add_field=any_text In the example above, the parameter <span class="u-richtext-element">add_field=any_text</span> will be passed unchanged in the redirect URL after payment. This allows you to track conversions, direct the customer to the desired stage of your chatbot funnel, and perform other necessary actions after payment.
If needed, you can set the value of <span class="u-richtext-element">add_field</span> to a string with multiple parameters and parse them on your server side. For example, <span class="u-richtext-element">add_field=par1-value1,par2-value2</span>.
If Webhook sending is enabled for the link, the <span class="u-richtext-element">add_field</span> parameter will be included in the request body.
Video tutorial VIDEO
Creating payment forms Using this approach and basic web development skills, you can create payment forms for placement on your website. These forms do not replace full capacity of our API but provide a simple and convenient solution for accepting payments.
You can allow customers to select product modifications or quantities, calculate the total based on selected options, and redirect the customer to proceed the payment.
Example in action: VIDEO
You can view the source code for the forms used in the video at the following links:
https://allpay.to/demo/snippet-example-1.html
https://allpay.to/demo/snippet-example-2.html
Using ChatGPT, you can customize the functionality of the forms to suit your specific needs.