# React Native checkout screen (Pro)

> A React Native checkout screen for iOS, Android and the web: the order, shipping address, delivery speed, payment method, a promo code and live totals with tax in your currency, then Pay.

# Checkout Pro

One screen from the bag to **Pay**: the order, the address, delivery speed as radio buttons, the payment method, a promo code, and totals with tax that update as you choose, in your currency. The pay button is busy until `onPay` resolves. Try the code **SAVE10**.

```tsx
import { CheckoutScreen } from '@patine-ui/pro';
```

```tsx live device
import { CHECKOUT_ITEMS, CheckoutScreen, SHIPPING_OPTIONS } from '@patine-ui/pro';

const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

export default function Example() {
  return (
    <CheckoutScreen
      items={CHECKOUT_ITEMS}
      shippingOptions={SHIPPING_OPTIONS}
      address="Rua Augusta 12, Lisbon"
      paymentMethod="Visa ·· 4242"
      taxRate={0.08}
      onApplyPromo={(code) => (code.toUpperCase() === 'SAVE10' ? 1000 : null)}
      onPay={() => wait(900)}
    />
  );
}
```

## Make it yours

| Prop | Type | Default |
| --- | --- | --- |
| `items` | `{ id, name, variant?, quantity, price }[]`, prices in cents | **Required** |
| `shippingOptions` | `{ id, title, … }[]` | **Required** |
| `address`, `paymentMethod` | `string` | **Required** |
| `taxRate` | `number`: 0.23 for 23% | `0` |
| `currency`, `locale` | ISO 4217, BCP 47 | `'USD'`, the device's |
| `onApplyPromo` | `(code) => cents \| null` | No promo field |
| `onPay` | `({ shippingId, totals }) => void \| Promise<void>` | **Required** |
| `onEditAddress`, `onEditPayment`, `onBack` | `() => void` | None |

For a multi-step checkout, see [Ouro's](/templates/store#checkout), built on the [Wizard](./wizard).

Built from the free [List](/docs/components/list), [RadioGroup](/docs/components/radio-group), [TextField](/docs/components/text-field) and [Header](/docs/components/header).

## In real apps

Every complete app has its own version of this screen, wired to its auth, data and settings: see the [templates](/templates).

## Related

- [Paywall](./paywall) PRO
- [Order tracker](./order-tracker) PRO
- [All blocks](./overview)
