Payrun Error : Request failed with status code 403

Occurrence

When running a payrun, you receive an Error 403 for both the payrun and all employees.


Reason

The most common cause for this issue is that the API key has expired.


Procedure

1. Check the API Key Validity

  1. Log in to the system.

  2. Navigate to Settings → Preferences → Business.



  3. Find and expand platform_api_keys.

  4. Copy the value under API Key Secret.




2. Verify the API Key

  1. Go to the General tab and select API Keys.

  2. Use Ctrl + F (Windows) or Command + F (Mac) to search and paste the copied API Key Secret from the previous step.

  3. Click the > icon to expand the detailed view.



  4. Check the Valid for date to confirm whether the key has expired.

    • If expired, proceed to create a new API key.




3. Create a New API Key

  1. From the General → API Keys menu, click on + Add API Key.



  2. Choose an Issue Date.

  3. Select the Valid for period (recommended : 1 year).

  4. Optionally, add a Comment to identify the purpose of this key.

  5. Click Generate API Key.

Once generated:

  • Click Copy API Key and save it securely in a notepad (this key cannot be retrieved again).



  • Click × Close when done.

  • Copy the corresponding API Key Secret from the API Keys list and save it with the API Key.


4. Replace the New API Key in Business Preferences

  1. Navigate to Settings → Preferences → Business.



  2. Expand platform_api_keys.

  3. Paste the newly generated:

    • API Key Secret (short 64-character string)

    • API Key (long 160-character string)

  4. Click Save.

 


Result

After completing the above steps, requery the payrun.
You should now see that the payrun runs successfully without any 403 errors.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.