Skip to main content
The Key Secret is displayed only once, at the moment the pair is generated. Live keys can capture payments and issue refunds, so store the pair as securely as a password.

Before you begin

Razorpay issues API keys from the Razorpay Dashboard rather than from the API, and every
key pair belongs to one mode.

  • Your Razorpay user must be able to open Account & Settings and manage API keys.
  • Keys generated in Test Mode reach test data only, while live keys move real money.
  • Generate the pair in the mode you intend to connect — a key is bound to the mode it was created in.

Generate your API key pair

Razorpay issues the Key ID and the Key Secret together, and shows the secret once.

1

Sign in to Razorpay

Sign in to your Razorpay Dashboard account.

  • Select Account & Settings at the bottom of the left sidebar.
  • Use the Test Mode toggle just above it to switch between test and live data.
The Razorpay Dashboard with Account & Settings highlighted in the left sidebar
2

Open API keys

On Account and product settings, find the Website and app settings card.

  • Select API keys in that card.
The Account and product settings page with the Website and app settings card and the API keys link highlighted
3

Generate the key pair

The Websites & API keys tab holds the API keys & integration section. On an
account with no key yet, select Generate Key to issue the pair.

  • The panel notes that you can generate API keys after your website is approved, and that you can switch to test mode to get test API keys for integration.
The API keys and integration section with the Generate Key button highlighted on an account that has no key yet
4

Copy the Key ID and Key Secret

The New Key ID & Secret dialog opens immediately, with both halves labeled
Test API Key and Test Key Secret while you are in Test Mode.

  • Copy the key id and paste it into the API Key field in StackOne Hub.
  • Copy the secret and paste it into the Key Secret field in StackOne Hub.
  • Key ID format: rzp_test_ for test keys and rzp_live_ for live keys
  • Use Download to save both values to a file before you close the dialog.
  • The dialog warns that for security reasons, this key can only be downloaded once. If you lose it you will have to regenerate a new one and update it everywhere.
The New Key ID and Secret dialog with the copy controls and the Download button highlighted, key values redacted

Regenerate an existing key pair

Once a key exists, Razorpay no longer offers to generate one — the control becomes
Regenerate Key. Use it if the secret was lost or exposed, remembering that the
replacement supersedes the key in use.

1

Start the regeneration

Open the same API keys & integration section and select Regenerate Key.

  • The existing key id stays visible on this screen, but its secret cannot be revealed again.
The API keys and integration section on an account that already has a key, with the Regenerate Key button highlighted
2

Choose when the old key expires

Razorpay asks When should old keys expire? before issuing the replacement.

  • Deactivate old key immediately stops the previous key from working right away.
  • Deactivate old key in 24 hours leaves a day to update anything still using it.
  • Confirm with Regenerate API key, then copy the new pair from the New Key ID & Secret dialog as above.
  • Update the API Key and Key Secret fields in StackOne Hub with the new values, and store them securely for use later.
The regenerate confirmation dialog with both key expiry options and the Regenerate API key button highlighted

Linking the Account from the Hub

1

Navigate to the Hub

Use one of the three Linking Account Methods to access the Hub.
2

Fill out the fields

Fill out the following fields using details from your provider:
  • API Key
  • Key Secret
3

Connect

  • Click Connect
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup

If the account linking is successful, you will see the newly linked account on your Accounts page.