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

# Accept Payments Inside Conversations with Fliqr AI

> Connect Stripe or PayPal to Fliqr AI and collect payments at checkout without customers leaving the conversation — with real-time webhook status updates.

Accepting payment inside a conversation requires a connection between Fliqr AI and a payment provider that handles the actual transaction. Fliqr AI integrates with Stripe and PayPal. Once connected, the Payment block in your checkout Flow triggers the payment collection step — customers pay, and Fliqr AI receives a webhook confirming the result.

## Overview

Fliqr AI does not process card data directly. When a customer reaches the payment step, Fliqr AI hands off to Stripe's hosted checkout or PayPal's payment flow. Card and bank details are entered on the provider's infrastructure. Fliqr AI receives a success or failure event via webhook and continues the conversation accordingly.

This architecture means payment security compliance (PCI DSS) is handled by Stripe or PayPal, not by your Fliqr AI account or your server.

## Prerequisites

* A [Stripe](https://stripe.com) or [PayPal](https://paypal.com) account (or both)
* Products added to your catalog — see [Catalog](/docs/ecommerce/catalog)
* A checkout flow configured — see [Cart & Checkout](/docs/ecommerce/cart-checkout)

## Connect Stripe

<Steps>
  <Step title="Open Payment Settings">
    Go to **E-Commerce → Payments → Add Provider → Stripe**.
  </Step>

  <Step title="Enter your API keys">
    Paste your Stripe **Secret Key** and **Publishable Key**. You can find both in the Stripe Dashboard under **Developers → API Keys**.
  </Step>

  <Step title="Save">
    Click **Save**. Fliqr AI validates both keys before confirming the connection.
  </Step>

  <Step title="Test with a Stripe test card">
    Use your Stripe test API keys (prefix `sk_test_`) and complete a test purchase using the card number `4242 4242 4242 4242` with any future expiry date and any 3-digit CVC. Verify that the order appears in **E-Commerce → Orders** with a **Paid** status.
  </Step>
</Steps>

<Tip>
  Stripe webhooks are configured automatically when you connect your Stripe account. This means Fliqr AI receives instant notification when a payment succeeds, fails, or is refunded — and your order status updates in real time without any manual configuration on your part.
</Tip>

## Connect PayPal

<Steps>
  <Step title="Open Payment Settings">
    Go to **E-Commerce → Payments → Add Provider → PayPal**.
  </Step>

  <Step title="Enter your credentials">
    Paste your PayPal **Client ID** and **Secret**. You can find these in the PayPal Developer Dashboard under **My Apps & Credentials**.
  </Step>

  <Step title="Select your environment">
    Choose **Sandbox** for testing or **Live** for production. You will need separate credentials for each environment — PayPal Sandbox credentials do not work in Live mode.
  </Step>

  <Step title="Save and test">
    Click **Save**. Run a test transaction using your PayPal Sandbox buyer account to confirm the connection works end-to-end.
  </Step>
</Steps>

## How Payment Collection Works in a Flow

After your checkout block collects the customer's order and shipping details, a **Payment** block handles the payment step:

<Steps>
  <Step title="Add a Payment block">
    In the Flow Builder, add a **Payment** block after your **Checkout** block.
  </Step>

  <Step title="Select the provider">
    In the Payment block settings, choose **Stripe** or **PayPal**.
  </Step>

  <Step title="Configure the success and failure paths">
    The Payment block has two output paths: **Payment Successful** and **Payment Failed**. Connect:

    * **Successful** → Your order confirmation message block
    * **Failed** → A message asking the customer to try again, with an option to retry or contact support
  </Step>

  <Step title="What the customer experiences">
    On channels that support inline forms (Website Chat, Messenger), the customer sees a payment form within the conversation. On WhatsApp, they receive a payment link that opens Stripe Checkout or PayPal in their browser. After completing payment, they return to the chat and the confirmation flow runs.
  </Step>
</Steps>

## Using Multiple Payment Providers

You can connect both Stripe and PayPal to the same account and let customers choose their preferred option. To offer a choice:

1. Add a **Quick Reply** block before the Payment block asking "How would you like to pay?"
2. Create two paths — one leading to a Stripe Payment block, one to a PayPal Payment block.
3. Both paths should converge at the same order confirmation block after successful payment.

<Warning>
  Never log, store, or transmit raw card numbers through Fliqr AI Flows or custom fields. Fliqr AI's payment integration routes customers to Stripe's hosted checkout — card data never touches Fliqr AI's servers. Attempting to collect card details via a text input Flow block violates PCI DSS and your agreement with your payment provider.
</Warning>

## Refunds

Refunds are initiated from your Stripe Dashboard or PayPal account, not from Fliqr AI. When you process a refund in either provider, the webhook notifies Fliqr AI and the order status updates to **Refunded** automatically. You can then trigger a refund notification flow if you have one configured under **E-Commerce → Orders → Automation Rules**.

## What's Next

<CardGroup cols={2}>
  <Card title="Order Management" icon="box" href="/docs/ecommerce/order-management">
    Track order status, update fulfillment, and send automated shipping notifications.
  </Card>

  <Card title="Cart & Checkout" icon="cart-shopping" href="/docs/ecommerce/cart-checkout">
    Review the full checkout flow configuration and channel-specific requirements.
  </Card>
</CardGroup>
