> For the complete documentation index, see [llms.txt](https://docs.xverse.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xverse.app/sats-connect/wallet-methods/wallet_open/wallet_openreceive.md).

# wallet\_openReceive

## Help Users Receive Bitcoin Ecosystem Assets

Your app can use the `wallet_openReceive` method to open the user's **Receive** screen in Xverse for a specific address type (payment, ordinals, stacks, spark, starknet).

This enables you to guide users directly to the correct receive flow, without asking them to manually navigate within the wallet.

***

### Request Parameters

#### `address` *(required)*

A string representing which Xverse receive address to open.

Accepted values:

* `payment`\
  **📮** Bitcoin payment address *(native or nested segwit, depending on the current wallet setting)*\
  **🎯** Receive Bitcoin payments
* `ordinals`\
  **📮** Bitcoin ordinals address *(taproot)*\
  **🎯** Receive Bitcoin ordinals, runes, brc-20
* `spark`\
  **📮** Spark address *(the main one, not the airdrop one)*\
  **🎯** Receive Spark BTC and BTKN tokens
* `starknet`\
  **📮** Starknet address\
  **🎯** Receive Starknet tokens & collectibles
* `stacks`\
  **📮** Stacks address\
  **🎯** Receive Stacks tokens & collectibles

***

### Permissions Required

* 🔓 Your app must have first [connected to the wallet](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/connect-to-xverse-wallet) and obtained [account read permissions](https://docs.xverse.app/sats-connect/xverse-wallet-permissions)
* 🔒 If your user has not [connected their active Xverse account to your app](https://docs.xverse.app/sats-connect/connecting-to-the-wallet/connect-to-xverse-wallet) yet, and your app does not the necessary account read [permissions](https://docs.xverse.app/sats-connect/xverse-wallet-permissions) -> the method will throw with an access denied error

***

### Usage Example

```typescript
import { request, RpcErrorCode } from "sats-connect";

async function openReceive() {
  const res = await request("wallet_openReceive", {
    address: "payment",
  });

  if (res.status === "success") {
    // res.result.address contains the address object that was opened in the wallet
    return res.result.address;
  }

  if (res.error.code === RpcErrorCode.ACCESS_DENIED) {
    // Your app is not connected to the user's active account yet
    // You can prompt the user to connect first:
    const permissionRes = await request("wallet_requestPermissions", undefined);

    if (permissionRes.status === "error") {
      // user declined connection
      throw new Error("User declined connection");
    }

    // retry after permissions are granted
    const retry = await request("wallet_openReceive", { address: "payment" });

    if (retry.status === "error") {
      throw new Error("Failed to open receive screen", { cause: retry.error });
    }

    return retry.result.address;
  }

  // Other errors (e.g. invalid address type or address not available)
  throw new Error("Failed to open receive screen", { cause: res.error });
}
```

***

### wallet\_openReceive Result: Open the Receive Screen

✅ If the account is connected and the requested address exists:

* the method resolves successfully
* Xverse wallet opens the **Receive** screen for the requested address type

<figure><img src="https://3630714736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F33DLypUqgcjkBSmN0gZn%2Fuploads%2FvDos4qUvDUwTWkH1CLq4%2Fimage.png?alt=media&amp;token=d071e9b8-278c-4170-9d29-debbca77d47d" alt=""><figcaption></figcaption></figure>

❌ If the account is not connected or the requested address does not exist:

* the method returns an error response

***

### Response Format

The `wallet_openReceive` method returns a Promise that resolves to an `OpenReceiveResult` object.

#### `address`

An address object representing the requested receive address:

```ts
type OpenReceiveAddress = {
  address: string;
  publicKey: string;
  purpose: "payment" | "ordinals" | "stacks" | "spark" | "starknet";
  addressType: "p2tr" | "p2wpkh" | "p2sh" | "stacks" | "spark" | "starknet";
};
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xverse.app/sats-connect/wallet-methods/wallet_open/wallet_openreceive.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
