Merchant’s backend should call this API to fetch the SDK Token for User Accounts that must be passed to the SDK to fetch the saved instruments of the PhonePe user.
API Host and Endpoint
Copied !
Host
Environment | Http Method | API Host URL |
---|---|---|
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox |
Production | POST | https://api.phonepe.com/apis/pg |
Endpoint
Copied !
/payments/v2/sdk/init
- Note: Endpoint is common for sandbox and production.
Request Headers
Header Name | Header Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | O-Bearer <access_token> | Pass access_token received in Authorization call |
Request Parameters
Parameter Name | Type | Description |
---|---|---|
amount | Long | Transaction amount in paise, minimum value Rs.1 (100 Paise) |
Note: Only in UAT for testing purpose
- If you are passing the amount value as Rs.100 (10000 in Paise) or less in the Fetch User Instruments Token API, then you will get the FlashPe option + UPI Accounts.
- If you are passing the amount value greater than Rs.100 (10000 in Paise) in the Fetch User Instruments Token API, then you will get only UPI Accounts.
Sample Request
{
"amount": 100
}
Sample Response
{
“token”: “hq5wOGdzX31IuPyyh7/7AYOLiipO42P8QtgmusudZHta7zUAMbV5uMV5f6kF1hmvherMrKRViCFFSkJeROPrbwBFuyTcAcvnhzQNvlAjmSUSDKisZaVOZjB05cBLh4dWE8JIg/xHk7i+8kBbH02itkwCv66GPKAh9ztkocuJhU4WIJEfkXgKYOKx4e1QOCpyu3+iRyrDG/JFnkkoM2vrdEhA+H5C2ANWu+zoRZ2O1OvUfSaGreca0Uc0MljHAeHUOE11XvEjrlohgL/S5hGwI3rCOh8F4Yu23OBfDyuPBUlyTvLzN50OHpq7oZRHZXGayUSKZACsSfm8qk/AlFV9fSuLZ2pTj55EMqWM4NJBsCTTP4ojn7AksD7EpmXTe+G6QqchVeKgAPZ1cq1No8bRdxwrQv9e0i5g/JNJllbAN9GibLP55iZr9Vzc7+7yi9I3I2RXat32moiXGo+g38+85KFvc7j/R8iK867cucl+zOrwn6pWGiUq9G8MIdoDXD9/eUfE90Awc6tFFsMJAfUg30aqWtd3lOW6zXM=”,
"expireAt": 1721203754311
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
token | String | Pass this SDK Token for User Accounts to the PhonePe SDK via the merchant app. |
expireAt | Long | Expiry date in epoch |