> Source: https://developers.terrawallet.us/docs/pay/hosted-checkout . Terra Wallet developer docs (early access).

# Hosted checkout

Every payment intent has a hosted checkout page at `https://pay.terrawallet.us/c/pi_...`, returned as
`checkout_url`. Redirect your customer there. Payment links (`/l/plink_...`), invoices (`/i/inv_...`) and
subscription links (`/s/plan_...`) have hosted pages on the same host.

> **Early access.** Hosted checkout ships with Terra Pay. The page design may change before launch.

## What your customer sees

- Your display name and logo, the amount in your currency, and the exact crypto amount for each asset you
  accept, locked for the quote window.
- **Any wallet:**
  - Terra Wallet pays in one tap with a deep link;
  - any other wallet connects through WalletConnect or a browser extension (EIP-6963);
  - a plain address and QR code work for exchange withdrawals, with memo and tag handling where a network needs
    it.
- **The full address, always.** The page shows the whole address with its checksum and a copy guard against
  address poisoning. QR is preferred, and your payout wallet is verified on the page.
- A live status that updates when the payment is seen and when it is confirmed.

## Redirects

Set `success_url` and `cancel_url` when you create the intent. Checkout sends the customer to `success_url` after
paying and to `cancel_url` if they leave.

**A redirect is not proof of payment.** A customer can open your success URL by hand. Fulfil the order only from
a verified `payment_intent.succeeded` webhook, and confirm the state with the API.

## What the page never shows

The page reads a public view of the intent (`GET /v1/checkout/:id`) that contains only what it needs: your
display name, logo URL, the amount, the quotes and the status. It never contains your metadata, customer emails or
internal ids beyond the public one.

## Merchant content rules

- Your display name and descriptions are plain text with length caps. No HTML or scripts on any Terra page.
- Logos are virus-scanned and re-encoded before use.
- An embedded checkout can be framed only by the origins you allowlist.

## Embedding instead of redirecting

The planned `pay-js` package and the `terra-pay-button` element open checkout as a modal or inline on your own
site. See [SDK: pay-js](https://developers.terrawallet.us/docs/sdk/pay-js.md) and [SDK: elements](https://developers.terrawallet.us/docs/sdk/elements.md). Neither is published yet.
