# Internal Server Error when renew PCSID in simulation portal

**URL:** <https://zatca1.discourse.group/t/internal-server-error-when-renew-pcsid-in-simulation-portal/747>\
**Category:** FATOORA portal and Simulation portal\
**Created:** [September 20, 2023, 7:51am UTC](https://zatca1.discourse.group/t/internal-server-error-when-renew-pcsid-in-simulation-portal/747 "2023-09-20T07:51:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenalbert](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@stevenalbert](https://zatca1.discourse.group/u/stevenalbert)\
**Post date:** [September 20, 2023, 7:51am UTC](https://zatca1.discourse.group/t/internal-server-error-when-renew-pcsid-in-simulation-portal/747/1 "2023-09-20T07:51:56Z")

</div>

Hello, I’m trying to renew PCSID on the simulation portal using the API

```auto
PATCH https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/production/csids

Header
Accept-Language=en
Accept-Version=V2
OTP=xxxxxx

Authentication using currently active PCSID

Body
{
  "csr": "LS0tLS1CRUdJTiB..."
}

```

On this try, I use the same CSR as the onboarding one. Also tried using new generated CSR with no changes to the information.

But it give me the response 500 - Internal Server Error

```auto
{
    "code": "Invalid-Request",
    "message": "System failed to process your request"
}

```

Is there anything I missed?

---

<div class="post-metadata">

**Author:** ![Ammar](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@Ammar](https://zatca1.discourse.group/u/Ammar)\
**Post date:** [September 20, 2023, 10:52am UTC](https://zatca1.discourse.group/t/internal-server-error-when-renew-pcsid-in-simulation-portal/747/2 "2023-09-20T10:52:25Z")

</div>

HI @stevenalbert

Try to add Content-Type: application/json at the header.

---

<div class="post-metadata">

**Author:** ![kiaziz](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kiaziz](https://zatca1.discourse.group/u/kiaziz)\
**Post date:** [September 24, 2023, 6:53am UTC](https://zatca1.discourse.group/t/internal-server-error-when-renew-pcsid-in-simulation-portal/747/3 "2023-09-24T06:53:02Z")

</div>

dear @stevenalbert ,

please add the CurrentCCSID header and pass the previous PCSID as value for it.  
and make sure the OTP is renewal OTP not new device OTP.

Regards,
