Enkash APIs
HomePayment GatewayPayoutsCreate Account
HomePayment GatewayPayoutsCreate Account
Login
  1. APIs
  • Payment Gateway Overview
  • Getting Started
  • Payment Methods
  • Integration
  • API Endpoints
  • APIs
    • Authorisation
      • Get Authorization Token
    • Order
      • Create Order
      • Get Order Status
      • Get Order By Merchant Order Id
      • Get BNPL Payment Modes
      • Get Dynamic QR Code
      • UPI Intent Links
    • Payment
      • Submit Payment Detail
      • Get Transaction Status
      • Validate OTP
      • Resend OTP
      • Payment Notify Request
      • Get UPI Transaction Status
      • Verify VPA
    • Refund
      • Refund
    • Settlement
      • Settlement Reporting
      • Get Settlement Payout By ID
      • Search Settlement Payouts
    • Split Settlement
      • Create Split Settlement Account
      • Update Split Settlement Account
      • Get All Split Settlement Account
      • Deactivate Split Settlement Account
      • Activate Split Settlement Account
      • Submit Payment with Split Details
      • Edit/Deferred Split Settlement
    • E-Commerce Plugins
    • Payment Button
    • Qr Code
      • Create Qr Code
      • Get QR Code
      • Search QR Code
      • createCustomer
      • searchCustomer
      • Cancel QR Code
    • UPI Mandate
      • Create UPI Mandate
      • Update UPI Mandate
      • Revoke UPI Mandate
      • Get UPI Mandate
      • UPI mandate create callback
      • Mandate Pre-debit Notification
      • Execute mandate debit
      • Mandate Debit callback
    • Payment Links
      • Payment Links Overview
      • Payment Link APIs
      • Payment Link
        • Create Payment Link
        • Get Payment Link Details
        • Delete Payment Link
      • Payment Link Webhook
        • Payment Link Webhook Request
  1. APIs

Get Authorisation Token

The Get Authorisation Token API is a critical step for authenticating all subsequent API requests. This token ensures secure communication by verifying the legitimacy of the requesting source.

Purpose#

The API generates an authentication token that must be included in the headers of all subsequent API requests. This token acts as proof of authorization and helps maintain secure interactions with Enkash servers.

Endpoint#

EnvironmentEndpoint URL
Testhttps://olympus-pg-uat.enkash.in/api/v0/merchant/token

Request Headers#

HeaderValueDescription
Content-Typeapplication/jsonSpecifies the media type of the request body.
API-KeyYour unique API keyProvided by Enkash upon registration.

Sample Request:#

POST https://olympus-pg-uat.enkash.in/api/v0/merchant/token  
Headers:  
{  
  "Content-Type": "application/json",  
  "API-Key": "your-api-key"  
}  

Response#

Upon a successful request, the server will return a JSON object containing the generated token and additional details:
FieldTypeDescription
tokenstringThe generated authentication token
expiryinteger (int64)Token expiration time in milliseconds
resultCodeinteger (int32)Status code indicating the outcome of the token generation request
resultMessagestringAdditional information about the request's result

Sample Response:#

{  
  "token": "abcdef1234567890",  
  "expiry": 1672531199000,  
  "resultCode": 200,  
  "resultMessage": "Token generated successfully."  
}  

Integration Notes#

The token must be included in the Authorization header for all subsequent API requests
Authorization: Bearer {token}  
Ensure you handle token expiration by either:
Monitoring the expiry timestamp and refreshing the token in advance
Implementing retry logic for requests that fail due to expired tokens
Previous
API Endpoints
Next
Get Authorization Token
Built with