API to record manual payment for an invoice by invoice id

http
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
invoiceIdstringYes6578278e879ad2646715ba9cInvoice Id

Body

NameTypeRequiredExampleDescription
altIdstringYes6578278e879ad2646715ba9caccount Id / company Id based on altType
altTypestringYesaccountAlt Type Possible values: 'account'
modestringYescardmanual payment method Possible values: 'cash', 'card', 'cheque', 'bank_transfer', 'other'
  • card (object, required)

    • brand (string, required)

    • last4 (string, required)

  • cheque (object, required)

    • number (string, required): check number Example: 129-129-129-912

NameTypeRequiredExampleDescription
notesstringYesThis was a direct paymentAny note to be recorded with the transaction
amountnumberNo999Amount to be paid against the invoice.
metaobjectNo
paymentScheduleIdsstring[]NoPayment Schedule Ids to be recorded against the invoice.
fulfilledAtstringNo2025-03-19T05:03:00.000ZUpdated At to be recorded against the invoice.

Responses

200 - Successful response
  • success (boolean, required): status Example: True

  • invoice (object, required)

    • _id (string, required): Invoice Id Example: 6578278e879ad2646715ba9c

    • status (string, required): Invoice Status Possible values: 'draft', 'sent', 'payment_processing', 'paid', 'void', 'partially_paid' Example: draft

    • liveMode (boolean, required): Live Mode Example: False

    • amountPaid (number, required): Amount Paid Example: 0

    • altId (string, required): Account Id or Agency Id Example: 6578278e879ad2646715ba9c

    • altType (string, required): Possible values: 'account'

    • name (string, required): Name of the invoice Example: New Invoice

    • businessDetails (object, required): Business Details

    • invoiceNumber (number, required): Invoice Number Example: 19

    • currency (string, required): Currency Example: USD

    • contactDetails (object, required): Contact Details

    • issueDate (string, required): Issue date in YYYY-MM-DD format Example: 2023-01-01

    • dueDate (string, required): Due date in YYYY-MM-DD format Example: 2023-01-01

    • discount (object): Discount

    • invoiceItems (string[], required): Invoice Items

    • total (number, required): Total Amount Example: 999

    • title (string, required): Title Example: INVOICE

    • amountDue (number, required): Total Amount Due Example: 999

    • createdAt (string, required): created at Example: 2023-12-12T09:27:42.355Z

    • updatedAt (string, required): updated at Example: 2023-12-12T09:27:42.355Z

    • automaticTaxesEnabled (boolean): Automatic taxes enabled for the Invoice Example: True

    • automaticTaxesCalculated (boolean): Is Automatic taxes calculated for the Invoice items Example: True

    • paymentSchedule (object): split invoice into payment schedule summing up to full invoice amount

json
{
  "success": true,
  "invoice": {
    "_id": "6578278e879ad2646715ba9c",
    "status": "draft",
    "liveMode": false,
    "amountPaid": 0,
    "altId": "6578278e879ad2646715ba9c",
    "altType": "account",
    "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",
    "discount": {
      "type": "percentage",
      "value": 0
  // truncado: 23 lineas mas
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/record-payment' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "account",
  "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"
}'

Last updated October 26, 2026

Was this page helpful?