# On Live env, ASP.NET CORE Payment giving error

**URL:** <https://community.rapyd.net/t/on-live-env-asp-net-core-payment-giving-error/1850>\
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions\
**Created:** [May 24, 2022, 3:57pm UTC](https://community.rapyd.net/t/on-live-env-asp-net-core-payment-giving-error/1850 "2022-05-24T15:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![8538962a317c971ba767](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/8538962a317c971ba767/32/1762_2.png) [@8538962a317c971ba767](https://community.rapyd.net/u/8538962a317c971ba767)\
**Post date:** [May 24, 2022, 3:57pm UTC](https://community.rapyd.net/t/on-live-env-asp-net-core-payment-giving-error/1850/1 "2022-05-24T15:57:03Z")

</div>

```auto
 var jsonRequest = JsonSerializer.Serialize(requestObj);

                var result = RapydApiRequest.Utilities.MakeRequest("POST", "/v1/checkout", jsonRequest, accessKey, secretKey, rapydSetting.UseSandbox);

```

while calling this things , facing issue on SANDBOX its working fine , any reason or any help will be great

calling like this

```auto
try
            {
                string httpMethod = method;
                Uri httpBaseURL = sandbox ? new Uri("https://sandboxapi.rapyd.net") : new Uri("https://rapyd.net");
                string httpURLPath = urlPath;
                string httpBody = body;
                string salt = GenerateRandomString(24);
                long timestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
                string signature = Sign(httpMethod, httpURLPath, salt, timestamp, httpBody, accessKey, secretKey);

                Uri httpRequestURL = new Uri(httpBaseURL, urlPath);
                WebRequest request = HttpWebRequest.Create(httpRequestURL);
                request.Method = httpMethod;
                request.ContentType = "application/json";
                request.Headers.Add("access_key", accessKey);
                request.Headers.Add("salt", salt);
                request.Headers.Add("timestamp", timestamp.ToString());
                request.Headers.Add("signature", signature);
                return HttpRequest(request, body);
            }
            catch (Exception ex)
            {
                return "Rapyd : Error generating request options: " + ex;
            }

```

Rapyd : Error occurred : System.Net.WebException: The remote server returned an error: (404) Not Found.  
at System.Net.HttpWebRequest.GetResponse()  
at RapydApiRequest.Utilities.HttpRequest(WebRequest request, String body) The remote server returned an error: (404) Not Found.

---

<div class="post-metadata">

**Author:** ![fredjinbility](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fredjinbility](https://community.rapyd.net/u/fredjinbility)\
**Post date:** [May 24, 2022, 6:32pm UTC](https://community.rapyd.net/t/on-live-env-asp-net-core-payment-giving-error/1850/2 "2022-05-24T18:32:01Z")

</div>

@8538962a317c971ba767,  
1.) you said that you are on live environment while some part of your code is still making request to sandbox API or there is a typo in live url as per here

```auto
Uri httpBaseURL = sandbox ? new Uri("https://sandboxapi.rapyd.net") : new Uri("https://rapyd.net");
             

```

Live API URL should be something like **[https://api.rapyd.net](https://api.rapyd.net)** and not **[https://rapyd.net](https://rapyd.net)**

2.) I will also advice you to look into the API Key and Secret Live enviroments.  
you don’t have to use sandbox access credentials for live environments.

To get live access keys and secret, you will need to login to your developer account at the bottom of the page, click a switch button to generate a live access credentials. Finally, try it and see if it works

---

<div class="post-metadata">

**Author:** ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)\
**Post date:** [May 24, 2022, 7:31pm UTC](https://community.rapyd.net/t/on-live-env-asp-net-core-payment-giving-error/1850/3 "2022-05-24T19:31:53Z")

</div>

Thanks Iyas, @8538962a317c971ba767, let us know if that helps.

Thanks @fredjinbility!

Here are also some resources that may help:

- [How to verify Webhook Signature with PHP script](https://community.rapyd.net/t/how-to-verify-webhook-signature-with-php-script/1382)
- [Verify Webhook Signature?](https://community.rapyd.net/t/verify-webhook-signature/1383)
- [Calculation of Signature](https://community.rapyd.net/t/calculation-of-signature/288)

If the above doesn’t help, would check some of the commends on specifically how the body string is put together and the spacing around each string.

For example:

- All spaces and other whitespace outside of strings must be removed.
- Numbers should be sent in strings, not as numbers.
