I think you'd either have to use the search api to...
# suitescript
a
I think you'd either have to use the search api to find 'bank payment details' that reference the customer, then nlapiDeleteRecord on the result. Or use the sublist api to remove the line item from the sublist. Although, I'm reading the docs and it does not make it very clear what nlapiRemoveLineItem() does. Does it delete or simply 'orphan' the record by removing the reference, I don't know. Docs say 'Removes the currently selected line in a sublist.'