# Redirecting to Checkout

After creating an order via `POST /v2/buy` or `POST /v2/sell`, you receive a `checkoutUrl` in the response. The next step is getting the customer to that URL so they can complete their transaction.

## What the checkoutUrl is

The `checkoutUrl` is a one-time URL tied to a specific order. It loads the Banxa checkout pre-populated with the order details (crypto, fiat, wallet address, payment method) you specified when creating the order.

## Redirect (new tab or same window)

The simplest approach: open the `checkoutUrl` in a browser tab.


```javascript
// Open in new tab
window.open(checkoutUrl, '_blank');

// Or redirect same window
window.location.href = checkoutUrl;
```

When the customer completes or cancels the transaction, Banxa redirects them to the `redirectUrl` you provided when creating the order.

## iFrame / WebView (embedded)

Load the `checkoutUrl` as the `src` of an iFrame (web) or as the URL in a WebView (mobile).


```html
<!-- Web iFrame -->
<iframe
  src="https://checkout.banxa.com/order/f0dfb073f5dbedff4559867aab52aba6"
  width="480"
  height="700"
  allow="camera; microphone; payment"
></iframe>
```

For mobile WebView implementation, specific platform configuration is required.

→ See [Embedded Checkout — Web](/products/hosted-checkout/docs/checkout-experience/iframe/iframe-web) and [Embedded Checkout — Mobile](/products/hosted-checkout/docs/checkout-experience/iframe/webview-mobile).

## Checkout URL expiry

The `checkoutUrl` is valid for a limited time. If the customer does not complete checkout before the URL expires, the order status will move to `expired` and the customer will need to restart.

## After checkout

When the transaction is complete, the customer is redirected to your `redirectUrl`. To get the final order status programmatically, either:

- Listen for a **webhook** notification (recommended).
- Poll the **order lookup** endpoint.


→ See [Webhooks](/products/hosted-checkout/docs/transaction-lifecycle/webhooks) and [Order Lookup](/products/hosted-checkout/docs/transaction-lifecycle/order-lookup).