Skip to main content
Cashfree provides comprehensive Postman collections for all API products, making it easy to test and integrate APIs. Each collection includes pre-configured requests, sample data, and environment variables to get you started.

Available collections

Getting started

To import a Postman collection, choose your preferred method: To configure your environment variables:
  1. Create a new environment in Postman.
  2. Add the following variables:
    • base_url: Set to https://sandbox.cashfree.com (sandbox) or https://api.cashfree.com (production)
    • client_id: Your Cashfree Client ID
    • client_secret: Your Cashfree Client Secret
    • x-api-version: API version (for example, 2025-01-01)
Never share your production credentials. Use sandbox credentials for testing and development.
The following examples show the environment variable configuration for both environments: Sandbox:
{
  "base_url": "https://sandbox.cashfree.com",
  "client_id": "your_sandbox_client_id",
  "client_secret": "your_sandbox_client_secret",
  "x-api-version": "2025-01-01"
}
Production:
{
  "base_url": "https://api.cashfree.com",
  "client_id": "your_production_client_id",
  "client_secret": "your_production_client_secret",
  "x-api-version": "2025-01-01"
}
To test your first request:
  1. Select your environment from the dropdown in the top-right corner.
  2. Choose a simple request like “Get Order” or “Create Order.”
  3. Review the request parameters and body.
  4. Click Send to execute the request.

Features and best practices

Each Postman collection includes the following features:
  • Pre-configured requests with correct HTTP methods and headers.
  • Sample request bodies with placeholder data.
  • Environment variables for dynamic URLs and authentication.
  • Example data including test card numbers and mock account details.
  • Test scripts for automatic response validation.
Collections automatically handle authentication using your credentials. Tokens are generated and refreshed as needed, so you don’t need to manually manage authorisation headers. Use environment variables for dynamic data, update placeholder values with real test data, and keep sensitive information in environment variables rather than in requests. Review response status codes and error messages, check the Tests tab for automated validations, and use the Console view to debug request/response details.

Troubleshooting common issues

The following are common Postman collection errors and solutions:
  • Verify your client_id and client_secret are correct.
  • Ensure you’re using the right environment (sandbox vs production).
  • Check that your credentials are active and not expired.
  • Confirm the x-api-version header is set correctly.
  • Use 2025-01-01 for the latest API version.
  • Check the API documentation for supported versions.
  • Ensure you’ve selected the correct environment.
  • Verify all required variables are defined.
  • Check for typos in variable names (case-sensitive).
  • Review the API documentation for required fields.
  • Check data types and formats in request body.
  • Ensure all mandatory parameters are included.

Support

If you need help with Postman collections or API integration, you can use the following resources: