# Interpret the Transaction Response
source: https://developer.mastercard.com/mastercard-gateway/documentation/integrations-types/hosted-checkout/integrate-hosted-checkout/interpreting-the-response/index.md

After the payer finishes using the Hosted Payment Page, you need to send them back to your website, check if the payment went through, and show them a receipt.

## Step 1: Redirect the payer to your website {#step-1-redirect-the-payer-to-your-website}

Once the payer finishes using the Hosted Payment Page, they are returned to your web site. To do this, you need to give the URL to where they are redirected in one of the following ways:

* Provide the `interaction.returnUrl` field in the [Initiate Checkout](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#hosted-checkout.md) operation.
* Define the complete callback for the Hosted Payment Page. For details, see [Implementing Callbacks](https://developer.mastercard.com/mastercard-gateway/documentation/integrations-types/hosted-checkout/integrate-hosted-checkout/index.md).

## Step 2: Determine the payment result {#step-2-determine-the-payment-result}

The gateway sends the result of the payment in a `resultIndicator` field in one of two ways, depending on how the payer was redirected back to your site:

* Appended to the URL (`interaction.returnUrl`) used for returning the payer to your web site.
* Provided as an input parameter to the function provided in the complete callback or appended to the URL provided in the complete callback.

You can determine the success of the payment by comparing the `resultIndicator` parameter to the `successIndicator` parameter returned in the INITIATE CHECKOUT response. If the parameter match, the payment is successful.
Warning: Do not use the value in the `resultIndicator` parameter as the receipt number.

## Step 3: Display a payment receipt {#step-3-display-a-payment-receipt}

If the operation was successful, display a payment receipt to the payer on your web site, and update your system with the payment details. You can retrieve the payment details in various ways:

* With an API request - Use the [Retrieve Order](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction.md) operation.
* From Merchant Administration - The payment details are recorded in the Merchant Administration portal on the Order and Transaction Details page. You can search for the payment and perform subsequent operations.
* Using Reporting - If your merchant profile has the [Reporting](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/data-and-reporting/reporting/index.md) feature enabled, you can download payment data in a formatted report from the gateway.
* From email or [Webhook notifications](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/webhook-noti/index.md) - If you subscribe to notifications in the Merchant Administration portal, you receive an email or Webhook notification for every successful payment.

Spend some time examining the transaction response fields for each relevant operation in the [Transaction API Reference](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/index.md). All the fields provide valuable information, and you can store some of them locally for accounting, reconciliation, and traceability reasons. The more complex your integration is, the more useful it can be to study specific response codes to identify all aspects of the transaction status.
Warning: It is good practice to validate whether the data you supplied for the transaction is the same as the data used to process the transaction. For example, check that the amount returned in the transaction response matches the value you sent in the request.
