API to record manual payment for an invoice by invoice id
POST
/
invoices
/
{invoiceId}
/
record-payment
Record a manual payment for an invoice
curl --request POST \
--url https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"mode": "card",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"cheque": {
"number": "129-129-129-912"
},
"notes": "This was a direct payment",
"amount": 999,
"meta": {},
"paymentScheduleIds": [
"6578278e879ad2646715ba9c"
],
"fulfilledAt": "2025-03-19T05:03:00.000Z"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
altId: '6578278e879ad2646715ba9c',
altType: 'location',
mode: 'card',
card: {brand: '<string>', last4: '<string>'},
cheque: {number: '129-129-129-912'},
notes: 'This was a direct payment',
amount: 999,
meta: {},
paymentScheduleIds: ['6578278e879ad2646715ba9c'],
fulfilledAt: '2025-03-19T05:03:00.000Z'
})
};
fetch('https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment"
payload = {
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"mode": "card",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"cheque": { "number": "129-129-129-912" },
"notes": "This was a direct payment",
"amount": 999,
"meta": {},
"paymentScheduleIds": ["6578278e879ad2646715ba9c"],
"fulfilledAt": "2025-03-19T05:03:00.000Z"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"invoice": {
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"invoiceItems": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"total": 999,
"title": "INVOICE",
"amountDue": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z",
"discount": {
"type": "percentage",
"value": 0
},
"automaticTaxesEnabled": true,
"automaticTaxesCalculated": true,
"paymentSchedule": {}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Headers
API Version
Available options:
2021-07-28 Path Parameters
Invoice Id
Example:
"6578278e879ad2646715ba9c"
Body
application/json
location Id / company Id based on altType
Example:
"6578278e879ad2646715ba9c"
Alt Type
Available options:
location Example:
"location"
manual payment method
Available options:
cash, card, cheque, bank_transfer, other Example:
"card"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Any note to be recorded with the transaction
Example:
"This was a direct payment"
Amount to be paid against the invoice.
Example:
999
Payment Schedule Ids to be recorded against the invoice.
Example:
["6578278e879ad2646715ba9c"]
Updated At to be recorded against the invoice.
Example:
"2025-03-19T05:03:00.000Z"
Last modified on March 8, 2026
Was this page helpful?
⌘I
Record a manual payment for an invoice
curl --request POST \
--url https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"mode": "card",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"cheque": {
"number": "129-129-129-912"
},
"notes": "This was a direct payment",
"amount": 999,
"meta": {},
"paymentScheduleIds": [
"6578278e879ad2646715ba9c"
],
"fulfilledAt": "2025-03-19T05:03:00.000Z"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
altId: '6578278e879ad2646715ba9c',
altType: 'location',
mode: 'card',
card: {brand: '<string>', last4: '<string>'},
cheque: {number: '129-129-129-912'},
notes: 'This was a direct payment',
amount: 999,
meta: {},
paymentScheduleIds: ['6578278e879ad2646715ba9c'],
fulfilledAt: '2025-03-19T05:03:00.000Z'
})
};
fetch('https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment"
payload = {
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"mode": "card",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"cheque": { "number": "129-129-129-912" },
"notes": "This was a direct payment",
"amount": 999,
"meta": {},
"paymentScheduleIds": ["6578278e879ad2646715ba9c"],
"fulfilledAt": "2025-03-19T05:03:00.000Z"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"invoice": {
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"invoiceItems": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"total": 999,
"title": "INVOICE",
"amountDue": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z",
"discount": {
"type": "percentage",
"value": 0
},
"automaticTaxesEnabled": true,
"automaticTaxesCalculated": true,
"paymentSchedule": {}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}