Step 1: Get API Token

All requests are authenticated using the token you will receive from this request. The same token can be used for all requests until it expires. The only content type supported by this request is "application/x-www-form-urlencoded".


Table Template
Url /token
Method Post
Headers
Name Type Req Description
ApiKey string (50) Y Your merchant API key
Accept string (50) Y The format the response should be returned in e.g.
  • Accept: application/json
  • Accept: application/xml
URL Params N/A
Data Params
Name Type Req Description
grant_type string (50) Y Set as "password"
SiteCode string (50) Y The Ozow site code for the site which the payment is being made to
Response Object
Name Type Description
access_token string (500) The token needed for subsequent requests
token_type string (50) The token type
expires_in string (50) The lifetime of the token in seconds
Request Example
               
  POST https://api.i-pay.co.za/token HTTP/1.1
  ApiKey: EB5758F2C3B4DF3FF4F2669D5FF5B
  Content-Type: application/x-www-form-urlencoded
  grant_type=password&SiteCode=TSTSTE0001
              
            
Response Example
               
  {  
     "access_token":"x8EMsgirq_74gw11IY18Ugl...l-FW3vumkyTG0GfXudO9U",
     "token_type":"bearer",
     "expires_in":86399
   }