# Odoo (/en/plugins/odoo)

Install XPay for Odoo, connect your account and accept payments in Odoo.

The XPay module adds XPay as a payment provider in Odoo. Customers pay in secure payment fields on your own site, and Odoo confirms the order or invoice once XPay reports the payment. Get it from the [Odoo Apps Store](https://apps.odoo.com/apps/modules/19.0/xpay_payment).

## What you can do [#what-you-can-do]

<Cards>
  <Card icon="<ShoppingCart />" title="eCommerce checkout">
    Customers pay for website orders with the methods on your XPay account.
  </Card>

  <Card icon="<Link />" title="Payment links and invoices">
    Odoo payment links and invoices paid online go through XPay too.
  </Card>

  <Card icon="<Wallet />" title="Your account's methods and currencies">
    Cards in every currency your account accepts, and ValU and Fawry in EGP when your account has
    them.
  </Card>

  <Card icon="<Undo2 />" title="Refund from Odoo">
    Full and partial refunds from the payment. Refunds made in the XPay dashboard show up in Odoo.
  </Card>
</Cards>

You need Odoo 18 or 19, Community or Enterprise, running on your own server or on Odoo.sh. Odoo Online doesn't allow third-party modules. Your site must be served over a public HTTPS address.

## Install and connect [#install-and-connect]

<Steps>
  <Step>
    ### Install the module [#install-the-module]

    Download the module for your Odoo version from the [Odoo Apps Store](https://apps.odoo.com/apps/modules/19.0/xpay_payment) and extract it into your Odoo addons path. Restart Odoo, update the apps list, then install **XPay Payment Provider** from **Apps**.
  </Step>

  <Step>
    ### Open the XPay provider [#open-the-xpay-provider]

    Go to **Website** → **Configuration** → **eCommerce** → **Payment Providers**, or **Invoicing** → **Configuration** → **Online Payments** → **Payment Providers**, and open **XPay**.
  </Step>

  <Step>
    ### Connect your XPay account [#connect-your-xpay-account]

    Click **Connect with XPay**, sign in to XPay and approve. You come back connected to your test account, with the provider in **Test Mode** and its webhook set up. Only an Odoo administrator can connect.
  </Step>

  <Step>
    ### Place a test order [#place-a-test-order]

    In **Test Mode**, Odoo shows XPay at checkout to administrators only, so place a test order while logged in. Pay with a [test card](/get-started/test-mode) and check that the order is confirmed.
  </Step>
</Steps>

## Payment methods and currencies [#payment-methods-and-currencies]

The module reads the payment methods and currencies from your XPay account when you connect. When XPay turns on something new for your account, click **Refresh account** on the provider. To accept fewer currencies, narrow the **Currencies** list on the provider's **Configuration** tab. **Refresh account** resets it to everything your account supports.

## Go live [#go-live]

Your XPay account must be [approved for live payments](/get-started/onboarding) first. On the provider, click **Go live** and approve your live account on XPay. The live connection replaces the test one, and the provider is set to **Enabled** and published for every customer.

To test again, click **Switch to a test account**. **Disconnect** removes the connection and turns XPay off.

## Refunds [#refunds]

Open the payment from the order or invoice and click **Refund**, for the full amount or part of it. XPay confirms each refund, and Odoo records it on the order. Refunds you make in the XPay dashboard are copied to Odoo the same way. ValU payments can't be refunded through XPay.

## When something isn't working [#when-something-isnt-working]

The provider form shows two status lines. **Connection** names the connected XPay account and whether it's test or live. **Webhook** shows whether XPay can reach your store.

| What you see                                    | What it means                                                        | What you do                                                                                      |
| ----------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| XPay is missing at checkout                     | The provider is in **Test Mode**, or the currency isn't on its list. | Log in as an administrator, or set the provider to **Published**. Check the **Currencies** list. |
| The payment fields don't load                   | A script optimizer, consent tool or security policy blocks XPay.     | Allow scripts and frames from `https://checkout.xpay.app`.                                       |
| The customer paid but the order isn't confirmed | **Webhook** reads **Not set up** or **Failing since**.               | Click **Reconfigure webhook**. Your site's **Domain** must be its public HTTPS address.          |
| **Go live** is refused                          | Your XPay account isn't approved for live payments yet.              | Finish [onboarding](/get-started/onboarding), then click **Go live** again.                      |
| A Fawry order stays pending                     | The customer hasn't paid the Fawry reference yet.                    | Nothing to do. Odoo confirms the order when XPay reports it paid.                                |

## Where to next [#where-to-next]

<Cards>
  <Card icon="<Puzzle />" title="Plugins" href="/plugins">
    What every XPay plugin does for you, and where to get it.
  </Card>

  <Card icon="<FlaskConical />" title="Test mode" href="/get-started/test-mode">
    Test cards for every payment outcome.
  </Card>

  <Card icon="<FileText />" title="Asynchronous payments" href="/integrate/asynchronous-payments">
    How Fawry payments complete after checkout.
  </Card>

  <Card icon="<WooCommerceIcon />" title="WooCommerce" href="/plugins/woocommerce">
    Run a WooCommerce store too? Connect it the same way.
  </Card>
</Cards>