Skip to content

Commit

Permalink
Merge pull request #32 from om-ghimire/main
Browse files Browse the repository at this point in the history
Update Vianet documentation
  • Loading branch information
omG-himire authored Jan 9, 2025
2 parents 5fb34ed + 95a2d27 commit 9bfb508
Show file tree
Hide file tree
Showing 112 changed files with 6,532 additions and 447 deletions.
56 changes: 37 additions & 19 deletions content/Insurance/Arhant Insurance/non_life.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
# **Arhant Non-Life Insurances**

**Overview:** This document provides information on the non-life insurance services offered by Arhant, including the endpoints for retrieving proforma details and completing payments.
**Overview:**
This document provides information on the non-life insurance services offered by Arhant, including the endpoints for retrieving proforma details and completing payments.

**Available Non-Life Insurance Services:**
---

1. ##### **Shikhar Insurance**
- **Service Slug:** `shikhar-insurance`
### **Available Non-Life Insurance Services:**

2. ##### **United Insurance**
- **Service Slug:** `united-ajod-insurance`
| **Insurance Company** | **Service Slug** | **Notes** |
|------------------------------------|----------------------------------|----------------------------------------------------------------------------|
| Ajod Insurance | `ajod-insurance` | Obsolete. Merged with United Insurance. Use United Insurance API. |
| Everest Insurance | `everest-insurance` | Obsolete. |
| GIC Insurance | `gic-insurance` | Obsolete. |
| Lumbini General Insurance | `lumbini-general-insurance` | Merged with Sagarmatha Insurance API. Lumbini General Insurance is obsolete. |
| NLG Insurance | `nlg-insurance` | |
| Premier Insurance | `premier-insurance` | Obsolete. Merged with Siddhartha Insurance. Use Siddhartha Insurance API. |
| Sanima General Insurance | `sanima-general-insurance` | |
| Shikhar Insurance | `shikhar-insurance` | Obsolete. |
| Siddhartha Insurance | `siddhartha-insurance` | |
| United Insurance | `united-insurance` | |

**API for Retrieving Proforma Details** ``{{base_url}}/api/servicegroup/details/arhant-non-life-insurance/``
---

**Method:** POST
### **Details**

**Request Parameters:**
- **URL:** `{{base_url}}/api/servicegroup/details/arhant-non-life-insurance/`
- **Method:** POST

#### **Request Parameters:**
To get the proforma details, send a POST request with the following parameters:

<pre><code class="json">
{
"token": "token",
"reference": "reference",
"proforma_no": "01458110",
"service_slug": "service_slug"
}
</pre>
</code></pre>

**Example Response:**
#### **Example Response:**
The response provides detailed information about the proforma, such as premium amounts, insured details, and vehicle information.

<pre><code class="json">
{
"success_message": "Proforma is valid",
Expand All @@ -44,26 +59,29 @@ The response provides detailed information about the proforma, such as premium a
"session_id": 20327,
"status": true
}
</pre>
</code></pre>

**API for Completing Payment**
---

**Endpoint:** Complete Payment: {{base_url}}/api/servicegroup/commit/arhant-non-life-insurance/
### **Payment**

**Method:** POST
- **URL:** `{{base_url}}/api/servicegroup/commit/arhant-non-life-insurance/`
- **Method:** POST

**Request Parameters:**
#### **Request Parameters:**
To finalize the payment, send a POST request with these parameters:

<pre><code class="json">
{
"token": "token",
"reference": "reference",
"session_id": "session_id"
}
</pre>
</code></pre>

**Example Response:**
#### **Example Response:**
The response confirms the transaction status and provides details about credits consumed and remaining.

<pre><code class="json">
{
"status": true,
Expand All @@ -75,4 +93,4 @@ The response confirms the transaction status and provides details about credits
"credits_available": "xxxxxxxx",
"id": 62849
}
</pre>
</code></pre>
24 changes: 13 additions & 11 deletions content/Insurance/prudential/prudential.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# 11.19. Prudential Insurance
# **Prudential Insurance**

**Type**: Multi Step API

## 1. Get Branches API
---

**Request URL**: {{base_url}}/api/servicegroup/getpackages/prudential-insurance/
## 1. Get Branches API

**Request Method**: POST
- **Request URL**: `{{base_url}}/api/servicegroup/getpackages/prudential-insurance/`
- **Request Method**: POST

**Service Params**:
### **Service Params**:

<pre><code class="json">
{
"token": "token"
}
</code></pre>

**Response**:
### **Response**:

<pre><code class="json">
{
Expand All @@ -36,13 +37,14 @@
}
</code></pre>

## 2. Payment API
---

**Request URL**: {{base_url}}/api/use/prudential-insurance/
## 2. Payment API

