About RecordAPPayment
Payments made via Bill.com are automatically recorded. Use this API to record payments made outside of Bill.com. This creates an offline bill payment. Optionally, you can use the chartOfAccountId to represent that the payment was made via manual checks, wire transfers, credit card payments, or any other payment method.
One or more Bill can be specified and recorded as a single payment on the processDate. Vendor Credits (one or more) can be specified on individual bills when recording the payments.
Example
In the nested billPays array, the billId and amount are required parameters. If you are applying bill credits to a bill, billId, vendorCreditId and amount are required parameters in the billCredits array.
In this example:
- A bill payment of 100.00 is recorded for the
00n01FABNELTTBR40cmibill - A bill payment of 50.00 (40.00 amount + 10.00 bill credit) is recorded for the
00n01PPHKAPTHFQ40cmlbill
Request
<API_URL_EndPoint>/RecordAPPayment.json
data={
"vendorId" : "00901GYCSRGZVFZ2r8ar",
"processDate" : "2016-12-15",
"toPrintCheck" : false,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"description" : "Manual check payment",
"syncReference" : null,
"billPays" : [{
"billId" : "00n01FABNELTTBR40cmi",
"amount" : 100.00
},{
"billId" : "00n01PPHKAPTHFQ40cml",
"amount" : 40.00
}],
"billCredits" : [{
"billId" : "00n01PPHKAPTHFQ40cml",
"vendorCreditId" : "vcr01XIZKWCWTFMO8nb7",
"amount" : 10.00
}]
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "SentPay",
"id" : "stp01FHRBATDBPF3e0zf",
"processDate" : "2016-12-15",
"amount" : 100.00,
"status" : "2",
"description" : "Manual check payment",
"txnNumber" : "ILPLPZDFPUPVRYVJGINW",
"name" : "P16121501 - 0929668",
"vendorId" : "00901GYCSRGZVFZ2r8ar",
"isOnline" : false,
"paymentType" : "4",
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"syncReference" : null,
"toPrintCheck" : false,
"createdTime" : "2016-12-15T18:35:09.106+0000",
"updatedTime" : "2016-12-15T18:35:09.195+0000",
"bankAccountId" : "00000000000000000000",
"billPays" : [ {
"entity" : "BillPay",
"id" : "blp01DCARTLGENX6i9dw",
"billId" : "00n01FABNELTTBR40cmi",
"name" : "P16121501 - 0929668",
"paymentStatus" : "2",
"amount" : 100.00,
"description" : "Manual check payment",
"processDate" : "2016-12-15",
"createdTime" : "2016-12-15T18:35:09.000+0000",
"updatedTime" : "2016-12-15T18:35:09.000+0000",
"paymentType" : "1",
"syncReference" : null,
"toPrintCheck" : false,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng"
},{
"entity" : "BillPay",
"id" : "blp01DCARTLGENX6i9dw",
"billId" : 00n01PPHKAPTHFQ40cml
"name" : "P16121501 - 0929125",
"paymentStatus" : "2",
"amount" : 50.00,
"description" : "Manual check payment",
"processDate" : "2016-12-15",
"createdTime" : "2016-12-15T18:35:09.000+0000",
"updatedTime" : "2016-12-15T18:35:09.000+0000",
"paymentType" : "1",
"syncReference" : null,
"toPrintCheck" : false,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng"
} ],
"billCredits" : [ {
"entity" : "BillCredit",
"id" : "bcr01FUAGSBMFVCONgo2",
"billId" : "00n01DYCNSZKWCZWfxbe",
"sentPayId" : "stp01FWVZFXERSXCfa2o",
"vendorCreditId" : vcr01XIZKWCWTFMO8nb7
"amount" : 13.00,
"createdTime" : "2016-12-15T18:35:09.000+0000",
"updatedTime" : "2016-12-15T18:35:09.000+0000",
} ]
}
}
Resources
Parameters
Request parameters
| Field Name | Description | Required? |
|---|---|---|
| vendorId | The system generated ID of the vendor to be paid. | Yes |
| processDate | The process date for the bills to be paid. Funds are withdrawn on this date. If the process date is not passed, API uses the next available business date for payments. | Yes |
| toPrintCheck | Indicate whether a check should be printed for this payment. | Yes |
| chartOfAccountId | ID of the payment account. | No |
| description | A description of the payment. | No |
| syncReference | Indicate the reference number for the offline payment (for example, Check number, CC Transaction number, and more). | No |
| billPays | Array of one or more bills to be paid. The object contains the fields as described in the billPay array parameters table. | Yes |
| billCredits | Array of vendor credits to be applied. The object contains the fields as described in the billCredit array parameters table. | No |
billPays array parameters
| Field Name | Description | Required? |
|---|---|---|
| billId | The system generated ID of the bill that was paid. | Yes |
| amount | The amount that was paid. | Yes |
billCredits array parameters
| Field Name | Description | Required? |
|---|---|---|
| billId | The system generated ID of the bill that was paid. | Yes |
| vendorCreditId | The system generated ID of the vendor credit that was applied. | Yes |
| amount | The amount that was applied. | Yes |