# Tests to validate your integration

[You can check our transactions status here](/v1/guides/status-flow.md)

This documentation page outlines the testing process for **payment** and **payout** integrations.

The purpose of this testing is to ensure that the integration runs smoothly and without any issues.<br>

Through a series of test scenarios, including **changes** in payment and payout statuses, we verify that the integration is functioning correctly and that all transactions are properly processed.

This testing is an **essential step** in ensuring the **reliability** and **effectiveness** of the integration.<br>

***

\
We will be testing a total of **6 transactions**, which includes **3 payments** and **3 payouts**.

Our goal is to cover all possible scenarios that could occur in a production environment.

Once we receive the Unique Identifiers (UIDs) for these transactions, we will proceed with changing their status to simulate various scenarios.

During this testing process, we will walk through each scenario step-by-step, explaining them in detail as needed, before moving on to the next one.

> If any of the test flow test cases fail, we will **halt the testing process** until the issue is resolved.
>
> This is to ensure that any further tests will not be impacted by the issue, and that we can maintain the reliability and consistency of the integration. Our goal is to deliver a high-quality integration.

***

## Payment Flow Validation

\
We perform 3 tests to cover different payment scenarios

### Test 1: Change status from `pending` to `paid`

<figure><img src="https://docs.smartfastpay.com/assets/images/payment-test1.png" alt=""><figcaption></figcaption></figure>

### Test 2: Change status from `pending` to `expired`

<figure><img src="https://docs.smartfastpay.com/assets/images/payment-test2.png" alt=""><figcaption></figcaption></figure>

### Test 3: Change status from `pending` to `denied`

<figure><img src="https://docs.smartfastpay.com/assets/images/payment-test3.png" alt=""><figcaption></figcaption></figure>

***

## Payout Flow Validation

We perform 4 tests to cover different payout scenarios.

### Test 1: Change status from `pending` to `onhold` (2 transactions)

We require two transactions with the <mark style="color:red;">`onhold`</mark> status for payouts: one for use in **Test 2** and the other for **Test 3**.

<figure><img src="https://docs.smartfastpay.com/assets/images/payout-test1.png" alt=""><figcaption></figcaption></figure>

### Test 2: Change status from `onhold` to `success`

<figure><img src="https://docs.smartfastpay.com/assets/images/payout-test2.png" alt=""><figcaption></figcaption></figure>

### Test 3: Change status from `onhold` to `failed`

<figure><img src="https://docs.smartfastpay.com/assets/images/payout-test3.png" alt=""><figcaption></figcaption></figure>

### Test 4: Change status of a `success` transaction to `refunded`

> This scenario happens when the **customer** or the **bank entity** refunds the amount to **our bank account** for some reason.<br>
>
> In this case, the amount **must be returned** to the customer.
>
> \
> When this happens, our suggestion is to refund the customer through **your platform** so that they can make a new payout request.

<figure><img src="https://docs.smartfastpay.com/assets/images/payout-test4.png" alt=""><figcaption></figcaption></figure>


---

# 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.smartfastpay.com/v1/guides/tests-validate-integration.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.
