/
Authentication Flow - Razorpay route APIs

Authentication Flow - Razorpay route APIs

Following Parameters are required to generate Basic Auth token

  • YOUR_KEY_ID

  • YOUR_KEY_SECRET

Step 1. Need to encode the Base64 KEY_ID and KEY_SECRET in the following format:

YOUR_KEY_ID:YOUR_KEY_SECRET

Step 2. Now we can generate these keys by going to Razorpay route dashboard>>settings>>API Keys>>Generate Keys

Credentials will look like below:

Key ID

Key Secret

Key ID

Key Secret

rzp_test_xsfCBY77RiWEzg

xLDybGbtAY2XQmxZ3SN2mFu4

Step 3. Now, after base64 encoding, the basic auth token will look like the below:

Key

Value

Key

Value

Authorization

Basic cnpwX3Rlc3RfeHNmQ0JZNzdSaVdFemc6eExEeWJHYnRBWTJYUW14WjNTTjJtRnU0

Step 4. Now, if we call an API to fetch account details using account_id

GET API:

https://api.razorpay.com/v2/accounts/{{acc_id}}

Key

Value

Key

Value

{{acc_id}}

acc_L2oKOdWGazFZW9

Headers:

Key

Value

Key

Value

Authorization

Basic cnpwX3Rlc3RfeHNmQ0JZNzdSaVdFemc6eExEeWJHYnRBWTJYUW14WjNTTjJtRnU0

Response:

{ "id": "acc_L2oKOdWGazFZW9", "type": "route", "status": "created", "email": "mituj@eshopbox.com", "profile": { "category": null, "subcategory": null, "addresses": [] }, "notes": [], "created_at": 1673427136, "business_type": "private_limited", "legal_business_name": "Eshopbox", "customer_facing_business_name": "Eshopbox" }

 

Related content