Getting Started
In this article, you will learn the things to do before testing our Secure ID APIs.
- View End Points
- Generate API Keys
- Whitelist IP Address
- 2FA API Signature Generation
- Any Queries: Contact Us
View End Points
Cashfree Payments uses API keys to allow access to the API. Once you have signed up at our merchant site, you will be able to see your AppId and SecretKey.
Cashfree expects API key to be included in all API requests to the server. Use the endpoint /api/v1/credentials/verify to verify your credentials.
Environment | URL |
---|---|
Production | https://api.cashfree.com/verification |
Test | https://sandbox.cashfree.com/verification |
Generate API Keys
Follow the instructions below to generate API keys:
- From the Secure ID dashboard, click Developers on the navigation panel.
- Click API Keys.
- Click Generate API Keys from the API Keys screen.
Generate API Keys
- The New API Keys popup displays with the client ID and client secret information.
- Click Download API Keys to download the information and save them in your local system folder. Do not share the keys with anyone because they are confidential. You can generate a maximum of 10 API keys.
API Keys - Production Environment: You need to perform an OTP authentication to generate API keys for production environment.
Whitelist Your IP Address
Whitelisting the IP address or generating a public key provides a layer of authentication. These cybersecurity techniques prevent anonymous or unknown disbursement requests and allow only verified requests. Your IP address needs to be whitelisted in the Cashfree Payments production server or it rejects all incoming requests.
Follow the instructions below to whitelist your IP:
- From the Secure ID dashboard, click Developers from the navigation pane > Two-Factor Authentication from the Secure ID card.
- Choose IP Whitelist from the Select 2FA Method drop-down.
- Click Add IP Address.
- Enter the IP address you want to whitelist in the respective field and click Add IP Address to save the details. Note that the IPv4 has to be whitelisted, and not IPv6. The whitelisted IPs are displayed in the grid as shown below. You can whitelist a maximum of 10 IPs.
How to find my IP address?
Depending on your operating system, you can retrieve the IP of the system via multiple methods. You can also find your IP using helper sites such as https://whatismyipaddress.com/.
2FA API Signature Generation
To generate a signature, you need to generate the public key. You then use the generated public key to generate the signature.
Generate Public Key
- From the Secure ID dashboard, click Developers from the navigation pane > Two-Factor Authentication from the Secure ID card.
- Select Public Key from the Select 2FA Method drop-down.
- Click Generate Public Key.
- The public key is downloaded to your computer. Use your registered email ID to access the key.
Generate Signature
Follow the steps below to generate your signature:
- Retrieve your clientId (one which you are passing through the header X-Client-Id)
- Append this with CURRENT UNIX timestamp separated by a period (.)
- Encrypt this data using RSA encrypt with Public key you received – this is the signature.
- Pass this signature through the header X-Cf-Signature.
In the case of using our library, go through the libraries section. During the initialization process, you need to pass the key as a parameter.
Any Queries: Contact Us
For identifying, diagnosing, and resolving problems related to API requests, ensure the information below is communicated while contacting us:
- Share the API request and response details along with
referenceId
orverificationId
. - Mention the registered email ID and environment in the email.
- Use your registered email address (with Cashfree Payments) to send the email or mention the registered email address.
- Include your account manager in the CC of the email request.
For dashboard queries, share the screenshot and .har file of the screen.
Was this page helpful?