> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tala-assistant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe (Paiement)

> Send payment links via SMS during voice calls

## Overview

The Stripe integration enables your voice agents to create and send payment
links via SMS to your customers during live calls. When a customer needs to
pay, the agent generates a secure Stripe Payment Link and sends it to the
customer's phone number.

<Note>
  This integration uses Stripe Restricted API Keys for security.
  Full secret keys (`sk_live_*`) are not accepted.
</Note>

## What You Can Do

| Feature                 | Description                                              |
| ----------------------- | -------------------------------------------------------- |
| **Send Payment Link**   | Create a payment link and send it by SMS during the call |
| **Configurable Amount** | Set the payment amount and description dynamically       |
| **Amount Cap**          | Default cap of 500 EUR to prevent errors                 |

## Setup

<Steps>
  <Step title="Create a Restricted API Key">
    In your Stripe Dashboard, go to **Developers** -> **API Keys** ->
    **Create restricted key** with these permissions:

    * **Payment Links**: Write
    * **Products**: Write
  </Step>

  <Step title="Add Integration">
    Go to **Integrations** -> Click **Add Stripe** -> Paste your Restricted API Key
    (`rk_live_*` or `rk_test_*`)
  </Step>

  <Step title="Test Connection">
    Click **Test** to verify your key has the correct permissions.
    For test keys (`rk_test_*`), both read and write permissions are validated.
  </Step>

  <Step title="Start Using It">
    Once Stripe is active, the payment link tool is available automatically
    during calls. There is no separate workflow toggle for Stripe.
  </Step>
</Steps>

## How It Works

1. During a call, the customer indicates they want to pay
2. The agent asks for the amount and the customer's phone number
3. A Stripe Payment Link is created with the specified amount
4. The link is sent via SMS to the customer's phone
5. The agent confirms the SMS was sent

## Example Conversation

<AccordionGroup>
  <Accordion title="Payment collection">
    **Caller:** I'd like to pay for my order of two pizzas.

    **Agent:** Of course. That will be 24 euros. Can I have your phone number
    to send you the payment link?

    **Caller:** Yes, it's 06 12 34 56 78.

    **Agent:** I've just sent you a payment link for 24 euros by SMS.
    You can click on it to complete your payment securely via Stripe.

    **Caller:** Got it, thanks!

    **Agent:** You're welcome! You'll receive a confirmation once the
    payment goes through.
  </Accordion>
</AccordionGroup>

## Security

| Aspect          | Detail                                                          |
| --------------- | --------------------------------------------------------------- |
| **Key Type**    | Only Restricted API Keys (`rk_live_*` / `rk_test_*`)            |
| **Key Storage** | Encrypted with Fernet (AES-128) in database                     |
| **Amount Cap**  | Configurable maximum (default 500 EUR)                          |
| **No Deletion** | Integration is deactivated, not deleted (preserves audit trail) |

<Warning>
  **Important:**

  * Never share your Stripe secret keys (`sk_live_*`) -- use Restricted keys only
  * The amount cap protects against accidental large charges
  * Payment links are created in your own Stripe account -- funds go directly to you
</Warning>

## Zelty Integration

When both Stripe and Zelty are connected, your agent can create orders and
collect payments in a single step. The payment amount comes directly from
the Zelty order total -- the agent does not need to calculate or confirm
the price.

| Step | What happens                                          |
| ---- | ----------------------------------------------------- |
| 1    | Customer confirms their order                         |
| 2    | Agent creates the order in Zelty                      |
| 3    | Backend extracts the real total from Zelty            |
| 4    | Backend creates a Stripe Payment Link for that amount |
| 5    | Backend sends the link via SMS                        |
| 6    | Agent confirms to the customer                        |

<Note>
  This flow requires both Zelty and Stripe integrations to be active.
  When only Stripe is connected, the generic payment link tool is available
  (the agent asks the customer to confirm the amount).
</Note>

## Managing Your Integration

* **Update key**: Go to **Integrations** -> click **Configure** on the Stripe row
* **Deactivate**: In the Stripe dialog, click **Désactiver**
* **Reactivate**: If the Stripe row is inactive, click **Configure**, then **Réactiver** with a valid Restricted API Key

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection test fails with permission error">
    * Verify your Restricted API Key has **Payment Links: Write** and **Products: Write** permissions
    * If using a test key (`rk_test_*`), both read and write permissions are validated at setup
    * If using a live key (`rk_live_*`), only read permission is validated at setup -- write errors appear on first use
  </Accordion>

  <Accordion title="Payment link creation fails during call">
    * Check that your Restricted API Key still has the required permissions
    * Verify the amount does not exceed the configured cap (default 500 EUR)
    * Ensure your Stripe account is in good standing
  </Accordion>

  <Accordion title="SMS not received">
    * Verify the phone number format (French: 06/07, international: +33)
    * Check that SMS sending is enabled for your Tala plan
    * The SMS is sent via Brevo -- check your Brevo sending quota
  </Accordion>

  <Accordion title="Integration shows as inactive">
    * The integration was deactivated from the Stripe settings dialog
    * Use **Configure** on the inactive Stripe row, then **Réactiver**
    * You will need to provide a valid Restricted API Key to reactivate
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Workflow Tools" icon="wrench" href="/workflows/tools">
    See all available tools
  </Card>

  <Card title="Webhooks" icon="webhook" href="/features/webhooks">
    Get notified after each call
  </Card>
</CardGroup>
