post
https://test-partner.payu.in/oauth/token
GetToken — Obtain Bearer Token
Step 0 of 16 — Always call this first.
Endpoint
POST /oauth/token
Request Body (x-www-form-urlencoded)
| Parameter | Type | Required | Validation | Description |
|---|---|---|---|---|
client_id | string | Yes | 64-char hex | Partner OAuth client ID |
client_secret | string | Yes | 64-char hex | Partner OAuth client secret |
grant_type | string | Yes | Must be client_credentials | OAuth grant type |
scope | string | Yes | Space-separated | Required scopes |
Response (200 OK)
{
"access_token": "7b5843b39e5532bc...",
"token_type": "Bearer",
"expires_in": 7199,
"scope": "refer_merchant",
"created_at": 1723498499
}
Response-to-Request Mapping
| Response Field | Used As | In Steps |
|---|---|---|
access_token | Authorization: Bearer {access_token} header | All subsequent steps |
expires_in | Token validity in seconds | Refresh before expiry |
Error Handling
| Error | Cause | Recovery |
|---|---|---|
401 | Invalid client_id or client_secret | Verify credentials with PayU KAM |
400 | Invalid grant_type or scope | Check parameter values |
Next Step
Use the access_token in Step 01 to create a merchant.
