How to Set Up a Custom Payment Gateway

Developer's guide to integrating a custom payment gateway with Tilda
Tilda is integrated with popular payment systems like Paypal, 2Checkout, and Stripe. Here's how to integrate a custom payment system with your website through the Custom Payment Gateway option.
To set up a full-fledged integration with a custom payment gateway, go to the Site Settings → Payment Systems and select "Custom Payment Gateway."
Important: Important: If there is no template among the payment solution templates that you want to use, contact the payment system developer team and send them a link to this guide. Creating a new template will be successful only if you are a developer.
You can select an integration template or create a custom one.

Templates are the presets of parameters for integrating a particular system. They may include unchangeable settings like the API URL or order number field and changeable settings ("Advanced settings").

If you see a template for your payment solution among the options, that means the developers have contacted us, so you can easily set up an integration with your payment system.
Please note that Tilda Publishing bears no responsibility for the operation and security of any third-party payment integrations.
If your payment system isn't on the list, you need to contact the developers of the payment solution so that they make a request to create one.

To start the procedure, you need to specify the name of the payment system the user should be redirected to with a POST request to complete payment, a contact email, and any additional information that could help with the integration, such as links to the payment system's documentation.
Important: Creating a new template requires deep knowledge of payment gateway integration and programming. To make a template, you need to be a payment solution developer or have in-depth knowledge of the integration details.
As soon as the moderation team approves the template, it will become available in the list for a specific project. After that, you can modify the additional settings, change the names of the variables passed with customers' orders, and debug the integration.

First, you need to specify the names of all the critical and required fields whose data should be passed along with the customers' orders and modify the additional settings like case, format, and field length.
After configuring the required fields, you may need to specify other variables passed when an order is created. You can add them in the "Additional field list" section. The number of list items depends on the integration needs.
You also need to set up the order signature and specify the rules for its formation (the excluded fields, sorting principle, delimiter, and encryption algorithm).

First, you need to select the signature rules or select "All fields" and specify the excluded fields, sorting principle, and delimiter. If you need a custom data format, select "Special rules" and set the rules of the custom format.
After that, you need to configure the successful payment indicator (the name and value of the parameter) and specify what the system should return in response to successful or declined payments.
Interaction format
1. The buyer adds a product to the shopping cart, fills out the form, and clicks on Checkout.

2. Tilda receives a request to save the new order and returns a set of parameters that will be included in the request for the payment system in accordance with the Mapping field list and the Additional field list from the Advanced integration settings.
Important: Among the parameters, there must always be a field containing the order signature. The signature is generated from the other fields' values using a specific algorithm and the payment key. You can configure this algorithm in the "Order signature" section of the Advanced integration settings.
The user is redirected to the API URL of the template. The parameters are passed by the POST method.

The payment system processes the parameters and, if the signature is correct, displays the payment form, processes the payment, and communicates with other systems if necessary.
The payment system can redirect the user to the success page after successful payment (if specified in the settings) or send a notification.

The payment system must also send a request to the notification URL—a special Tilda server URL. This request also needs to pass parameters and the signature using the POST method (the signature algorithms may differ). In the Advanced settings, you also need to add a field (and specify its value) used in verifying the payment status—that will be a successful payment indicator.

The order will be marked as paid on Tilda only after a request with the correct signature, order number, amount, and successful payment indicator has been sent to the notification URL.
How to customize fields
To make it easier for you to understand which Tilda fields the payment system's fields correspond to, we provide you with the option to rename some fields and tooltips in the "Form Settings" section of the Advanced settings.
How to debug an integration
To debug an integration, create a page and configure it according to this guide: add the shopping cart and the product block to the page and publish it.

We suggest that you make a test payment and see if the payment goes through. If everything is fine, contact the moderation team, and your template will be added to the public list.
Made on
Tilda