Sometimes it happens that you pay, but the relay does not receive the notification and does not switch.
This problem can be solved by using hold invoices, confirming the payment only after the switch has sent an ACK to the server or canceling it after a timeout.