Skip to main content
The AI Agent node can charge customers with the payment gateways you have installed: it creates the payment link inside the conversation and checks whether the customer has paid, without leaving the agent. Unlike the payment node, where you build the charge in the flow, here the agent creates the order from what it discussed with the customer. You decide which values stay fixed and which ones the agent fills in.
AI Agent node with the Tools tab open, the Stripe, Payphone and Wompi gateways added, and the settings of the Wompi payment link tool with the amount set to Static

Wompi tools in the AI Agent node, with a fixed amount


Before you start

The gateway must be installed and connected, with its VAT configured, either from the Marketplace or through assisted setup by the Jelou team. Check how your provider is installed. The agent uses the credentials of that installation. It never sees them, and you don’t enter them again in the node. Available gateways: Wompi, Kushki, Nuvei, Mercado Pago, Payphone, DeUna, PayPal, Datafast, Stripe and Conekta. Placetopay, Niubiz, Culqi and Jelou Pay don’t have tools for the agent: to charge with them, use the payment node.
Stripe and Conekta only work with the merchant’s own keys. If the installation uses Stripe Connect or Conekta Connect, charges from the AI Agent are rejected.

Available tools

Each gateway comes with two tools. Their names include the gateway, so you can add several gateways to the same agent without mixing them up.
The payment method doesn’t go through the agent: the system sends it straight to the customer. The agent only receives the order number to use as a reference.

Add the tools to the agent

1

Open the node's tools

In Canvas, open the AI Agent node and go to the Tools tab.
2

Add the gateway

Click Add tool, filter by Marketplace and pick the gateway. It shows up in the agent’s tool list.
3

Configure the charge tool

Click the gateway’s settings icon and open Create payment link. There you set how each parameter is filled in and the behavior after it runs.To charge, use Continue: the agent gets the order number and keeps the conversation going to share it with the customer.
4

Test the charge

Test the conversation in the tester before publishing. Every charge creates a real order in the gateway, so use an installation in test mode or with test credentials. Test mode allows up to 10 tests per configuration, and DeUna doesn’t have it.

Fix the amount and other values

Each parameter of Create payment link can be filled in two ways:
  • AI: the agent takes it from the conversation.
  • Static: the value is fixed. The agent doesn’t ask for it and can’t change it, even if the customer mentions a different amount in the chat.
Fix the amount and the concept when the price doesn’t depend on the conversation, such as a fee or a flat-rate service.
amount is charged plus VAT. If you fix a price that already includes VAT, turn on without_tax; otherwise the customer pays the tax twice. To charge without VAT use without_tax: true: a tax_percentage of 0 doesn’t remove the tax, because it falls back to the installation’s VAT.
Set tax_percentage and without_tax as Static. The customer shouldn’t decide the tax on the charge.
The customer pays the amount plus VAT, unless without_tax is on. The agent gets that total in the tool’s response.

Customer data by gateway

Besides the amount and the concept, each gateway requires some payer data. The agent only asks for the data the gateway requires and it doesn’t have yet. It sends the optional fields if the customer already shared them.
On WhatsApp the phone number comes from the conversation, so the agent doesn’t ask for it.

What the customer sees

When the agent creates the charge, the customer gets the same payment message the payment node sends, with the Proceed to payment button. With a verified WhatsApp Business account, the checkout opens as a WebView without leaving WhatsApp; if the account isn’t verified, it opens in the device’s browser. Afterwards they can ask the agent whether their payment went through, and the agent checks it with Check payment status.
Tester conversation where the customer receives the payment message with the Proceed to payment button, the agent shares the total and the order number, and then confirms the payment was successful

Charge and payment confirmation, tested from the tester

The agent only checks orders created for the same contact, even from another conversation. That way the customer can come back another day to ask about their payment, but can’t look up other contacts’ orders.

Current limits

  • Link expiration. In Mercado Pago, Stripe, Conekta and DeUna the link expires after 30 minutes. In Kushki, the payment session lasts 15 minutes from when the link is opened. The other gateways have no common expiration; until the customer pays, the order stays pending.
  • Each charge is a new order. If the agent creates another charge, a new order is created, even if there’s a pending one.
  • There’s no maximum amount. If amount is in AI mode, the conversation sets the amount. When the price is known, keep it Static.

Prompt recommendations

  • Confirm before charging. Every call creates a real order. Tell the agent to show the concept and the amount and wait for the customer to confirm.
  • Check for a pending order. Before creating another charge, the agent should check the status of the previous order.
  • Don’t ask for what’s fixed. If the amount or the concept is static, avoid instructions like “confirm the amount with the customer”: the agent can’t change it.
  • Don’t paste the link. The customer already gets the payment message. The agent should only mention the order number.

Troubleshooting

Check that the parameter is set to Static in the tool and that the prompt doesn’t ask the agent to confirm it with the customer.
Each gateway has a minimum amount per currency. If the total falls below it, the tool returns a message like “<gateway> no acepta cobros menores a <minimum> <currency>”. Raise the amount or check the VAT applied.
The installation uses Stripe Connect or Conekta Connect. Connect the gateway with the merchant’s own keys.
Some gateways require email, first name, last name or phone. Check the customer data by gateway table and make sure the agent doesn’t send empty values.
Check the run in the debugger to see the actual message the tool returned.

Next steps

Payment providers

How to install and connect each gateway.

Test mode

Try a gateway without your own credentials.

Payment experiences

Differences between checkout, native payment and external confirmation.

Fees and costs

What each gateway charges per transaction.