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

# Testing

> How to test your CeyPay WordPress Plugin integration before accepting real payments.

Thoroughly testing your payment integration is essential before going live. CeyPay provides a built-in Test Mode that simulates the entire payment flow without processing real cryptocurrency transactions.

## Enabling Test Mode

**1. Access Settings**

Navigate to **WooCommerce > Settings > Payments > CeyPay** in your WordPress
admin.

**2. Enable Test Mode**

Check the box labeled **Enable Test Mode**.

**3. Save Changes**

Click **Save changes** at the bottom of the page.

> [!NOTE]
>
> When Test Mode is enabled, only logged-in administrators can see and use the
> CeyPay payment option. Regular customers will not see it at checkout.

## Testing the Payment Flow

### Complete Test Transaction

**1. Add Products to Cart**

Browse your store as an administrator and add one or more products to your cart.

**2. Proceed to Checkout**

Go to the checkout page and fill in the required billing details.

**3. Select CeyPay**

Choose **CeyPay** as your payment method. You should see the CeyPay logo and description.

**4. Place Order**

Click **Place Order** to initiate the payment process.

**5. Select Provider**

In the modal that appears, select a crypto provider:

> [card]
>
> ![Bybit](https://mintcdn.com/ceypay/KFIMU-H1dWfr-NU1/images/BybitPay.svg?fit=max\&auto=format\&n=KFIMU-H1dWfr-NU1\&q=85\&s=c81f99463ba12a30034bbe4d72f04898)

> [card]
>
> ![Binance Pay](https://mintcdn.com/ceypay/KFIMU-H1dWfr-NU1/images/BinancePay.svg?fit=max\&auto=format\&n=KFIMU-H1dWfr-NU1\&q=85\&s=e1e5e2b01136035288029ffc73024797)

> [card]
>
> ![KuCoin](https://mintcdn.com/ceypay/KFIMU-H1dWfr-NU1/images/Kucoin.svg?fit=max\&auto=format\&n=KFIMU-H1dWfr-NU1\&q=85\&s=81ac1c74bacb8348ce37871b984084ba)

**6. View QR Code**

A QR code will be generated. In Test Mode, you'll also see a **"Simulate Success (Test Mode)"** button.

**7. Simulate Payment**

Click the simulation button to complete the test payment.

**8. Verify Completion**

You should be redirected to the Order Received page, and the order status should change to "Processing".

### What to Verify

Use this checklist to ensure your integration is working correctly:

> [accordion] Checkout Display
>
> * [ ] CeyPay appears in the payment methods list - \[ ] Logo displays
>   correctly (both light and dark themes if applicable) - \[ ] Description text
>   is visible

> [accordion] Payment Modal
>
> * [ ] Modal opens after clicking "Place Order" - \[ ] All providers are
>   displayed (Bybit, Binance, KuCoin) - \[ ] Provider selection works
>   correctly - \[ ] QR code loads after selecting a provider - \[ ] "Simulate
>   Success" button appears in Test Mode

> [accordion] Order Processing
>
> * [ ] Order is created with "Pending Payment" status initially - \[ ] Order
>   transitions to "Processing" after simulated payment - \[ ] Order notes show
>   payment confirmation - \[ ] Customer receives order confirmation email

> [accordion] Mobile Experience
>
> * [ ] Modal is responsive on mobile devices - \[ ] Deep link button appears
>   for mobile users - \[ ] QR code is scannable on smaller screens

## Testing Webhooks

While Test Mode simulates immediate payment confirmation, you should also verify that webhooks work correctly.

### Check Webhook Logs

**1. Enable WooCommerce Logging**

Go to **WooCommerce > Status > Logs** to access the log files.

**2. Find CeyPay Logs**

Look for log files prefixed with `ceypay-`. These contain debug information
about webhook processing.

**3. Review Entries**

Check for successful webhook receipts and any error messages.

### Webhook Testing Tools

For more thorough webhook testing, you can use tools like:

* **ngrok** - Create a public URL for your local development environment
* **Webhook.site** - Inspect incoming webhook payloads
* **RequestBin** - Debug webhook requests

> [!WARNING]
>
> These tools are for development/testing only. Never expose your production
> webhook secret or use these tools on a live store.

## Testing WooCommerce Blocks

If your store uses the WooCommerce Blocks checkout:

**1. Verify Block Checkout**

Ensure your checkout page uses the Checkout Block rather than the
shortcode-based checkout.

**2. Test Payment Flow**

Follow the same testing steps as above. The CeyPay payment option should
integrate seamlessly.

**3. Check Console**

Open browser developer tools and check for any JavaScript errors during
checkout.

## Testing Edge Cases

### Payment Expiration

To test expired payments:

1. Start a test payment but don't click "Simulate Success"
2. Wait for the payment to expire (or close the modal)
3. Verify the order remains in "Pending Payment" status

### Failed Payments

Failed payments can be simulated by:

1. Using invalid test data (if supported by the test API)
2. Manually updating order status to "Failed" in WooCommerce admin
3. Checking that appropriate error messages display

### Multiple Payments

Test scenarios with:

* Multiple items in cart
* Various currencies (if your store supports them)
* Different customer billing information

## Going Live Checklist

Before disabling Test Mode and accepting real payments, verify:

> [accordion] Pre-Launch Checklist
>
> * [ ] All test transactions complete successfully - \[ ] Webhooks are received
>   and processed correctly - \[ ] Order emails are sent properly - \[ ] Order
>   statuses update as expected - \[ ] Mobile experience works correctly - \[ ]
>   Error handling works (network failures, etc.) - \[ ] **Merchant ID** is set to
>   your production credentials - \[ ] **Webhook Secret** is set to your production
>   key - \[ ] SSL certificate is valid and not expired - \[ ] Site is accessible
>   from the internet

## Disabling Test Mode

Once testing is complete:

**1. Access Settings**

Go to **WooCommerce > Settings > Payments > CeyPay**.

**2. Disable Test Mode**

Uncheck **Enable Test Mode**.

**3. Verify Credentials**

Confirm your production **Merchant ID** and **Webhook Secret** are entered
correctly.

**4. Save Changes**

Click **Save changes**.

> [!TIP]
>
> Your store is now ready to accept real cryptocurrency payments through CeyPay.

## Next Steps

> [card] [Webhook Reference](https://docs.ceypay.io/integrations/wordpress/webhooks.md)
>
> Deep dive into webhook payloads and signature verification.

> [card] [Troubleshooting](https://docs.ceypay.io/integrations/wordpress/troubleshooting.md)
>
> Solutions for common issues you might encounter.


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