Settlements API Guide

Get started with the Settlements guide.

Get Started

The Ozow Settlement API allows merchants to query settlements paid out to them by Ozow. Settlements only apply to merchants who aggregate payments in Ozow's bank account.

Before getting started you require the following:

Your Ozow merchant details:

  • Site code
  • Private key
  • API key

📘

Sliding Scale Fees

When merchants settle on a daily, weekly, fortnightly or adhoc basis, Ozow will forecast the transaction volume and count for the current month to determine a projected fee rate that will be used to calculate the fees owing at the time of settlement. The volume/count used to calculate the rate is calculated by taking the volume/count up to the settlement date, dividing by the number of days from the beginning of the month till the settlement date and multiplying by the number of days in the month.



Overview

The following elements are used to calculate the settlement amount that is paid to the merchant.

  • Transactions - All transactions that have cleared and have not been settled up to the settlement date.
  • Refunds - All refunds that have and are currently in progress and that have already been processed.
  • Fees - All transaction and refund fees for the transactions and refunds processed in settlement.
  • Fee Adjustments - If the merchant is on a daily, weekly, fortnightly or adhoc schedule there is a small possibility that they enter a lower bracket at the end of the month. When this occurs Ozow will add a fee adjustment on the next settlement to refund the merchant for an excess fees that might have been paid. This is only applicable to merchants who are on a sliding scale and where the current month's fees are not based on the previous month's volume.
  • Settlement Cost - The cost of processing the settlement which is dependent on the method of settlement

API Endpoints


Common Headers

NameTypeReqDescription
Authorizationstring (500)YThe token generated using the get token method. eg. Authorization: Bearer
Content-Typestring (50)NThe format the response should be returned in e.g.
Accept: application/json
Accept: application/x-www-form-urlencoded
Acceptstring (50)YThe format the response should be returned in e.g.
Accept: application/json
Accept: application/xml
ApiKeystringYUnique key used to verify and authenticate requests from a merchant's system


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
 }
              
            


Get Settlements

Retrieve the lastest settlements created for the merchant.

Url /secure/settlements
Method GET
Headers See Common Headers
URL Params
Name Type Req Description
count int Y The number of settlements to return. The max allowed value is 100.
Data Params N/A
Response Object
Name Type Description
settlements Settlement[] The latest settlements for the merchant.
errors string[] Any errors that occurred for the request.

Settlement Object

Name Type Req
id guid The settlement identifier.
date date The settlement date.
originalAmount decimal The amount in the original transaction currency.
originalCurrencyCode string (3) The original transaction currency code (ISO 4217 3 letter code).
bankReference string (20) The Ozow alphanumeric reference for the settlement.
amount decimal The amount in the settlement currency.
currencyCode string (3) The settlement currency code (ISO 4217 3 letter code).
conversionRate decimal The currency conversation rate at the time the settlement was created.
accountNumber string (50) The destination account number for the settlement.
status string (50) The settlement status. Possible values are:
  • Pending - Settlement was created
  • Complete - Settlement payment has been initiated
createdByUserName string (50) The user that created the settlement.
createdDate date The date and time that the settlement was created.
createdDateUtc date The UTC date and time that the settlement was created.
Request Example
               
 GET https://api.ozow.com/secure/settlements HTTP/1.1
 Authorization: Bearer J4lnLIZtJSc0Rf...Zunskttzl3MdGEMIDArZ4Yp6QTw6_Z4uDkAJN8Y
 Accept: application/json
              
            
Response Example
               
 {
 "settlements":[
    {
       "id":"497ac3ea-730c-457a-82fe-229fe79e5f60",
       "date":"2017-04-19 00:00:00.000",
       "originalAmount":150222.75,
       "originalCurrencyCode":"ZAR",
       "bankReference":"SAY097IM382355",
       "amount":9220.38,
       "currencyCode":"EUR",
       "conversionRate":0.0613781,
       "accountNumber":"1234123400",
       "status":"Pending",
       "createdByUserName":"System",
       "createdDate":"2017-04-21 02:10:12.220",
       "createdDateUtc":"2017-04-21 00:10:12.220"
    }
 ],
 "errors": []
 }
              
            


Get Site Settlements

Retrieve the settlements created for the respective merchant site over a selected period.

Url /secure/settlements/getsitesettlements
Method GET
Headers See Common Headers
URL Params
Name Type Req Description
fromDate datetime Y Desired start date to retrieve respective merchant site settlements.

Format: yyyy-mm-dd
toDate datetime Y Desired end date to retrieve respective merchant site settlements.

Format: yyyy-mm-dd
Data Params N/A
Response Object
Name Type Description
settlements datetime he date and time that the settlement was created
toReference string (20) Payee Reference.
amount decimal The transaction amount.
bankReference string (20) The bank reference of the transaction.
status int The transaction status.
siteCode string (20) Corresponding site code of the settlement.
transactionCreatedDate datetime The date and time that the transaction was created.
transactionId guid The transaction identifier. This is the identifier for the payment that was originally processed on Ozow.
transactionReference string (20) Reference of the transaction which was settled.
Request Example
               
 GET https://api.ozow.com/secure/settlements/
 getsitesettlements HTTP/1.1
 Authorization: Bearer J4lnLIZtJSc0Rf...Zunskttzl3MdGEMIDArZ4Yp6QTw6_Z4uDkAJN8Y
 Accept: application/json
              
            
Response Example
               
 [
 {
  "settlementId":008822c6-7145-4242-be9b-6f0219486a20,
  "settlementDate":2022-08-19 00:00:00.000,
  "toReference":"TAD14HA38W0021be53",
  "amount":9220.38,
  "bankReference":"SAY097IM382355",
  "status":1,
  "siteCode":"TSTSTE0001",
  "transactionCreatedDate":"2022-08-19 00:00:00.000",
  "transactionId":"677ac3ea-750c-447a-86fe-449fe79e5f61",
  "transactionReference":"SAY097IM382355",
  },
  {
   "settlementId":008822c6-7145-4242-be9b-6f0219486a20,
   "settlementDate":2022-08-19 00:00:00.000,
   "toReference":"TAD18R84659008822c6",
   "amount":520.50,
   "bankReference":"SAY097IM387859",
   "status":1,
   "siteCode":"TSTSTE0001",
   "transactionCreatedDate":"2022-08-20 00:00:00.000",
   "transactionId":"521c3b04-cc43-4560-a9d2-8u5f368010c3",
   "transactionReference":"SAY097IM382355",
   }
   ]
              
            

Settlement Notification URL

You can request Ozow support to configure a notification URL for your merchant account to get notified about settlements as they get created. A single Settlement Object be posted to this URL with the details of the new settlement.