Generate/Refresh Token API

A single endpoint that issues access and refresh tokens, with behaviour set by action. Use code to exchange a merchant's authorization code for the first token pair, and refresh_token to obtain a new pair - no merchant action required.

action - generate_token exchanges the authorization code from the merchant's consent for an access token and refresh token. Call this from your backend immediately after Juspay redirects to your redirect_uri with the code.

action - refresh_token obtains a new access token and refresh token pair using a valid refresh token, without requiring any merchant action. Call this before the access token's expiry to keep the merchant's authorization active.

API Endpoints
Sandbox Link
POST
https://sandbox.portal.juspay.in/ec/v2/token
Production Link
POST
https://portal.juspay.in/ec/v2/token
Headers
Body
200 : Success
Last updated 4 months ago