Micro-health Insurance
go on...If a principal customer has one beneficiary that means the number of users is two (2) and you are going to use ''price_config'' for the number of users (2) respectively.

Malaria Care Plan

Create New Subscription

post
https://sandbox.insurpass.com
/api/merchant/initiate_malaria_subscriptions
POST CREATE NEW SUBSCRIPTION
PHP
NODE JS
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/initiate_malaria_subscriptions',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"first_name" : "bob",
16
"surname" : "Bobbison",
17
"email" :"[email protected]",
18
"phone_no": "08102223475" ,
19
"date_of_birth": "1999-09-09",
20
"product_id" : 3,
21
"subscription_type":"monthly",
22
"amount" : 700,
23
"nin_number" : 22222222222,
24
"first_beneficiary_full_name" :"Bob Bobbison",
25
"second_beneficiary_full_name" : "Bob1 Bobbison1",
26
"third_beneficiary_full_name" : " Bob2 Bobbison2",
27
"id_url": "https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
28
"profile_url" :"profile_url"
29
}',
30
CURLOPT_HTTPHEADER => array(
31
'Authorization: Bearer {{SECRETKEY}}',
32
'Content-Type: application/json'
33
),
34
));
35
36
$response = curl_exec($curl);
37
38
curl_close($curl);
39
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"first_name": "bob",
4
"surname": "Bobbison",
5
"email": "[email protected]",
6
"phone_no": "08102223475",
7
"date_of_birth": "1999-09-09",
8
"product_id": 3,
9
"subscription_type": "monthly",
10
"amount": 700,
11
"nin_number": 22222222222,
12
"first_beneficiary_full_name": "Bob Bobbison",
13
"second_beneficiary_full_name": "Bob1 Bobbison1",
14
"third_beneficiary_full_name": " Bob2 Bobbison2",
15
"id_url": "https://images.pexels.com/photos/10840765/pexels-photo-10840765.jpeg",
16
"profile_url": "profile_url"
17
});
18
19
var config = {
20
method: 'post',
21
url: 'https://sandbox.insurpass.com/api/merchant/initiate_malaria_subscriptions',
22
headers: {
23
'Authorization': 'Bearer {{SECRETKEY}}',
24
'Content-Type': 'application/json'
25
},
26
data: data
27
};
28
29
axios(config)
30
.then(function (response) {
31
console.log(JSON.stringify(response.data));
32
})
33
.catch(function (error) {
34
console.log(error);
35
});

Verfy Subscription

post
https://sandbox.insurpass.com
/api/merchant/verify_malaria-subscriptions
VERIFY SUBSCRIPTION
PHP
NODE JS
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/verify_malaria-subscriptions',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"token":"IDP163438169412711526"
16
}',
17
CURLOPT_HTTPHEADER => array(
18
'Authorization: Bearer {{SECRETKEY}}',
19
'Content-Type: application/json'
20
),
21
));
22
23
$response = curl_exec($curl);
24
25
curl_close($curl);
26
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"token": "IDP163438169412711526"
4
});
5
6
var config = {
7
method: 'post',
8
url: 'https://sandbox.insurpass.com/api/merchant/verify_malaria-subscriptions',
9
headers: {
10
'Authorization': 'Bearer {{SECRETKEY}}',
11
'Content-Type': 'application/json'
12
},
13
data: data
14
};
15
16
axios(config)
17
.then(function (response) {
18
console.log(JSON.stringify(response.data));
19
})
20
.catch(function (error) {
21
console.log(error);
22
});
Initiate token expires in 15 minutes, and if a user does not verify his/her subscription after 15 minutes of initiation, the details of the subscription will be deleted.

Renew Subscription

post
https://sandbox.insurpass.com
/api/merchant/top_up/malaria_subscriptions
RENEW USER SUBCRIPTION
PHP
NODE JS
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/top_up/malaria_subscriptions',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"subscription_type":"monthly",
16
"amount" : 200000 ,
17
"policy_no":"UIC/HGJ/7685/GHF"
18
}',
19
CURLOPT_HTTPHEADER => array(
20
'Authorization: Bearer {{SECRETKEY}}',
21
'Content-Type: application/json'
22
),
23
));
24
25
$response = curl_exec($curl);
26
27
curl_close($curl);
28
echo $response;
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"subscription_type": "monthly",
4
"amount": 200000,
5
"policy_no": "UIC/HGJ/7685/GHF"
6
});
7
8
var config = {
9
method: 'post',
10
url: 'https://sandbox.insurpass.com/api/merchant/top_up/malaria_subscriptions',
11
headers: {
12
'Authorization': 'Bearer {{SECRETKEY}}',
13
'Content-Type': 'application/json'
14
},
15
data: data
16
};
17
18
axios(config)
19
.then(function (response) {
20
console.log(JSON.stringify(response.data));
21
})
22
.catch(function (error) {
23
console.log(error);
24
});
The renewal of an insurance plan is dependent on the payment frequency selected by the principal customer at the point of subscription. The payment frequency could either be monthly, quarterly or annually.

Retry Subscription

post
http://sandbox.insurpass.com
/api/merchant/retry_verify_malaria_subscriptions
Retry Subscription
PHP
NODE JS
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'http://sandbox.insurpass.com/api/merchant/retry_verify_malaria_subscriptions',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"subscription_id":"IDP163438169412711526"
16
}',
17
CURLOPT_HTTPHEADER => array(
18
'Authorization: Bearer {{SECRETKEY}}',
19
'Content-Type: application/json'
20
),
21
));
22
23
$response = curl_exec($curl);
24
25
curl_close($curl);
26
echo $response;
27
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"subscription_id": "IDP163438169412711526"
4
});
5
6
var config = {
7
method: 'post',
8
url: 'http://sandbox.insurpass.com/api/merchant/retry_verify_malaria_subscriptions',
9
headers: {
10
'Authorization': 'Bearer {{SECRETKEY}}',
11
'Content-Type': 'application/json'
12
},
13
data: data
14
};
15
16
axios(config)
17
.then(function (response) {
18
console.log(JSON.stringify(response.data));
19
})
20
.catch(function (error) {
21
console.log(error);
22
});
23
Copy link
On this page
Malaria Care Plan
Create New Subscription
post
POST CREATE NEW SUBSCRIPTION
Verfy Subscription
post
VERIFY SUBSCRIPTION
Renew Subscription
post
RENEW USER SUBCRIPTION
Retry Subscription
post
Retry Subscription