> For the complete documentation index, see [llms.txt](https://poseidons-navy.gitbook.io/nine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://poseidons-navy.gitbook.io/nine/how-tos/how-to-use-nine-sdk.md).

# How to use Nine SDK

This page gives information on how to install the Nine SDK and an example on how to use it

The Nine SDK is currently supported on typescript. To install it run the following command:

{% tabs %}
{% tab title="npm" %}
npm i nine-sdk
{% endtab %}

{% tab title="pnpm" %}
pnpm add nine-sdk
{% endtab %}
{% endtabs %}

After installing the SDK we can connect it to a requests creation node. The team has created one node that can be used by the public but in future, we plan on allowing people to run their own nodes.  The node created by the team is **<https://nine-ad9w.onrender.com>**

```typescript
// Initialize the SDK
const sdk = new NineSdk({
  baseUrl: '<request-creation-node-url'>, 
})
```

After initializing the SDK we can make payments with it. To make a payment we indicate the payment amount in micro APT, indicate the payee(the address of the person to be paid), the payer( address of the person who is to pay), what the payment is for and when it is due. The signer address is the address of the person signing the payment, it can be that of the payer An example of how to do this is indicated below:

```typescript
let payeeAddress = "0x1243214..."
let payerAddress = "0x4523423..."

// Create the payment request
const paymentResponse = await sdk.createRequest({
  requestInfo: {
    expectedAmount: 1, 
    payeeAddress: payeeAddress, 
    payerAddress: payerAddress,
    timestamp: new Date().toISOString(),
  },
  contentData: {
    reason: 'Order Payment',
    dueDate: new Date().toISOString(),
  },
  signerAddress: payerAddress,
})
```

The Nine SDK assumes that the payer has created an account on the nine app inorder for them to receive a push notifcation. This means that the payerAddress needs to have been registered on nine app
