You don’t need to do payment with SambaCard credit funds to check how much they spent.
You can use Customer accounts for that with a custom field, and still pay with cash.
Change the Customer entity type to have a ‘CardNr’ as primary field, and add a Custom Field ‘TotalSpent’ as well.
Setup rules/actions to update the TotalSpent custom field when a payment is made:
Action: AC UpdateTotalSpent
Rule: RU Add payment to customer TotalSpent
Are you using V4? For V3, there’s a little issue with the rule’s custom constraint which you have to be careful about. After you save the rule, you cannot edit it again or the first constraint will disappear, and you have to put it back in again every time.
When a ticket is opened, you select a customer (swiping the card to select the customer through CardNr), and when a cash payment is made, the amount will be automatically added to the customer’s TotalSpent field.
You could also do the same setup with SambaCard Customer Card entity instead of Customer entity.
To upgrade the customer status (standard, silver, gold), you add another action to the same rule which updates another Custom field of Customer entity (like ‘CustomerStatus’). Add a constraint to the action to check if the TotalSpent amount is bigger than a certain amount and smaller than the amount for the next status.
Another approach would be to use entity states for this.