Hostinger AI Builder: Stripe integration in agentic mode

Integrate Stripe with your Hostinger AI Builder agentic mode project to accept online payments.

Updated 3 weeks ago

Integrate Stripe with your Hostinger AI Builder agentic mode web application to start accepting online payments.

Before you start

Set up the Stripe integration

Accept online payments in your Hostinger AI Builder agentic mode web application by connecting a Stripe payment link to a button in your project. Customers pay on the Stripe-hosted checkout page, and Stripe then redirects them to a page in your web application.

  1. In your Stripe dashboard, open Payment Links and create a new payment link for the product you want to sell.
  2. Under After payment, choose to redirect customers to your website instead of showing the Stripe confirmation page. Enter the address of the page customers should reach after paying, for example https://domain.tld/download.
  3. Create the payment link and copy its URL.
  4. In Hostinger AI Builder, ask the AI to add a button that opens the payment link and to create the page that customers reach after paying. For example: Add a Download button that opens this Stripe payment link: [your payment link URL]. After payment, Stripe redirects customers to /download. Create a /download page where customers can download their file.
  5. Publish your project and test the payment flow with Stripe test mode turned on. Test payments appear under Recent payments on the payment link’s page in your Stripe dashboard.

For example, in a QR code generator web application, clicking Download QR Code opens a window saying the download requires a one-time payment. Clicking Continue opens the Stripe checkout page. After a successful payment, Stripe redirects the customer to the /download page, where the QR code can be downloaded.

The same setup works with any other payment provider that offers payment links.

For other services that can be connected via AI prompts instead of a manual setup, see how to use integrations in agentic mode.

Current Stripe integration limitations

  • After payments, you are redirected to a designated page in the web app. That page will handle the logic of what to do on successful payments.

  • There is currently no backend validation for payments. If a hacker discovers the redirect link, they could bypass the payment step.

  • This approach is suitable for selling low-cost digital products but not great for high-value items (e.g., cars).

  • Besides one-time payments, subscriptions can also be sold using payment links. However, without backend tracking, there is no way to detect if a client cancels their subscription and revoke access accordingly.

With that said, subscribers are unlikely to realize that canceling their subscription will not immediately revoke their access. As a result, this approach may work for most low-cost subscription cases, such as a subscription to play games, generate QR codes or PDFs. See Hostinger AI Builder: how to sell subscriptions with Stripe for more detail on this specific use case.