> For the complete documentation index, see [llms.txt](https://docs.subsprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.subsprotocol.com/developer-docs/subs-sdk/read.md).

# Read

#### Initialize Subs Client

```typescript
import { SubsSDK, PaymentType, PeriodType, SubsPayment, Keypair } from 'subs-sdk';

// Initialize with wallet private key (keep this secure!)
const subsClient = new SubsSDK("YOUR_WALLET_PRIVATE_KEY", "testnet"); // "testnet" or "mainnet"
```

### Get Payments IDs

```typescript
await subsClient.get_app_payments(
  appId,        // BigInt
);
```

It will return the list of Payments ID in side one particular App.

### Get User Subscriptions

```typescript
await subsClient.get_user_subscriptions(
  userAdress,        // String
);
```

It will return a list of Subscription IDs for one particular User.

### Get Subscription

```typescript
await subsClient.get_subscription(
  subsId,        // String
);
```

It will give you all the data concerning a particular Subscription.

### Get App Subscribers

```rust
await subsClient.get_app_subscribers(
  appId,        // BigInt
  paymentId,    // String
);
```

It will return a list of User subscribed to a particular Payment of an App.

### Get App Subscriptions

```rust
await subsClient.get_app_subscriptions(
  appId,        // BigInt
);
```

It will return a list of Subscription IDs for a particular App.

### Get Already Subscribed

```rust
await subsClient.get_already_subscribed(
  appId,        // BigInt
  user,         // String
);
```

It will return a boolean if the User is subscribed to an App.&#x20;

### Get Canceled Subscription

```rust
await subsClient.get_cancel_subscription(
  subs_id,      // String
);
```

It will give you a boolean if the User has canceled his Subscription.
