Integrations

Take payments with Stripe payment links

Add a Stripe restricted key so your assistant can text a caller a secure link to pay you during a phone call, with a currency and maximum amount you control.

With Stripe connected, your assistant can text a caller a link to pay you while they're on the phone, for example a deposit for a booking. The link is created in your own Stripe account, so payments go straight to you, and AIVA never handles card details. You need a Stripe account that can take payments, your Twilio number set up for texting, and an assistant that answers phone calls. This is optional: assistants work fine without it.

1. Create a restricted key in Stripe

AIVA uses a Stripe restricted key, a key that can only do the few things you allow. Your full secret key isn't accepted.

In your Stripe Dashboard, go to Developers > API keys and create a restricted key with write access to:

  • Payment Links
  • Prices
  • Products

Leave every other permission off. Stripe's own guide explains how: API keys. Copy the key when Stripe shows it. A live key starts with rk_live_. A test-mode key starts with rk_test_.

2. Add the key to AIVA

  1. In the sidebar, under Admin & Developer, open Webhooks.
  2. Open the Integrations tab.
  3. On the Stripe payment links card, click Add key.
  4. Fill in:
    • Restricted key: paste the key.
    • Currency: the three-letter code you take payments in, such as USD, EUR or GBP. Payment links are only ever created in this currency.
    • Largest payment link the assistant may send: the most a single link can be for, in that currency.
  5. Click Save & verify.

AIVA checks the key with Stripe before saving it. The card then shows Connected with the key's last four characters, plus your largest payment link amount.

To change the currency or limit later, click Replace key, leave the key empty, change the values and click Save. To disconnect, click Remove. Your assistant stops offering payment links until you add a key again.

  1. Open Assistants and click the assistant.
  2. Open the Actions tab.
  3. Make sure Texting a payment link is switched on, and choose its level:
    • Automatic: the assistant sends the link during the call, as soon as the caller wants to pay. This is the default, and the right choice for most businesses.
    • Ask first: the request waits on the Approvals page for you to approve. Payment links are only ever sent to a caller during a live phone call, so for most businesses Automatic or Never is the clearer choice.
    • Never: the assistant never sends payment links.

The General Purpose and Sales agent types have this action on from the start. Receptionist, Support and Follow-up assistants start with it off, so switch it on here if you need it.

It also helps to tell the assistant what it can take payment for, for example "Ask for a $50 deposit to confirm a booking." Put prices and payment policies in AI Training.

How it works on a call

  1. The caller agrees to pay, and the amount and what it's for are clear from the conversation.
  2. The assistant creates a payment link in your Stripe account for that amount, in your currency, with a short description, for example "Deposit for kitchen consultation".
  3. AIVA texts the link to the number the caller is calling from. The AI never reads a link aloud and never takes card details over the phone.
  4. The caller opens the link and pays on Stripe's secure page. You see the payment in your Stripe Dashboard.

AIVA won't send a link, and the assistant tells the caller a colleague will follow up instead, when:

  • the amount is over your Largest payment link limit, or in a different currency;
  • the conversation is a website chat rather than a phone call (links are phone-only);
  • the caller's number is hidden, or it can't receive texts from you, for example because they've opted out by texting STOP or they're on your do-not-contact list;
  • Stripe rejects the key or the text can't be sent.
The payment link is a text message from your Twilio number, so Twilio bills it like any other text. In the US, business texting must be registered first. See the A2P 10DLC guide.

Troubleshooting

"That doesn't look like a Stripe restricted key (rk_live_… or rk_test_…)." Check you copied the whole key, starting with rk_.

"Use a restricted key (it starts with rk_), not your secret key." You pasted a secret key (sk_…). Create a restricted key instead, as in step 1.

"This key can't use Payment Links." The key is missing a permission. In Stripe, give it write access to Payment Links, Prices and Products, then save it again in AIVA.

"Stripe rejected this key." The key may have been deleted or rolled in Stripe. Create a new restricted key and click Replace key.

"Stripe doesn't take payments in that currency." Use a three-letter currency code that Stripe supports, such as usd, eur or gbp.

The card shows Invalid. Stripe refused the key when the assistant tried to create a link. The card shows the reason. Fix the key in Stripe, then click Replace key.

Next steps

Something here doesn’t match what you see in the dashboard? Email support@aivachat.io and we’ll fix the guide.