Skip to main content

Payment links in the IVR and the AI agent

MonoPbx takes payments without ever touching a card. The IVR or the AI agent sends the caller a payment link (Stripe Checkout, Mercado Pago Checkout Pro or a Conekta payment link) by SMS or WhatsApp. The caller pays on the provider's hosted page, and the provider's webhook tells MonoPbx the result.

Set up​

  1. Open Admin > Settings > Integrations > Integrations, install the provider (stripe, mercado_pago or conekta) and paste the secret API key (Stripe sk_..., the Mercado Pago access token or the Conekta private key). The key is sealed with the company's data key and never shown again. Optional settings: the default currency and the page the payer returns to.
  2. In the same area, create an inbound hook endpoint for the connector and register its address https://<host>/hooks/int/<connector>/<install_key> in the provider's dashboard: Stripe events checkout.session.*, Mercado Pago notifications of topic payment, Conekta order.paid, order.declined, order.expired, order.refunded. Use the Stripe signature scheme for Stripe and the provider's signing secret for the others.
  3. Allow the AI tools send_payment_link and payment_status on the install when an AI agent should take payments.

The message goes out through the company's AI business settings: the SMS sender number, or the WhatsApp channel with an approved one-parameter template. Without them the tool answers delivery_refused.

In a call flow​

{ "type": "payment_link",
"config": { "provider": "conekta", "amount_var": "amt", "currency": "MXN",
"description": "Deposit", "channel": "whatsapp" },
"next": "thanks", "on_error": "agent" }

Use amount_minor (a fixed amount in cents) or amount_var (a variable that holds cents, for example from a collect step). The link goes to the caller, or to the number in to_var. The provider's reference is stored in payment_ref (or reference_var). Errors take the on_error exit.

Statuses and events​

Each link is pending, then paid, failed, expired or refunded from the webhook. A paid link never goes back. Only the last four digits of the recipient's number are kept. A paid or failed link raises the events integration.payment_succeeded and integration.payment_failed once (provider, reference, amount, currency; never the payer or the number).

No card numbers​

When an AI agent sends a payment link on a recorded call, the recording pauses (reason pci, keypad digits hidden) until the agent checks the payment and finds it paid, failed or expired (at most 10 minutes, and never after the agent's part of the call), so nothing the caller says or types about a card is recorded.

  • The payer types the card on the provider's page, never on the phone.
  • On the keypad, a collect step discards input that looks like a card number and takes its timeout exit.
  • Card numbers typed or spoken as digits are replaced by [card number removed] before a transcript, SMS or chat message is stored.
  • An AI tool description that holds a card number is refused, and the model receives the reference, never the link.

The guard leans to masking, so a 16-digit order number that passes the card checksum is masked too.