Payments

Payment Logs

Get all online payments

Using the below method all online payment logs can be retrieved

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

Query parameters

Variable NameDescriptionData Type
to_dateDate till which logs need to be fetched
Format: Y-m-d H:i:s
String
from_dateDate from which logs need to be fetched
Format: Y-m-d H:i:s
String
amountAmount paidString
operatorQualifier for amount.
> : Greater than
< : Smaller than
>= : Greater than and equal to.
<= : Smaller than ans equal to.
<> : Not equal to
String

Get all offline payment

Using the below method all online payment logs can be retrieved

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

Query parameters

Variable NameDescriptionData Type
to_dateDate till which logs need to be fetched
Format: Y-m-d H:i:s
String
from_dateDate from which logs need to be fetched
Format: Y-m-d H:i:s
String
amountAmount paidString
operatorQualifier for amount.
> : Greater than
< : Smaller than
>= : Greater than and equal to.
<= : Smaller than ans equal to.
<> : Not equal to
String

Response variables [Online/Offline payments]

Variable NameDescriptionData Type
idUnique ID of paymentString
amount_paidAmount paidString
payment_idUnique payment IDString
created_atDate -time of paymentString
created_atDate -time of paymentString
payment_gatewayPayment gateway nameString
statusStatus of payment
[ success, pending ]
String
amount_addedAmount added in accountInteger
amount_taxTax paid for paymentInteger

Online Payment

[
    {
        "id": 1,
        "amount_added": 0.00,
        "amount_tax": 0.00,
        "amount_paid": "0.00",
        "payment_id": "xxxx...xxxx",
        "gateway": "xxxx...xxxx",
        "status": "success",
        "created_at": "01-Feb-2019 15:23:27"
    },
    {
        "id": 2,
        "amount_added": 0.00,
        "amount_tax": 0.00,
        "amount_paid": "0.00",
        "payment_id": "xxxx...xxxx",
        "gateway": "xxxx...xxxx",
        "status": "pending",
        "created_at": "01-Feb-2019 15:22:24"
    }
]

Offline Payment

[
    {
        "id": 1,
        "amount_added": 0.00,
        "amount_tax": 0.00,
        "amount_paid": 0,
        "status": "Success",
        "created_at": "01-Feb-2019 00:00:00",
        "comment": "xxx...xxx",
        "type": "Manual Payment"
    },
    {
        "id": 2,
        "amount_added": 0.00,
        "amount_tax": 0.00,
        "amount_paid": 0,
        "status": "Success",
        "created_at": "01-Feb-2019 00:00:000",
        "comment": "xx...xxx",
        "type": "Manual Payment"
    }
]

🚧

Fields that can be empty

payment_id : Empty if payment is pendng
gateway : is present in case of online payment