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

# Cash App Pay

Use the Cash App Pay Component to let a customer pay with their Cash App account.

```js theme={null}
const cashApp = TBDropin.create("tb_cashApp", qrOptions);
```

> [!NOTE]
>
> Cash App Pay is available for **one-time payments** in **USD**. Pass a
> `billingSessionId` to `pay()` — subscriptions and mandates are not supported.

The component collects nothing from the customer. It is valid as soon as it is mounted, so mounting it and calling `pay()` with it as `payMethod` is the whole integration.

**How the payment completes**

The flow is chosen automatically from the customer's device. You do not need to branch on it.

| Device | What the customer sees |
| - | - |
| Desktop / tablet | The payment popup shows a **Cash App QR code**. The customer scans it with Cash App on their phone and approves the payment. |
| Mobile phone | A new tab opens to Cash App, where the customer approves the payment. The payment popup shows the status in the meantime. |

**Component Options**

`tb_cashApp` accepts the same options as `qrOptions` for [UPI QR](https://developer.transactbridge.com/checkout.js/web-sdk/dropin/components/upi.md#upi-qr). On desktop they style the QR payment popup, with higher priority than `popupConfig`.

> [card] [Customize Your SDK -> QR payment popup](https://developer.transactbridge.com/checkout.js/web-sdk/dropin/customize-your-sdk.md#9-upi-qr-qr-based-payments)
>
> Learn how to customize the QR payment popup

**Returned Value**

**cashApp** `Cash App Object`

```js theme={null}
{
  element: "tb_cashApp",
  value: {
    payMethod: "CASHAPP"
  },
  isValid: true,
  ready: true,
  error: null
}
```

| Field | Type |
| - | - |
| **payMethod** | `string` |

**Code Snippet for cashApp component**

```js theme={null}
const TBDropin = window.TBDropin();

await TBDropin.init({
  mode: "sandbox", // sandbox or production
  publishKey: "", // your publish key goes here
  popupConfig: popupOptions,
});

const cashApp = TBDropin.create("tb_cashApp", qrOptions);

cashApp.mount("#cashApp");

cashApp.on("ready", (data) => console.log("cashApp", data));

const result = await TBDropin.pay({
  billingSessionId: "bs_xxxxx",
  payMethod: cashApp,
  sessionToken,
});
```

### Using your own button

The component renders a transparent button. A common layout is to show your own "Pay with Cash App" tile and keep the component's iframe out of sight inside it:

```html theme={null}
<div id="cashAppTile" class="pay-tile">
  <div id="cashApp" style="width: 1px; height: 1px; overflow: hidden"></div>
  <span>Pay with Cash App</span>
</div>
```

```js theme={null}
const cashApp = TBDropin.create("tb_cashApp", {
  ...qrOptions,
  disableSkeleton: true,
});

cashApp.mount("#cashApp");

document.getElementById("cashAppTile").addEventListener("click", async () => {
  const result = await TBDropin.pay({
    billingSessionId: "bs_xxxxx",
    payMethod: cashApp,
    sessionToken,
  });
});
```

> [!WARNING]
>
> For `tb_cashApp`, the `frameStyle` you pass to `create()` also sizes the
> payment popup. Shrink the component with CSS on its mount node, as shown above,
> rather than with `frameStyle: { width: "1px", height: "1px" }`. A 1 px
> `frameStyle` makes the popup open at its minimum size (320 × 560 px)
> and overrides the popup size you set in `qrOptions` or `popupConfig`.

### Popup blockers

On mobile, Cash App opens in a new tab after the payment is created. If the browser blocks that tab, the SDK fires the root `error` event with code `POPUP_BLOCKED` and `pay()` resolves with `status: "error"`. Ask the customer to allow popups for your site and try again.

```js theme={null}
TBDropin.on("error", (error) => {
  if (error.code === "POPUP_BLOCKED") {
    // show your own "please allow popups" message
  }
});
```

**Next Steps**

* **Customize component styles**
* **Add multiple payment methods using tabs**
* **Handle payment confirmation on backend**
* **Set up webhooks for payment status**

**Need Help?**

Explore the following sections for more details:

* [**Dropin Overview**](https://developer.transactbridge.com/checkout.js/web-sdk/dropin/overview.md)
* [**Quickstart**](https://developer.transactbridge.com/checkout.js/web-sdk/dropin/quickstart.md)
* [**Customization**](https://developer.transactbridge.com/checkout.js/web-sdk/dropin/customize-your-sdk.md)

If you need assistance, our support team is here to help 🚀


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