After you registered a new application for Ecwid, send your custom discount URL (your server endpoint) to Ecwid team. Ecwid will be sending order details requests to that endpoint and expect discounts in a specific format in response.
If your application is for a public use, the request URL must be working via HTTPS. Also, the certificate can only be from trusted CA's and not self-signed.