Due Charges

Get Details of all Due Charges

Get Details of all due charges

Using the below method a list of all due charges can be obtained

curl --request GET \
  --url https://api.servetel.in/v1/billing/due_charges \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere'

Query parameters

Variable Name

Description

Data Type

status

Status for due charge
Allowed status: pending, complete, cancelled

String

Response variables

Variable Name

Description

Data Type

total_due_amount

Total Due amount to be paid by the user

Integer

data

Array of call due charges

Array of objects

data[n].id

Unique ID of the due charge

Integer

data[n].open_amount

Amount yet to be paid by the user

Integer

data[n].due_amount

Due charge amount

Integer

data[n].description

Description related to due charge

String

data[n].payment_status

Status of the due charge, 1: pending, 2: Completed, 3: Cancelled

Integer

data[n].due_date

Date till which amount needs to be paid

String

data[n].created_at

Date on which due charge was created

String

data[n].updated_at

Date on which due charges was updated

String

{
    "total_due_amount": 10,
    "data": [
        {
            "id": 1,
            "open_amount": 10,
            "due_amount": 10,
            "description": "xxxx....xxxx",
            "payment_status": 1, // Pending
            "due_date": "2019-02-01 00:00:00",
            "created_at": "2019-02-01 00:00:00",
            "updated_at": ""
        },
        {
            "id": 2,
            "open_amount": 0,
            "due_amount": 10,
            "description": "xxxx....xxxx",
            "payment_status": 2, // Completed
            "due_date": "2019-02-01 00:00:00",
            "created_at": "2019-02-01 00:00:00",
            "updated_at": "2019-02-01 00:00:00"
        },
        {
            "id": 3,
            "open_amount": 10,
            "due_amount": 10,
            "description": "xxxx....xxxx",
            "payment_status": 3, // Cancelled
            "due_date": "2019-02-01 00:00:00",
            "created_at": "2019-02-01 00:00:00",
            "updated_at": "2019-02-01 00:00:00"
        }
    ]
}

Pay all due charges

Using the below method all the due charges for the user's account can be paid

curl --request POST \
  --url https://api.servetel.in/v1/billing/due_charge/pay/all \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere'

Response variables

Variable Name

Description

Data Type

success

Request success status

Boolean

message

Message corresponding success status

String

Pay a due charge

Using the below method a particular due charge can be paid

curl --request POST \
  --url https://api.servetel.in/v1/billing/due_charge/pay/id \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere'

Path parameter

Variable Name

Description

Data Type

id*

Unique ID of due charge

String

Response variables

Variable Name

Description

Data Type

success

Request success status

Boolean

message

Message corresponding success status

String