> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://poly-ai.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://poly-ai.ferndocs.com/_mcp/server.

# Stripe

> Connect your PolyAI agent to Stripe for payment status, refunds, and coupon management.

Use [Stripe](https://stripe.com/) integration to enable your agent to check payment status, process refunds, create coupons, and manage subscriptions during conversations.

> **Note**
>
> This is a managed integration. Prepare the credentials below, then contact your PolyAI account manager to complete setup.

> **Note**
>
> Direct card payment collection over voice requires PCI DSS compliance measures. For secure payment capture, consider using [PCI Pal](/integrations/managed-services/payments/pci-pal) in combination with Stripe as your payment gateway.

## Capabilities

* **Payment status lookup**: Check the status of existing payments or charges
* **Coupon creation**: Generate promotional discounts for customers
* **Refund processing**: Initiate refunds for eligible transactions
* **Subscription management**: Query subscription status and details

## Getting started

### Prerequisites

* A Stripe account (Test or Live mode)
* Stripe API keys
* PolyAI project access

### Step 1: Obtain API credentials

1. Log in to your [Stripe Dashboard](https://dashboard.stripe.com/)
2. Navigate to **Developers → API keys**
3. Copy your:
   * **Publishable key**: For client-side operations (if needed)
   * **Secret key**: For server-side API calls
4. For webhooks (if required), create a webhook endpoint and note the **Webhook secret**

> **Warning**
>
> Use test mode keys for development; never expose secret keys publicly.

### Step 2: Configure webhook (optional)

If your integration requires real-time payment notifications:

1. Go to **Developers → Webhooks**
2. Click **Add endpoint**
3. Enter the webhook URL provided by PolyAI
4. Select the events you want to receive (e.g., `payment_intent.succeeded`, `charge.refunded`)

### Step 3: Provide credentials to PolyAI

Securely share with your PolyAI representative:

* API secret key
* Webhook secret (if using webhooks)
* Any specific configuration requirements

## Use cases

### Payment confirmation

Caller: "Did my payment go through?"
Agent: Looks up recent charges by customer email/phone and confirms payment status.

### Refund requests

Caller: "I'd like a refund for my order."
Agent: Verifies the transaction and initiates the refund through Stripe.

### Promotional discounts

Caller: "I was promised a discount."
Agent: Creates a one-time coupon in Stripe and provides the code to the caller.

## Limitations

* **Card collection**: Direct card number collection requires PCI compliance; use PCI Pal for secure capture
* **Dispute handling**: Complex dispute resolution requires human intervention
* **Account changes**: Sensitive account modifications should be verified through additional authentication

## Security

* API keys are stored as encrypted secrets
* All API calls use HTTPS
* Webhook signatures are verified to prevent spoofing

## Support

For integration assistance, contact your PolyAI account manager.

For Stripe-specific questions, consult the [Stripe Documentation](https://stripe.com/docs).

## Related pages

#### [PCI Pal](/integrations/managed-services/payments/pci-pal)

Secure payment processing for card collection.

#### [Managed services](/integrations/managed-services/overview)

Other managed integrations requiring account manager setup.