Delete Bill payments from Oracle NetSuite


We're rolling out support for deleting other data types in the coming months - for details, see our Accounting API Public Product Roadmap.

You can delete Bill payments from Oracle NetSuite using the new Delete object endpoint:

DELETE /companies/{companyId}/connections/{connectionId}/push/billPayments/{billPaymentId}

Where billPaymentId is the Codat ID of the Bill Payment you want to delete.

This is useful if you need to remove a Bill payment that was pushed to NetSuite with errors.

Deletion handling in NetSuite

Depending on the original data that was pushed, a Bill payment is represented in NetSuite as one of the following objects:

  • Bill Payment
  • Vendor Prepayment Application (when applied to one or more Bills)
  • Bill Credit (when applied to one or more Bills)
  • Deposit (only Deposit lines affecting Accounts Payable originate from Bill payments)

NetSuite handles the deletion of each of these differently.

Bill Payments and Vendor Prepayment Applications (when applied to Bills) are removed from NetSuite.

If you specify a billPaymentId that corresponds to a Bill Credit in NetSuite, the Bill Credit object itself is not deleted. The Bill Credit is updated so that it no longer applies to any Bills, and is shown as Unapplied. For example:

If you specify a Bill payment ID that corresponds to a Deposit in NetSuite, only Deposit lines that affect Accounts Payable are deleted. These lines are displayed in the Other Deposits and Cash Back tabs on the Deposit:

Example of deleting a Bill payment

This simple example shows deleting a Bill payment with ID 296687 from NetSuite.

  1. Make the following DELETE request to the Codat API:


    The ID of the Bill payment must be in a format that's accepted by NetSuite, either:

    • A numeric string with no hyphens, e.g. 123456; or
    • Two numeric strings separated by a hyphen, e.g. 12345-67890.
  2. Next, list the push operations for the company using GET /companies/{companyId}/push. A Success status means the Bill Payment object was deleted.

  3. Go to the NetSuite UI and check that the Bill Payment object no longer exists.