MarketPe APIs

Company Ledger

POST /ledger/company

Real money in and out of your virtual account — wallet loads, completed payments and invoice payments — with the balance after each entry.

This is the JSON form of the Company Ledger excel in the marketpe workspace, and carries the same information.

Request Body

{
  "fromTime": "2025-12-01T00:00:00.000+0530",
  "toTime": "2025-12-05T00:00:00.000+0530"
}

Request Parameters

ParameterTypeRequiredDescription
fromTimestringYesStart of the window, inclusive.
toTimestringYesEnd of the window, exclusive. Must be under 31 days after fromTime.

Response

{
  "status": "success",
  "data": {
    "opening": {
      "timestamp": "2025-11-30T18:30:00.000Z",
      "balance": 0
    },
    "closing": {
      "timestamp": "2025-12-04T18:30:00.000Z",
      "balance": 1999900
    },
    "entries": [
      {
        "timestamp": "2025-12-01T10:25:31.451Z",
        "description": "Loaded into VA",
        "debit": null,
        "credit": 2000000,
        "runningBalance": 2000000,
        "remarks": null,
        "payment": null,
        "walletLoad": {
          "remitterBankAccount": "50100123456789",
          "remitterIfsc": "HDFC0000123",
          "utr": "ref-1234567892"
        },
        "invoice": null
      },
      {
        "timestamp": "2025-12-02T10:27:29.982Z",
        "description": "Paid Vendor",
        "debit": 100,
        "credit": null,
        "runningBalance": 1999900,
        "remarks": "Diesel advance",
        "payment": {
          "autoIdentifier": "PR-1042",
          "amount": 100,
          "paidToBeneficiary": 98,
          "paymentFeeCutAmount": 2,
          "paymentFeeCut": "VENDOR",
          "paymentMode": "IMPS",
          "utr": "uw0obh6pnu",
          "beneficiaryName": "RAVI KUMAR",
          "voucherNumber": null,
          "vendor": null,
          "vpaName": null,
          "driver": null,
          "vehicleRegistrationNumber": "MH12AB1234",
          "branchName": null,
          "tripIdentifiers": ["TRIP-88"],
          "createdBy": "Suresh (Employee)",
          "customFieldValues": {
            "cf-id-1": "CC-12"
          },
          "location": {
            "phone": {
              "latitude": 19.076,
              "longitude": 72.8777,
              "mapsLink": "https://maps.google.com/?q=19.076,72.8777"
            },
            "vehicle": {
              "latitude": 19.0765,
              "longitude": 72.8781,
              "mapsLink": "https://maps.google.com/?q=19.0765,72.8781"
            },
            "phoneToVehicleDistanceMeters": 68
          }
        },
        "walletLoad": null,
        "invoice": null
      }
    ]
  }
}

Response Fields

FieldTypeDescription
opening / closingobjectBalance at the start and end of the window. opening.balance counts everything before fromTime.
entriesarrayLedger entries, oldest first.
entries[].descriptionstringWhat the entry was, as shown in the workspace ledger.
entries[].debitnumber | nullAmount taken out of your usable balance.
entries[].creditnumber | nullAmount added to your usable balance.
entries[].runningBalancenumberUsable balance after this entry.
entries[].remarksstring | nullRemarks on the payment, if any.
entries[].paymentobject | nullSet on a payment entry. See below.
entries[].walletLoadobject | nullSet when you loaded money into the virtual account — remitter account, IFSC and UTR.
entries[].invoiceobject | nullSet when a marketpe invoice was paid — invoiceNumber, tdsAmount and beneficiaryName.

Exactly one of payment, walletLoad and invoice is set on an entry.

payment

FieldTypeDescription
autoIdentifierstringThe payment's identifier in marketpe.
amountnumber | nullThe payment request amount.
paidToBeneficiarynumber | nullWhat the beneficiary received, after the fee cut.
paymentFeeCutAmountnumber | nullFee collected by marketpe.
paymentFeeCutstring | nullWho the fee was cut from — ORG, VENDOR or NONE.
paymentModestring | nullNEFT, IMPS, UPI, …
utrstring | nullBank UTR, once the bank returns one.
beneficiaryNamestring | nullName the money went to.
vehicleRegistrationNumberstring | nullVehicle the payment was raised against.
createdBystring | nullWho raised the payment — the org member, else the workspace user.
customFieldValuesobject | nullYour PAYMENT_ORDER custom field values, keyed by field id, plus an alias key for every field that has one — the same shape payment/get returns.
locationobject | nullWhere the payment was raised. Only org-member payments carry this.

location

phone is the driver's phone location when the payment was raised, vehicle is the vehicle's GPS location at that moment, and phoneToVehicleDistanceMeters is the straight-line distance between the two. Either side can be null if that location was not available.

Errors

{
  "status": "error",
  "errorCode": "failed",
  "message": "time range must be less than 31 days"
}

Last updated on