Get payment ledger
curl --request GET \
--url https://app.getswipe.in/api/partner/v1/customer/ledger \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getswipe.in/api/partner/v1/customer/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getswipe.in/api/partner/v1/customer/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"ledger": [
{
"serial_number": "PAYIN-2",
"total_amount": 100,
"amount_pending": 0,
"balance": -16795.8,
"date": "13-06-2024",
"mode": "UPI",
"bank_details": {
"account_number": "1234567890",
"ifsc": "SBIN0000001",
"bank_name": "State Bank of India",
"branch": "Mumbai"
},
"created_time": "2024-06-13 10:08:13",
"notes": "",
"status": "Success"
}
],
"closing_balance": 100,
"is_paid": true,
"total_records": 10
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}Customer
Get payment ledger
v1 is deprecated — use the v2 endpoint instead. Returns a customer’s payment ledger over a required date range — documents, payments, and the running balance.
GET
/
v1
/
customer
/
ledger
Get payment ledger
curl --request GET \
--url https://app.getswipe.in/api/partner/v1/customer/ledger \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.getswipe.in/api/partner/v1/customer/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.getswipe.in/api/partner/v1/customer/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"ledger": [
{
"serial_number": "PAYIN-2",
"total_amount": 100,
"amount_pending": 0,
"balance": -16795.8,
"date": "13-06-2024",
"mode": "UPI",
"bank_details": {
"account_number": "1234567890",
"ifsc": "SBIN0000001",
"bank_name": "State Bank of India",
"branch": "Mumbai"
},
"created_time": "2024-06-13 10:08:13",
"notes": "",
"status": "Success"
}
],
"closing_balance": 100,
"is_paid": true,
"total_records": 10
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Query Parameters
Start date for the ledger, [DD-MM-YYYY]
End date for the ledger, [DD-MM-YYYY]
Customer ID
Number of records to fetch
Page number

