How to get response from IPN cryptocurrencies

You cannot use localhost for a IPN callback. You must use a public domain name.

As an example I would change the following parameters:

var uri = new UriBuilder("https://www.coinpayments.net/api.php"); 
uri.SetQueryParam("success_url", "http://kugugshivom-001-site1.atempurl.com/Home/SuccessResponse");
uri.SetQueryParam("cancel_url", "http://kugugshivom-001-site1.atempurl.com/Home/FailiureResponse");
uri.SetQueryParam("ipn_url", "http://kugugshivom-001-site1.atempurl.com/Home/CoinPaymentsIPN"); // Public ActionResult CoinPaymentsIPN()

Since you are creating your own gateway you also need to implement it properly as described in the documentation at CoinPayments API and Instant Payment Notifications (IPN).

I have tested your success_url endpoint, and got status code: 100 (when entering status:100). I see you use form-data, but I don't know if that's on purpose / required.

Postman POST http://kugugshivom-001-site1.atempurl.com/Home/SuccessResponse In Body tab form-data is selected with Bulk Edit values:

ipn_version:1.0
ipn_type:api
ipn_mode:hmac
ipn_id:your_ipn_id
merchant:your_merchant_id
txn_id:your_transaction_id
status:100

As updated answer stated by @Gillsoft AB, you should need to use valid IPN URL from the code end. Also webhook would not work with localhost. thus, you should listen the request with live server.

Simplest way to check webhook response is to use online tool such as Webhook Tester, it will provide an URL which you have to set as your IPN URL, whenever server will sends the data, you can simply see it to the web. To check that, create one URL and set as your IPN URL as below:

 uri.SetQueryParam("ipn_url", "https://webhook.site/#/457f5c55-c9ce-4db4-8f57-20194c17d0ae");

After that run the payment cycle from local machine, payment server will sends notification to that IPN URL.

Make sure you understood it right! success_url and cancel_url are for user redirection, you will not get any response code over there, inspection of seller's store URL give your exact same URL that you have been passing though, so it is recommended to use unique URLs for each order(i.e add order id at last to the URL) which will give you an idea which order payment has been done or canceled.

http://localhost:49725/home/SuccessResponse?orderid=123

In order to test your local code, add following changes and deployed it to server.

1) Add one new method which will listen IPN response

[ValidateInput(false)]
public ActionResult IPNHandler()
{
    byte[] param = Request.BinaryRead(Request.ContentLength);
    string strRequest = Encoding.ASCII.GetString(param);

    //TODO: print string request 

    //nothing should be rendered to visitor
    return Content(""); 
} 

2) Pass IPN URL while creating a request:

public ActionResult IPN()
{                        
    var uri = new UriBuilder("https://www.coinpayments.net/index.php");
    ...
    ..
    uri.SetQueryParam("success_url", "http://localhost:49725/home/SuccessResponse"); 
    uri.SetQueryParam("cancel_url", "http://localhost:49725/home/FailiureResponse");    
    uri.SetQueryParam("ipn_url", "http://localhost:49725/home/IPNHandler");
    ....
    ..
    return Redirect(uri.ToString());
}

You will get all status code responses in IPNHandler method.

Hope this helps!