API v1.0.0

Download Postman Collection

Get Information

Through this api you will get the details of the customer and related services e.g. TV, Internet, IPTV etc.

Test CUID

You can use test cuid 1000001, 1000002, 1000003, 1000004 and 1000005.

https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/get-customer-information
Attribute Mandatory Description
code Yes Provide the customer's registered mobile no., customer id, stb no. or internet username.
 curl -X POST 'https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/get-customer-information' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3d3dy50aW1lc3Byby5uZXQvIiwiaWF0IjoxNjIyNzQyNzA4LCJleHAiOjE2MjUzMzQ3MDgsIm5iZiI6MTYyMjc0MjcwOCwianRpIjoiYW05Zk5uXzVMNjVSelVuZGJDIiwic3ViIjoxMDAxLCJwcnYiOiIwYTViZ2M5NmE5OTBkM2YxNjAxZjBiODM3Y2I0YzRhZWZoZThiNDUyIiwiZW52IjoidGVzdCJ9.zr8gZ8FVKbUM327-cdrFRAJnOcI9aZxX72o1B9CaskI' \
  --data '{"code":"{code}"}'
{
    "success": true,
    "code": "400aa010",
    "body": {
        "customer": {
            "cuid": "1000000",
            "first_name": "rajesh",
            "last_name": "lamichhane",
            "status": "active"
        },
        "connection": {
            "tv": [
                {
                    "stb": "24243342",
                    "status": "active"
                },
                {
                    "stb": "242b422df433w42",
                    "status": "inactive"
                }
            ],
            "internet": [
                {
                    "username": "rajesh-lamichhane",
                    "status": "active"
                }
            ],
            "iptv": []
        }
    }
}

Get Package

Choose customer service (tv, internet or iptv) from above Get Information API and pass it for the package information. Here you will get checkoutId for topup activity.

https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/get-subscription-package
Attribute Mandatory Description
cuid Yes The Customer ID field.
service Yes Choose the service e.g. tv, internet or iptv.
reqId Yes - Provide stb number if the service is tv
- Provide username if the service is internet
 curl -X POST 'https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/get-subscription-package' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3d3dy50aW1lc3Byby5uZXQvIiwiaWF0IjoxNjIyNzQyNzA4LCJleHAiOjE2MjUzMzQ3MDgsIm5iZiI6MTYyMjc0MjcwOCwianRpIjoiYW05Zk5uXzVMNjVSelVuZGJDIiwic3ViIjoxMDAxLCJwcnYiOiIwYTViZ2M5NmE5OTBkM2YxNjAxZjBiODM3Y2I0YzRhZWZoZThiNDUyIiwiZW52IjoidGVzdCJ9.zr8gZ8FVKbUM327-cdrFRAJnOcI9aZxX72o1B9CaskI' \
  --data '{"cuid":"{cuid}","service":"{service}","reqId":"{reqId}"}'
{
    "success": true,
    "code": "400aa010",
    "body": {
        "checkoutId": "AHf2lUAduUJRFYVmrQp66581",
        "customer": {
            "cuid": "1000000",
            "first_name": "rajesh",
            "last_name": "lamichhane",
            "status": "active"
        },
        "internet": {
            "connection": {
                "username": "rajesh-lamichhane",
                "status": "active"
            },
            "subscriptions": [
                {
                    "code": "130",
                    "name": "10Mbps Monthly - Nepalgunj",
                    "startdate": "2021-06-03 02:09:53",
                    "enddate": "2021-06-05 02:09:53"
                }
            ],
            "bouquets": [
                {
                    "code": "132",
                    "name": "10Mbps Half Yearly - Nepalgunj (HALF YEARLY)",
                    "amt": 7451
                },
                {
                    "code": "130",
                    "name": "10Mbps Monthly - Nepalgunj (MONTHLY)",
                    "amt": 1355
                },
                {
                    "code": "131",
                    "name": "10Mbps Quarterly - Nepalgunj (QUARTERLY)",
                    "amt": 3894
                },
                {
                    "code": "134",
                    "name": "10Mbps Yearly - renew- Nepalgu (YEARLY)",
                    "amt": 11000
                },
                {
                    "code": "137",
                    "name": "15Mbps Half Yearly - Nepalgunj (HALF YEARLY)",
                    "amt": 7909
                },
                .
                ..
                ...
            ]
        }
    }
}

