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

# WeChat Pay

> Accept WeChat Pay from Chinese customers on one-time payments. Learn about USD and CNY billing, the QR code payment flow, testing, and configuration.

Let Chinese customers pay by scanning a QR code with the WeChat app. WeChat Pay is the payment wallet inside WeChat, China's leading mobile app, and Dodo Payments offers it on one-time payments billed in USD or CNY.

## Why Offer WeChat Pay?

<CardGroup cols={3}>
  <Card title="800M+ Users" icon="users">
    WeChat has over 1 billion monthly active users, and WeChat Pay has over 800 million users.
  </Card>

  <Card title="Mobile-First" icon="mobile">
    The customer approves the payment inside the WeChat app, a flow that Chinese customers already know.
  </Card>

  <Card title="Dual Currency" icon="money-bill-transfer">
    Bill in USD or CNY, depending on the customers you sell to.
  </Card>
</CardGroup>

## Overview

| Detail | Value |
| :- | :- |
| **Billing Currency** | USD, CNY |
| **Subscriptions** | No |
| **Min Amount** | \$0.50 / 4.00 CNY |
| **Settlement** | USD |

## How It Works

```mermaid theme={null}
sequenceDiagram
    participant Customer
    participant Checkout
    participant Dodo
    participant WeChat

    Customer->>Checkout: Select WeChat Pay
    Checkout->>Dodo: Create payment
    Dodo->>WeChat: Initiate payment
    WeChat->>Customer: Display QR code
    Customer->>WeChat: Scan QR in WeChat app
    WeChat->>Dodo: Payment confirmed
    Dodo->>Checkout: Payment complete
```

## Customer Experience

1. The customer selects **WeChat** at checkout and clicks **Pay**.
2. A QR code opens in a full-screen overlay on the checkout page.
3. The customer opens WeChat on their phone and scans the QR code. If the customer is already paying on their phone, checkout shows steps to take a screenshot of the QR code and scan it from the WeChat photo album.
4. The customer confirms the payment in the WeChat app.
5. Checkout detects the completed payment and redirects the customer to your success page.

<Info>
  Customers pay in USD or CNY, and you receive settlement in USD.
</Info>

## Configuration

```javascript theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'pdt_123', quantity: 1 }],
  allowed_payment_method_types: ['we_chat_pay', 'credit', 'debit'],
  return_url: 'https://example.com/success'
});
```

WeChat Pay appears on one-time checkouts billed in USD or CNY. To bill in CNY, enable [Adaptive Currency](/features/adaptive-currency) and pass `billing_currency: 'CNY'`.

## API Method Type

| Type | Method | Currencies |
| :- | :- | :- |
| `we_chat_pay` | WeChat Pay | USD, CNY |

## Testing

<Steps>
  <Step title="Enable test mode">
    Turn off the **Live Mode** switch in the dashboard sidebar, and use API keys created in test mode.
  </Step>

  <Step title="Create a test checkout">
    Create a one-time checkout session with `we_chat_pay` in `allowed_payment_method_types`.
  </Step>

  <Step title="Scan the QR code">
    Checkout shows a test QR code. Scan it with your phone's camera; the WeChat app isn't needed. The QR code opens a test page where you can authorize or fail the payment.
  </Step>
</Steps>

## Best Practices

<AccordionGroup>
  <Accordion title="Target Chinese customers">
    WeChat Pay is used mostly by Chinese consumers. Include it when your customers include Chinese buyers, or when you sell to the Chinese market.
  </Accordion>

  <Accordion title="Always include card fallbacks">
    Not every customer has WeChat. Include `credit` and `debit` as fallback payment methods.
  </Accordion>

  <Accordion title="Optimize for mobile">
    Scanning is easiest when checkout is open on a computer or tablet and the customer scans with their phone. On a phone, checkout guides the customer to screenshot the QR code and scan it from the WeChat photo album, so keep your checkout page responsive.
  </Accordion>

  <Accordion title="Consider both currencies">
    WeChat Pay supports USD and CNY. Choose the billing currency that suits your customers: USD if you price in USD, or CNY to show Chinese customers a price in their own currency. Settlement is in USD either way.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="WeChat Pay not appearing at checkout">
    **Check:**

    1. Is `we_chat_pay` included in `allowed_payment_method_types`?
    2. Is the billing currency USD or CNY?
    3. Does the amount meet the minimum (\$0.50 or 4.00 CNY)?
    4. Is this a one-time payment? WeChat Pay is not offered on subscriptions.

    **Solution:** Check the payment method type and currency in your API request.
  </Accordion>

  <Accordion title="QR code not scanning">
    **Cause:** The QR code may have expired, or the customer's WeChat version is outdated. The QR code expires after a limited time.

    **Solution:** If the QR code expired, the customer needs to start a new checkout from your site, or you can create a new checkout session for them. If the code is still valid, ask the customer to update WeChat to a current version.
  </Accordion>

  <Accordion title="Payment not confirming">
    **Cause:** WeChat Pay usually confirms within seconds, but network delays can occur.

    **Solution:** Use webhooks for the payment confirmation. If the payment doesn't confirm within a few minutes, the customer may need to try again.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Payment Methods Overview" icon="credit-card" href="/features/payment-methods">
    See all supported payment methods.
  </Card>

  <Card title="Checkout Guide" icon="book" href="/developer-resources/checkout-session">
    Complete checkout implementation guide.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/developer-resources/webhooks">
    Handle payment confirmations asynchronously.
  </Card>

  <Card title="Asia-Pacific" icon="earth-asia" href="/features/payment-methods/asia-pacific">
    GCash (Philippines), Alipay HK and FPS (Hong Kong), and Touch 'n Go (Malaysia).
  </Card>

  <Card title="Testing Process" icon="flask" href="/miscellaneous/testing-process">
    Complete testing guide for all payment methods.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.