# Testing & Go Live (1.0)

## 1. Test your integration

Complete end-to-end testing in your sandbox to make sure the entire integration functioning well as expected.

### Test REST API Requests and Responses

During the development, kindly use the sandbox API base URL as follows: `https://sandbox.idrt-gateway.rupiahtoken.com /v1`, thus you can safely test all the REST API requests without affecting the production environment.

Log into the sandbox dashboard site, [`https://sandbox.dashboard.rupiahtoken.com`](https://sandbox.dashboard.rupiahtoken.com)  to see the result of the REST API call.

### **Test the Purchase Flow**

When a purchase request  is created, our systems will send a callback to the URL configured in the dashboard. For further instructions about callbacks, kindly refer to the following guideline:&#x20;

#### Purchase Created Callback

Here is an example of body parameter that are sent from IDRT Fiat Gateway API to your purchase created callback URL.

| Parameter             | Description                                       |
| --------------------- | ------------------------------------------------- |
| purchase\_id          | An Purchase ID generated by IDRT Fiat Gateway API |
| user\_id              | Your User ID                                      |
| amount                | Nominal amount for the purchase                   |
| due\_date             | ISO timestamp Due date of payment                 |
| bank\_name            | Bank Code. Value:  MANDIRI, PERMATA, MANDIRI      |
| bank\_account\_number | Virtual Account Number                            |
|                       |                                                   |

#### Purchase Status Callback

Here is an example of body parameter that are sent from IDRT Fiat Gateway API to your purchase status callback URL.

| Parameter     | Description                                          |
| ------------- | ---------------------------------------------------- |
| purchase\_id  | An Purchase ID generated by IDRT Fiat Gateway APIs   |
| user\_id      | Your User ID                                         |
| amount        | Nominal amount for the purchase                      |
| status        | Status of Payment. Value : success, failed, canceled |
| payment\_date | ISO timestamp of payment date                        |

## 2. Go Live with your integration

Deploying your code to the live environment takes only the following few steps:

1. Change the base URL for all your REST API calls from `https://sandbox.idrt-gateway.rupiahtoken.com/v1` to `https://.api-dashboard.rupiahtoken.com/v1`.
2. Change the references to your sandbox API key to the live API Key.&#x20;
3. If you created or updated pages on a website, move that code from the test environment to the live environment.
