# Frequently Asked Questions

## General

### What is Antom?

Antom is the official payment service provider offered by Ant Group, the parent company of Alipay. Antom's AI-powered payment platform helps businesses grow globally with optimized payment experiences and digitalization services.

### What payment methods does this plugin support?

The plugin supports 300+ payment methods globally, including:
- **Credit/Debit Cards** — Visa, Mastercard, AMEX, JCB, Discover, Diners Club, UnionPay (via Antom Elements)
- **Digital Wallets** — Alipay (China & Hong Kong), DANA, GCash, Kakao Pay, NAVER Pay, Touch 'n Go, Toss Pay, TrueMoney
- **Cashier Payment (CKP)** — Aggregated checkout page with multiple local payment methods

See the [Payment Methods](payment-methods.md) document for the complete list.

### Does this plugin rely on any third-party services?

Yes, this plugin relies on the **Antom Payment Service**. When a customer selects an Antom payment method, the plugin communicates with Antom's payment system to process the transaction. You can review the relevant service documentation [here](https://global.alipay.com/docs/ac/ams/api).

### Is WooCommerce required?

Yes, WooCommerce must be installed and activated for this plugin to work. The plugin will display an error message and refuse to activate if WooCommerce is not present.

### Is this plugin compatible with HPOS (High-Performance Order Storage)?

Yes, the plugin fully supports WooCommerce High-Performance Order Storage.

### Does the plugin support subscriptions?

Yes, the plugin includes support for WooCommerce Subscriptions via the `woocommerce_scheduled_subscription_payment_` action hook in the common gateway class.

## Installation & Setup

### How do I obtain my API credentials?

1. Register for an Antom merchant account at the [Antom Dashboard](https://dashboard.antom.com/global-payments/account/register?bizMode=ISV&isvBizScene=ISO_COMMON&registrationSource=WooCommerce)
2. Navigate to your account settings to find your **Client ID**
3. Generate or upload your **RSA key pair** (private key for signing, public key for Antom)
4. Copy Antom's **Public Key** for response verification

### How do I set up the webhook?

1. Log in to your [Antom Merchant Portal](https://dashboard.alipay.com/global-payments/home)
2. Navigate to the webhook/notification configuration section
3. Set the webhook URL to:
   ```
   https://your-store.com/?wc-api=antom_payment_notify
   ```

### Why are payment methods not showing on checkout?

This is usually due to **currency filtering**. Each payment method only supports specific currencies. If your store's currency is not supported by a method, it will not appear at checkout.

Check:
- Your store currency in **WooCommerce → Settings → General**
- The supported currencies for each method in the [Payment Methods](payment-methods.md) reference
- That the payment method is enabled in **WooCommerce → Settings → Checkout**

### Can I use test mode?

Yes. Enable **Test Mode** in the core Antom Payment Gateway settings. When enabled:
- All requests go to the Antom sandbox environment
- A "Test Mode (Antom Sandbox)" warning is displayed on checkout
- Use sandbox credentials from your Antom Merchant Portal

## Checkout

### What happens after a customer places an order?

1. An order is created with **Pending Payment** status
2. For digital wallets: the customer is redirected to Antom's payment page (CKP)
3. For card payments: a payment session is created and the customer completes payment on the checkout page
4. Once payment is complete, Antom sends a webhook notification
5. The order status is updated accordingly

### What checkout modes are supported?

The plugin supports both:
- **WooCommerce Classic Checkout** (server-rendered PHP templates)
- **WooCommerce Block Checkout** (React-based JavaScript blocks)

### Can customers retry payment for failed orders?

Yes. Customers can retry payment for failed orders via the WooCommerce **Order Pay** page. The plugin supports payment retry for both card and digital wallet payments.

## Security

### How are card payments secured?

Card payments use **Antom Elements SDK** — a PCI-DSS compliant solution. Card fields are rendered as embedded iframes, and card data is encrypted client-side using RSA + AES encryption. No plaintext card data ever touches the merchant's server.

### How are API requests secured?

All API requests are signed using **RSA-SHA256** with the merchant's private key. Responses from Antom are verified using Antom's RSA public key. This ensures request authenticity and integrity.

### How are webhooks secured?

Webhook notifications are verified by checking the RSA signature included in each notification payload. Only properly signed notifications are processed.

### What WordPress security measures are in place?

- **Nonce Verification** — All AJAX endpoints use WordPress nonces for CSRF protection
- **Input Sanitization** — All user inputs are sanitized via WordPress core functions (`sanitize_text_field`, `absint`, `floatval`, etc.)
- **Capability Checks** — Admin endpoints check for proper WordPress capabilities

## Refunds

### How do I process a refund?

1. Go to **WooCommerce → Orders**
2. Click the order to refund
3. Click **Refund**
4. Enter the refund amount (full or partial)
5. Submit — the refund is processed via the Antom API

### Are partial refunds supported?

Yes, both full and partial refunds are supported.

## Troubleshooting

### The plugin won't activate

Ensure **WooCommerce** is installed and active. The plugin checks for WooCommerce on activation and will not activate without it.

### I'm getting signature errors

Check your key configuration:
1. **Private Key** — Must be your merchant private key in PKCS#8 format
2. **Public Key** — Must be Antom's public key (not your own)
3. Ensure there are no extra spaces, line breaks, or invisible characters in the key values

### Webhook notifications are not being received

1. Verify the webhook URL is correctly configured in the Antom Merchant Portal
2. Ensure your server is accessible from the internet (not blocked by a firewall)
3. Check that the webhook URL matches exactly: `https://your-store.com/?wc-api=antom_payment_notify`
4. Enable WordPress debug logging to see if webhook requests are arriving

### Payment methods are not appearing in Block Checkout

1. Ensure the block assets are built: run `npm run build` if developing
2. Clear any caching plugins
3. Verify the block support classes are loaded (in `includes/blocks/`)
4. Check the browser console for JavaScript errors

### Orders stay in "Pending Payment" status

This typically means the webhook notification hasn't been received:
1. Check your webhook configuration
2. The plugin includes a fallback inquiry mechanism that checks payment status on subsequent page loads
3. If the issue persists, enable debug logging to investigate

## Support

### How do I contact support?

- **Email:** global.service@alipay.com
- **Documentation:** [Antom WooCommerce Integration Guide](https://global.alipay.com/docs/ac/plugins/woocommerce)
- **Antom Dashboard:** [dashboard.alipay.com](https://dashboard.alipay.com/global-payments/home)

### Where can I register for an Antom account?

Register at the [Antom Dashboard](https://dashboard.antom.com/global-payments/account/register?bizMode=ISV&isvBizScene=ISO_COMMON&registrationSource=WooCommerce).

## See Also

- [Installation Guide](installation.md) — Step-by-step setup
- [Configuration Guide](configuration.md) — Settings reference
- [Webhook & API Reference](webhook-api.md) — Technical API details