# Getting Started for Partner

Onboarding on the IPPA for Partners is a **"server-to-server"** communication. Below is the description of how to authenticate with our endpoints.

#### PUBLIC KEY - pk\_*partner\_*&#x78;xx <a href="#publickeypk_partner_xxx" id="publickeypk_partner_xxx"></a>

Your public key will be added to the authorization header as a bearer token when making a request to our System.

#### SECRET KEY OF MERCHANT AND PARTNER - sk\_*merchant\_*&#x78;xx + sk\_partner\_xxx <a href="#secretkeyofmerchantsk_merchant_xxx" id="secretkeyofmerchantsk_merchant_xxx"></a>

The secret key of the merchant and the secret key of the partner *<mark style="background-color:blue;">(for example, concat string:- \[sk\_merchant\_xxx+''+sk\_partner\_xxx] )</mark>* is used to generate the <mark style="background-color:purple;">digital signature</mark> that is attached to the request body when making the following request:

* 1\. Create an order on Intraypay by partner
* 2\. Send Order Notification to Partner Order Notification URL

#### DIGITAL SIGNATURE & ENCRYPTION  <a href="#digitalsignature" id="digitalsignature"></a>

<mark style="background-color:purple;">SHA-512</mark>  is the encryption algorithm used; signed with the SECRET KEY(s)- Partner and merchant for all requests body on collection orders .

{% hint style="warning" %}
Also, note that the signature key in the request body is ignored during the signing of the request body
{% endhint %}

Digital signatures are compared as an integrity test. You compare it when we post callback to you and we compare when you create an order. what is compared is the signed body without the signature field&#x20;

### Partner Onboarding Endpoints <a href="#onboarding" id="onboarding"></a>

{% hint style="danger" %}
Please call this endpoint once. To add extra currency go to you intrapay dashboad and add subaccount for more currencies.&#x20;
{% endhint %}

## This endpoint is to register a partner&#x20;

<mark style="color:green;">`POST`</mark> `https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/OnboardPartner.`

Partner's Public, Secret Keys, and partners ID will be sent to Partner email as a one-time link.&#x20;

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                            | Type   | Description                   |
| ----------------------------------------------- | ------ | ----------------------------- |
| partner\_code<mark style="color:red;">\*</mark> | String | a code signifying the partner |
| email<mark style="color:red;">\*</mark>         | String | email of the partner          |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

### Example request- Code.

{% tabs %}
{% tab title="Nodejs" %}

```javascript
const fetch = require('node-fetch');

fetch("https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/OnboardPartner", {
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "cookie": "connect.sid=s%253AoNBPv4ez8npeuKVKlS9KwX_1Dshiamlf.n8opjPuoF3XsU%252Be0VTLMUe6xzeAXmpCfQrpW9KW1KDs"
  },
  "body": {
    "partner_code": "Binance",
    "email": "sample@example.com"
  }
})
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

{% endtab %}

{% tab title="cURL" %}

```
curl "https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/OnboardPartner" \
  -H 'Content-Type: application/json' \
  -X POST \
  -b 'connect.sid'='s%3AoNBPv4ez8npeuKVKlS9KwX_1Dshiamlf.n8opjPuoF3XsU%2Be0VTLMUe6xzeAXmpCfQrpW9KW1KDs' \
  -d '{
  "partner_code": "Binance",
  "email": "sample@example.com"
}' 
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
After onboarding on the partner onboarding endpoint, you have to provide the IPs for your system. As the IPs need to whitelisted on our system.&#x20;
{% endhint %}

### Regenerate Partners Pub/Priv Keys

## This endpoint is used by partners to regenerate their keys&#x20;

<mark style="color:green;">`POST`</mark> `https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/ResetPartnerKeys/`

A One time reset link is sent to the partner email address to regenerate the keys. Your Partner Id  remains the Same only your pub and priv key changes&#x20;

**Old keys becomes invalid**

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                            | Type   | Description                                 |
| ----------------------------------------------- | ------ | ------------------------------------------- |
| email<mark style="color:red;">\*</mark>         | String | <sample@example.com>                        |
| partner\_code<mark style="color:red;">\*</mark> | String | the partner code used on partner onboarding |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

#### Example Request- Code

{% tabs %}
{% tab title="Node" %}

```javascript
const fetch = require('node-fetch');

fetch("https://exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/GenKeysForPartner", {
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
  },
  "body": {
    "email": "sample@example.com",
    "partner_code":"",
  }
})
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fuspay.gitbook.io/intrapay-p2p-automation/getting-started-for-partner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
