# Testing the CCAvenue payment method

You can test your payment integration in the CCAvenue sandbox. Always use your [test API keys](https://app.gitbook.com/s/oUderMtztdH7OKDXmYbI/commerce-api-reference-guide/api-structure/api-keys) to prevent you from interacting directly with payment services when evaluating your integration. Ensure that the test data you enter does not create an actual charge or result in the funds transfer.

Use your confidential (secret) test API key when conducting testing in the Commerce API. Use your public test API key to create test payment sources in DigitalRiver.js.

Your testing approach depends on whether the payment method has an [authentication flow](https://docs.digitalriver.com/commerce-api/sources#authentication-flow) of redirect. If you don't know the flow of the payment method you'd like to test, you can find it on the [Supported payment methods](https://docs.digitalriver.com/commerce-api/payments/supported-payment-methods) page.

Use the following payment information when running a test.

| Payment option | Payment information                      | Notes                                                                                                                                                                                                                                                                                                                                        |
| -------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Credit Card    | 4111111111111111 / 123                   | The expiration date must be at lease one day in the future.                                                                                                                                                                                                                                                                                  |
| Net Banking    | AvenueTest                               |                                                                                                                                                                                                                                                                                                                                              |
| UPI            | select BHIM (first button) / 123456\@upi | Wait for the countdown. Unified Payment Interface (UPI) identifier can be any six-digit number and @upi—for example, 123456\@upi and 458093\@upi. You can use every UPI identifier multiple times per day. However, when testing, you should either (1) clear the cookies or (2) use an incognito window every time after placing the order. |
| Wallet         | AvenueTest                               |                                                                                                                                                                                                                                                                                                                                              |

## Success and error scenarios

Use any card number under [Testing the CCAvenue payment method](#testing-the-ccavenue-payment-method) to test for successful or failed payment scenarios. Visit the Bank Response Page via the following URL to specify the card's behavior: <https://test.ccavenue.com/bnk/servlet/processCCardReq?gtwID=AVN\\&requestType=PAYMENT>. Before running the test scenario, complete the necessary fields and set the **Transaction Status** to **Y** for a success scenario and **N** for an error scenario.

<div align="left"><figure><img src="https://2721412755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LzlYMEYC0GeLSgnsft6%2Fuploads%2FMClW3XfrbNGX1dYtD9mq%2Fimage.png?alt=media&#x26;token=6f80125c-c26b-4936-9a03-dea6de402a1c" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/payments/testing-scenarios/testing-the-ccavenue-payment-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
