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

# Hosted Checkout

> Understand the hosted checkout experience and when to use it.

Hosted Checkout is intended for applications that want to use a hosted payment experience rather than building the complete payment interface themselves.

## When to use Hosted Checkout

Hosted Checkout can be useful when:

* You want a ready-made payment experience.
* You do not want to build the complete payment UI yourself.
* You want payment handling separated from your application's frontend.
* You want your application to receive the resulting payment status.

## Typical flow

```text theme={null}
Your application
      ↓
Create checkout session
      ↓
Vaayu hosted payment page
      ↓
Customer completes payment
      ↓
Payment processed
      ↓
Webhook
      ↓
Your application
```

Your application should treat the payment result as asynchronous. A customer completing the hosted page does not replace server-side confirmation.

## Security

Never put your secret Vaayu API key into frontend JavaScript.

```text theme={null}
Browser
   │
   ↓
Your backend
   │  x-api-key
   ↓
Vaayu API
```

<Warning>
  A redirect or customer-facing success page is not a substitute for server-side payment confirmation.
</Warning>

## Sandbox

Build and test your checkout flow using the Vaayu sandbox before using real-value payments.

<CardGroup cols={2}>
  <Card title="Direct Payments" icon="arrow-right">
    Build a payment flow directly into your own application.
  </Card>

  <Card title="Payment Status" icon="clock" href="/payment-status">
    Learn how to verify the result of a payment.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.