# 🧪 Testing & Environment

Redision provides a sandbox (testing) environment to help you integrate and validate your payment flow before going live.

***

### 🔧 Base URLs

| Environment | URL                                    |
| ----------- | -------------------------------------- |
| Sandbox     | `https://sandbox-payment.redision.com` |
| Production  | *Ask your Redision contact*            |

***

### 🧾 Sample Credentials

You will be provided with the following for UAT:

* `appkey`: Unique application key
* `appid`: Application ID
* `appsecret`: Secret used for generating `bodysign`

If you do not have sandbox credentials, please contact your Redision account manager or integration support.

***

### 📘 Testing Flow

1. **Create Order V1 or V2**\
   Submit a transaction using any supported `payment_method` and valid `amount`.
2. **Redirect to Payment Page**\
   Use the `token` from response to open the hosted payment page.
3. **Complete Payment or Simulate Result**\
   Depending on the method, you may be able to simulate completion (e.g., e-wallet mock).
4. **Receive Callback**\
   Redision will send a callback if status reaches `payment_completed` (code `1000`).
5. **Verify Transaction Status**\
   Use the `/checkstatus/{merchant_transaction_id}` endpoint to confirm status.

***

### 🧪 Smartfren OTP Test Case

When testing with Smartfren:

* A `reference_id` will be returned.
* You can call the OTP endpoint `/api/smartfren/otp` with dummy values.

```json
{
  "otp": "123456",
  "reff_id": "REFERENCE-ID-TEST"
}
```


---

# 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://redpay.gitbook.io/redpay-docs/testing-and-environment.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.
