> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customise Redirect Behaviour

> Display a confirmation page with your customer's order information.

When someone makes a payment using Paywint Checkout, they are taken to Paywint’s secure checkout page.
After the payment attempt is finished—whether it succeeds or fails—Paywint automatically **redirects the customer back to your website**.

It’s how your site knows the result of the payment so you can show the appropriate message.

***

## How It Works

1. Your customer clicks “Pay” in your app or website.
2. Paywint opens its secure checkout page.
3. The customer chooses a payment method and completes the process.
4. When the payment finishes, Paywint **redirects the customer back to the page you chose** (your Redirect URL”).
5. Paywint adds two small pieces of information to the web address when sending them back:

   * `id`: the unique Paywint payment number
   * `status`: the result of the payment (`success`, `failed`, or `rejected`)

That’s it—the customer is now back on your site, and you know what happened with their payment.

***

## Example Redirects

After a payment, Paywint might send the customer back to your site like this:

```text theme={null}
https://yourapp.com/checkout/result?status=success&id=pay_9f3a2c
https://yourapp.com/checkout/result?status=failed&id=pay_9f3a2c
```

Notice the extra `id` and `status` at the end of the web address. You can use these values to decide what message to show your customer.

***

## What the Status Means

| Status    | What it means for the payment   | What you might show your customer               |
| --------- | ------------------------------- | ----------------------------------------------- |
| `success` | The payment went through.       | “Payment successful! Thank you for your order.” |
| `failed`  | The payment did not go through. | “Something went wrong. Please try again.”       |

> Some payment methods may initially display a processing status. This means the final result will be available later. In such cases, your system should wait for confirmation—either through a webhook or by checking the payment details in Paywint.

***

## Where to Setup

You decide the page where customers should land after payment. This is called your **Redirect URL**.

### Sandbox

Use the **Sandbox environment** to test your redirect behavior before moving to production.

1. **Create a Sandbox Account:**\
   Sign up for a [Sandbox Account](https://sandbox.app.paywint.com) to start testing your integration.

2. **Get API Key:**\
   Go to the [Developer Panel → API Key](https://sandbox.app.paywint.com/app/developer-panel/api-credentials) section to generate your Sandbox API key.

3. **Configure Redirect URLs:**\
   In the [Developer Panel → Redirect/Webhook](https://sandbox.app.paywint.com/app/developer-panel/urls) section, you’ll find fields to enter your test endpoints:
   * **Payment Redirect URL:**\
     The endpoint to which redirects happen when a specific payment action completes.\
     Example: `https://example.com/Redirect/payment`

### Production

Once your Sandbox testing is complete, you can move to the **Production environment**.

Before enabling your Production setup, please contact our [support team](https://paywint.com/contact) to ensure your API and redirect configurations are properly activated.

1. **Create a Production Account:**\
   Sign up for a [Production Account](https://app.paywint.com).

2. **Enable Production Access:**\
   Contact our [support team](https://paywint.com/contact) to request activation of your Production API and redirect setup.

3. **Get API Key:**\
   Go to the [Developer Panel → API Keys](https://app.paywint.com/app/developer-panel/api-credentials) section to obtain your Production API key.

4. **Set Your Redirect URL:**\
   In the [Developer Panel → Redirect/Webhook](https://app.paywint.com/app/developer-panel/urls) section, enter your live redirect endpoint.\
   Example: `https://yourapp.com/checkout/payment`

5. **Support Contacts:**\
   If you need assistance during setup:

* **Email:** [support@paywint.com](mailto:support@paywint.com)
* **Phone:** [+1 (408) 461-5543](tel:+14084615543)
* **Live Chat:** Available via the Paywint Dashboard

***

## Why This Matters

* Redirects allow customers to **return to your app smoothly** after completing a payment.
* You can immediately display a confirmation page showing whether the payment was successful, failed, or rejected.
* To ensure complete accuracy, your system should also verify the final result through Paywint’s webhook or by retrieving the payment details.

***

## Quick Setup

1. In [Developer Panel → Redirect/Webhook](https://app.paywint.com/app/developer-panel/urls), set your **Payment Redirect URL** (the page where customers should land after payment).
2. Make sure this page can read the `status` and `id` from the web address.
3. Show your customer the right message based on the result.

That’s all—your customers always end up back in your app, and you can guide them to their next step.
