> For the complete documentation index, see [llms.txt](https://docs.startrail.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.startrail.io/startrail-sdk-js/startrail-api-methods/checkerc2981royalty.md).

# Check ERC2981 Royalty

To know the methods calling to Startrail API from Startrail-Sdk-Js

## `checkERC2981Royalty()`

Retrieve royalty payment information for SRR that is in accordance with ERC-2981 for non-fungible tokens (NFTs).

Refer to ERC-2981: NFT Royalty Standard for more details.

## Method parameters

| Variable          | Type     | Description                                                                                                                                                                      |
| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contractAddress` | `string` | The address of collection contract. Sets it when you want to associate collection contract address with the SRR.                                                                 |
| `tokenId`         | `string` | Startrail Registry Record Token ID. Sets it when SRR is already issued and you know the tokenId.                                                                                 |
| `metadata`        | `object` | Sets it instead of tokenId if SRR has not been issued yet. Refer to the [Startrail Registry (SRR) data schema](/metadata-schema/startrail-registry-srr.md) for all possible data |
| `issuerAddress`   | `string` | The ethereum address of the issuer of the artwork. Sets it instead of tokenId if SRR has not been issued yet.                                                                    |

### Parameters Example

```
sdk.checkERC2981Royalty(
  {  
    tokenId: '212786904920'
  }
)

```

## Returns

`Promise` will be returned which resolves with a `Response` object upon a successful confirmation. `false` will be returned when user flow is cancelled in such a case that a user closes the popup modal.

If the confirmation fails, the `Promise` will resolve with an {error} object that describes the failure.

`Promise<Response | false>`

### Response

| Variable             | Type             | Description                                                                                                             |
| -------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `royaltyReceiver`    | `string \| null` | The Etherem address of SRR Royalty receiver, null if its ERC2981 is not activated or ineligible                         |
| `royaltyBasisPoints` | `string \| null` | SRR royalty basis points, null if its ERC2981 is not activated or ineligible. Divide it by 100 to see the actual nmber. |

### Error

Custom `Error` objects. Refer to the [Error Catalogue](/startrail-sdk-js/errors.md) for possible data.

### Response Example

```
{
  "royaltyReceiver": "0xA6E6a9E20a541680a1D6E1412f5088AefBF58a22",
  "royaltyBasisPoints": "1570",
}
```


---

# 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.startrail.io/startrail-sdk-js/startrail-api-methods/checkerc2981royalty.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.