**Request Method**: POST
- **Request URL**: `{{base_url}}/api/use/prudential-insurance/`
- **Request Method**: POST

**Service Params**:
### **Service Params**:

<pre><code class="json">
{
Expand All @@ -57,7 +59,7 @@
}
</code></pre>

**Response**:
### **Response**:

<pre><code class="json">
{
Expand Down
102 changes: 102 additions & 0 deletions content/Internet/vianet-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Vianet

## 1. Service Group Details API

### URL
`{{base_url}}/api/servicegroup/details/vianet-updated/`

### Method
`POST`

### Request Payload
<pre><code class="json">
{
"token": "token",
"reference": "Unique reference",
"customer_id": 110871
}
</code></pre>

### Success Response
<pre><code class="json">
{
"status": true,
"details": {
"message": "Success",
"amount": 27719,
"policy_no": "63190031433",
"customer_name": "Aayushma Malla",
"product_name": "Child Endowment(Bal Umanga)",
"interest_rate": "12.00",
"loan_amount": "32000.00",
"loan_date": "2023-02-02",
"principal_amount": "27628.00",
"request_id": "63190031433-2016",
"interest": "91.00"
},
"session_id": 12341
}
</code></pre>

### Error Response
<pre><code class="json">
{
"status": false,
"error_code": "7000",
"message": "Unknown Error occured. Check details",
"error": "unknown_error",
"details": "You have no pending bills right now !!",
"error_data": {},
"state": "Error"
}
</code></pre>

---

## 2. Payment Commit API

### URL
`{{base_url}}/api/servicegroup/commit/vianet-updated/`

### Method
`POST`

### Request Payload
<pre><code class="json">
{
"token": "{{token}}",
"session_id": "{{session_id}}",
"payment_id": "{{payment_id}}",
"amount": {{amount}},
"reference": "{{$guid}}"
}
</code></pre>

### Success Response
<pre><code class="json">
{
"status": true,
"state": "Success",
"message": "Successfully Completed Transaction",
"extra_data": {},
"detail": {
"message": "Payment Successfull! Thank you for using Online Payment Option"
},
"credits_consumed": 277.98,
"credits_available": 999006795.14,
"id": 130144
}
</code></pre>

### Error Response
<pre><code class="json">
{
"status": false,
"error_code": "4000",
"message": "Can't fulfill request",
"error": "client_error",
"details": "Payment seems to have already been Made!",
"error_data": {},
"state": "Error"
}
</code></pre>
5 changes: 4 additions & 1 deletion content/Internet/vianet.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Vianet
# Vianet Deprecated

> **Note:** Please ensure to follow the latest API in the Vianet documentation. [Click here](/Internet/vianet-new/) for more details.

### Overview

Expand Down
4 changes: 4 additions & 0 deletions content/Servicescodes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## **Change Log**
**Version 7.1, Janaury 9th 2025**

* Updated Vianet docs


**Version 7.0, December 26 2024**

Expand Down
4 changes: 2 additions & 2 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# **Khalti Services Documentation**


## *Version 7.0*
## *Version 7.1*

## *Last Update 26 December, 2024*
## *Last Update 9 Janaury, 2025*

**Check the [Change Log]( Servicescodes/changelog.md) here.**

Expand Down
25 changes: 23 additions & 2 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@


<li class="md-nav__item">
<a href="/Internet/vianet/" class="md-nav__link">
<a href="/Internet/vianet-new/" class="md-nav__link">


<span class="md-ellipsis">
Expand Down Expand Up @@ -1784,6 +1784,27 @@









<li class="md-nav__item">
<a href="/Internet/vianet/" class="md-nav__link">


<span class="md-ellipsis">
Vianet (old)
</span>


</a>
</li>




</ul>
</nav>

Expand Down Expand Up @@ -1977,7 +1998,7 @@


<span class="md-ellipsis">
Insurance
Himalayan General Insurance
</span>


Expand Down
25 changes: 23 additions & 2 deletions docs/Bus/add-info/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@


<li class="md-nav__item">
<a href="../../Internet/vianet/" class="md-nav__link">
<a href="../../Internet/vianet-new/" class="md-nav__link">


<span class="md-ellipsis">
Expand Down Expand Up @@ -1793,6 +1793,27 @@









<li class="md-nav__item">
<a href="../../Internet/vianet/" class="md-nav__link">


<span class="md-ellipsis">
Vianet (old)
</span>


</a>
</li>




</ul>
</nav>

Expand Down Expand Up @@ -1986,7 +2007,7 @@


<span class="md-ellipsis">
Insurance
Himalayan General Insurance
</span>


Expand Down
Loading

0 comments on commit 9bfb508

Please sign in to comment.