Topup

Through this api you will get the details of the customer and related services e.g. TV, Internet, IPTV etc.

https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/subscription-package-topup
Attribute Mandatory Description
cuid Yes The Customer ID field.
service Yes Choose the service e.g. tv, internet or iptv.
reqId Yes Provide the customer's stb no. or internet username according to service.
checkoutId Yes The Checkout ID is topup activity token. It's unique and valid for 5 minutes only.
bouquetId Yes The Bouquet ID field, Choose bouquet code for the Get Package API.
amt Yes The selected bouquet amount value.
 curl -X POST 'https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/subscription-package-topup' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3d3dy50aW1lc3Byby5uZXQvIiwiaWF0IjoxNjIyNzQyNzA4LCJleHAiOjE2MjUzMzQ3MDgsIm5iZiI6MTYyMjc0MjcwOCwianRpIjoiYW05Zk5uXzVMNjVSelVuZGJDIiwic3ViIjoxMDAxLCJwcnYiOiIwYTViZ2M5NmE5OTBkM2YxNjAxZjBiODM3Y2I0YzRhZWZoZThiNDUyIiwiZW52IjoidGVzdCJ9.zr8gZ8FVKbUM327-cdrFRAJnOcI9aZxX72o1B9CaskI' \
  --data '{"cuid":"{cuid}", "service":"{service}", "reqId":"{reqId}", "checkoutId":"{checkoutId}", "bouquetId":"{bouquetId}", "amt":"{amt}"}'
{
    "success": true,
    "code": "400ab001",
    "body": {
        "result": {
            "orderId": "AHf2lUAduUJRFYVmrQp66581",
            "txnId": "N112Q0N9cIFTosjN3E56",
            "cuid": "1000000",
            "reqId": "rajesh-lamichhane",
            "bouquetId": "134",
            "amt": 11000,
            "txnDate": "2021-01-01 16:08:51",
            "status": "success",
            "service": "internet"
        }
    }
}

Txn Status

This API gets the transaction status corresponding to requested OrderId (Checkout ID) for specific service eg. tv, internet, iptv etc..

Note

The Txn Status API needs to be called after the Topup API to verify the transaction.

https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/txn-status
Attribute Mandatory Description
checkoutId Yes Use the token (Checkout ID / Order ID) that was used at the time of topup.
 curl -X POST 'https://icare.websurfer.com.np/staging/api/third-party/v1.0.0/txn-status' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3d3dy50aW1lc3Byby5uZXQvIiwiaWF0IjoxNjIyNzQyNzA4LCJleHAiOjE2MjUzMzQ3MDgsIm5iZiI6MTYyMjc0MjcwOCwianRpIjoiYW05Zk5uXzVMNjVSelVuZGJDIiwic3ViIjoxMDAxLCJwcnYiOiIwYTViZ2M5NmE5OTBkM2YxNjAxZjBiODM3Y2I0YzRhZWZoZThiNDUyIiwiZW52IjoidGVzdCJ9.zr8gZ8FVKbUM327-cdrFRAJnOcI9aZxX72o1B9CaskI' \
  --data '{"checkoutId":"{checkoutId}"}'
{
    "success": true,
    "code": "400ab001",
    "body": {
        "result": {
            "orderId": "AHf2lUAduUJRFYVmrQp66581",
            "txnId": "N112Q0N9cIFTosjN3E56",
            "cuid": "1000000",
            "reqId": "rajesh-lamichhane",
            "bouquetId": "134",
            "amt": 11000,
            "txnDate": "2021-01-01 16:08:51",
            "status": "success",
            "service": "internet"
        }
    }
}