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

# XPay

Integrating XPay with FlexyPe enables fast, secure, and reliable payment processing directly through your checkout. With just a few steps, you can start accepting payments and ensure a smooth transaction experience for your customers.

## Getting the Public Key and Secret Key

<Steps>
  <Step title="Access XPay Dashboard">
    <img src="https://mintcdn.com/flexype/v9INX885ai9phD7B/images/integrations/xpay/xpay-dashboard-keys.png?fit=max&auto=format&n=v9INX885ai9phD7B&q=85&s=0ef4351a2b2263cbef62c830d7fae9af" alt="" width="1902" height="898" data-path="images/integrations/xpay/xpay-dashboard-keys.png" />

    * Log in to your XPay Dashboard.
    * Navigate to the **Settings** section from left sidebar.
    * Open the **Your Keys** tab.
    * Copy the **Public Key** and **Secret Key** and keep them handy for configuration.
  </Step>
</Steps>

## SetUp XPay Webhooks

<Steps>
  <Step title="Access Webhook Settings in XPay">
    * Open the **Webhooks** tab.
    * Click on **Set up Webhook**.
  </Step>

  <Step title="Add Webhook Endpoint and Events">
    <Note>Webhooks set-up is a mandatory step as it confirms the order creation on your store</Note>

    <img src="https://mintcdn.com/flexype/v9INX885ai9phD7B/images/integrations/xpay/xpay-webhook-endpoint.png?fit=max&auto=format&n=v9INX885ai9phD7B&q=85&s=8a1c1ea9a91fc98b003fd986727496d9" alt="" width="1400" height="802" data-path="images/integrations/xpay/xpay-webhook-endpoint.png" />

    ```
    https://api.flexype.in/v1/public/pg/xpay/webhook
    ```

    * Paste the above URL in the **Endpoint URL** field.
    * Generate the **Secret**, copy it, and keep it handy for configuration.
    * Under **Events to send**, enable all events starting with `intent`, including:
      * Intent.checkout\_opened
      * Intent.created
      * Intent.dispute\_lost
      * Intent.dispute\_under\_review
      * Intent.dispute\_won
      * Intent.disputed
      * Intent.failed
      * Intent.refunded
      * Intent.success
    * Click **Create** to complete the webhook setup.
  </Step>
</Steps>

## Integrate XPay with FlexyPe

<Steps>
  <Step title="Access Payments in FlexyPe Dashboard">
    <img src="https://mintcdn.com/flexype/v9INX885ai9phD7B/images/integrations/xpay/flexy-settings-payments.png?fit=max&auto=format&n=v9INX885ai9phD7B&q=85&s=f2cb8fd5b64d9dd21e4c8d7272e5ff84" alt="" width="1888" height="898" data-path="images/integrations/xpay/flexy-settings-payments.png" />

    * Log in to your **FlexyPe Dashboard**.
    * Click on the **Settings** menu from left.
    * Select **Payments**.
  </Step>

  <Step title="Configure XPay">
    <img src="https://mintcdn.com/flexype/v9INX885ai9phD7B/images/integrations/xpay/xpay-flexy-configure.png?fit=max&auto=format&n=v9INX885ai9phD7B&q=85&s=a260599b5c4df8429d35336455012923" alt="" width="1545" height="702" data-path="images/integrations/xpay/xpay-flexy-configure.png" />

    * Click the **Configure** button within the **XPay** card.
    * Paste the **Webhook Secret (Webhook tab)** into the **Signing Key (Webhook)** field.
    * Paste the copied **Public Key (Your keys tab)** into the **Public Key** field.
    * Paste the copied **Secret Key (Your keys tab)** into the **Secret** field.
    * Click **Save** to complete the configuration.

          <img src="https://mintcdn.com/flexype/v9INX885ai9phD7B/images/integrations/xpay/xpay-credentials-saved.png?fit=max&auto=format&n=v9INX885ai9phD7B&q=85&s=1c3a6757d120ebd161a477033e38f6a0" alt="" width="1375" height="660" data-path="images/integrations/xpay/xpay-credentials-saved.png" />

    <Warning>
      Do not delete the credentials if the payment provider is in use.
    </Warning>
  </Step>
</Steps>

## Use XPay for Your Payment Methods

<Steps>
  <Step title="Assign XPay as Payment Provider">
    * Once above steps are implemented, contact **FlexyPe** team.
  </Step>
</Steps>

By following these steps, you’ll successfully integrate XPay with FlexyPe, enabling secure payment processing and a smooth checkout
