Passbook Api
Passbook
Description :
This API endpoint is used to get the Passbook data records of the user.
Endpoint URL :Request Parameters
| Request Parameter | Data Type | Default Value | Required | Description | Change Date | Change Description |
|---|---|---|---|---|---|---|
| offset | integer | 0 | No | number of records to skip before starting to return results. | ||
| limit | integer | 10 | No | determines the maximum number of records to return in the response. | ||
| from_date | Date | Yes | date in Y-m-d format | |||
| to_date | Date | Yes | date in Y-m-d format, both dates must be from same month | |||
| trans_type | string | Optional | credit, debit | |||
| wallet_type | string | Optional | wallet1, wallet2, wallet3 | |||
| service | int | Optional | id of service | |||
| service_provider | string | Optional | service provider name | |||
| search_by | string | Optional | searching key can be : transaction_number, txn_id, client_id, utr_number | |||
| search_value | string | Optional | search value | |||
| status | string | Optional | SUCCESS, FAILED, PENDING, REFUND, REVERSAL |
Request Example
Responses (JSON)
- Description: Data fetched successfully.
- 'status_code' (integer): 1
- 'message' (string): "records successfully fetched"
- 'recordsTotal' (integer): "number or total records"
- 'recordsFiltered' (integer): "number or records filtered"
- data (object):
- status (string): Transaction status (REVERSAL).
- txn_id (string): Transaction ID.
- complaint_status (string): complaint staus if any dispute raised.
- complaint_count (string): complaint count if any dispute raised.
- 'created_date' (string): "date of record created"
- 'created_time' (string): "time of record created"
- description (string): Transaction description (Refund Against Airtel No. 9669953727 [T20240122194553KTQV]).
- amount (string): Transaction amount (10).
- charged_amt (string): Charged amount (9.23).
- trans_type (string): Transaction type (credit/debit).
- closing_balance (string): Closing balance (50.00).
- utr_number (string): Refrence number of Transaction.
- top_data (object):
- opening_bal (string): opening balance.
- wallet_purchase (string): total wallet purchase.
- wallet_return (string): total wallet return.
- txn_debit (string): total debit amount.
- txn_refund (string): total refund amount.
- comission (string): total commission amount.
- ccf_commission (string): total ccf commission amount.
- ccf_charge (string): total ccf charge amount.
- surcharge (string): total surcharge amount.
- other_charge (string): total other charge amount.
- closing_bal (string): closing balance.
{"status_code": 2, "message": "from_date is required"}, 422
- Status Code 2: Validation Error
- Description: Validation error in the input parameters.
- 'status_code' (integer): 2
- 'message' (string): "A specific validation error message."
{"status_code": 0, "message": "records not found"}, 200
- Status Code 0: Error message
- Description: A specific error message.
- 'status_code' (integer): 0
- 'message' (string): "there is no data found"
Note
- The API endpoint should be accessed via a POST request.
- Ensure that the request is properly validated and sanitized to prevent security vulnerabilities.
- Implement proper error handling on the client side to display user-friendly error messages based on the 'status_code' and 'message' fields in the response.