Postman collection
Payments Write

pixiCADeleteEventMatches

Deletes all customer account matches of a customer account entry (CAref), including the bank matches derived from them.

Removes every match in which the given customer account entry takes part.

  1. The common API envelope runs first. It checks the call-frequency limit and records the call time. If the limit is exceeded, the call returns a ResultCode/ResultText row with code 502 and does nothing else.
  2. If CAref is NULL, a row with ReturnCode = ERROR is returned and nothing is deleted.
  3. Otherwise the procedure collects all records in CustomerAccountMatch where CAref1 or CAref2 equals CAref. For each match key it then does the following:
    • It sets UpdateDate to the current time and UpdateEmp to API on the match.
    • It deletes all BankMatch rows whose SourceCustomerAccountMatchKey points to the match.
    • It deletes the match itself.

On success the call returns no result set. The output parameters ResultCode/ResultText hold 200/OK.

Notes

  • Each match is deleted in its own transaction inside Pixi_CA_DeleteMatch. There is no overall transaction. If deleting one match fails, only that match is rolled back and its error is re-raised with RAISERROR (severity 16). Matches deleted before it stay deleted. The loop continues with the remaining matches.
  • The list of matches is read with NOLOCK. The deletes use ROWLOCK.
  • The update of UpdateDate/UpdateEmp right before the delete is probably meant for audit or trigger logic. The code does not show this.
  • The match is found if CAref appears on either side (CAref1 or CAref2).
  • If no match exists for CAref, the call succeeds silently without any result.
  • ResultCode stays 200 even when the CAref cannot be NULL row is returned. Evaluate the returned row as well.
  • The frequency limit comes from API_CONTROL.MIN_BREATHING_MSEC for this function name.

Tables used

CustomerAccountMatch · Write BankMatch · Write API_STATISTICS · Write API_CONTROL · Read
SQL object:
dbo.pipiCADeleteEventMatches
Updated at 2026-10-30