Api Document3
Api Document3
Api Document3
1
Integration Guide
Document Information
Version History
2
Integration Guide
Table of Contents
Introduction .................................................................................................................................................. 5
1. Getting Started.................................................................................................................................. 5
1.1 Generate Token ........................................................................................................................ 5
2. API Fundamentals ............................................................................................................................. 5
2.1 URI ............................................................................................................................................. 5
2.2 Operations................................................................................................................................. 5
2.3 HTTP Header Information ......................................................................................................... 6
2.4 User credentials and channel details ........................................................................................ 6
3. Get Company List .............................................................................................................................. 6
3.1 Request: .................................................................................................................................... 6
3.2 Response: .................................................................................................................................. 7
3.3 JSON Response .......................................................................................................................... 7
4. Bills API .............................................................................................................................................. 7
4.1 Request Parameters: ................................................................................................................. 7
4.2 Response Parameters: .............................................................................................................. 7
4.3 JSON Response: ......................................................................................................................... 8
5. Bill payments API .............................................................................................................................. 8
5.1 Request Parameters: ................................................................................................................. 8
5.2 Response Parameters: .............................................................................................................. 9
5.3 JSON Request/Response: .......................................................................................................... 9
6. Merchant Payment ........................................................................................................................... 9
6.1 Request Parameters: ................................................................................................................. 9
6.2 Response Parameters: ............................................................................................................ 10
6.3 JSON Request/Response: ........................................................................................................ 10
7. Deposit into Account ...................................................................................................................... 11
7.1 Request Parameters: ............................................................................................................... 11
7.2 Response Parameters: ............................................................................................................ 11
7.3 JSON Request/Response: ........................................................................................................ 12
8. Money Transfer to Mobile Account ................................................................................................ 12
8.1 Request Parameters: ............................................................................................................... 12
8.2 Response Parameters: ............................................................................................................ 13
3
Integration Guide
4
Integration Guide
Introduction
For GSMA Hackathon, following list of Easypaisa transactions (both subscriber and merchant initiated)
are exposed using which developers can come up with ideas, build solutions and financial products to
complete the GSMA challenges.
Using these APIs developers can perform bill payments, money transfers, merchant payments and cash
deposit functionalities into their products. API list is provided below:
1. Getting Started
All APIs are authorized through OAuth2 token generated from generate token API provided below,
access token returned is then passed in header as Bearer.
URL: https://api.telenor.com.pk/oauthtoken/v1/generate?grant_type=client_credentials
2. API Fundamentals
2.1 URI
All services exposed are harmonized on Mobile Money standards and use the following URI format:
https://api.telenor.com.pk/{version}/mm/{Resource}
Where:
• Version is as per standards defined in the API Versioning section. Initial version is v1.1
• mm is literal for ‘Mobile Money’
• Resource identifies the object and resource that is the subject of the API.
2.2 Operations
These API supports two types of HTTP operations as shown below:
X-Channel Pre shared channel to be passed Mandatory Details provided in below table
for transactions
URL:
https://api.telenor.com.pk/v1.1/mm/billcompanies
3.1 Request:
Request body is empty as this is a GET operation.
6
Integration Guide
3.2 Response:
Parameter Type Optionality Description Value
Company String Mandatory Display name for bill
name company
Service String Mandatory Company code to be
provider passed for Bill inquiry
and payment
Sub type String Mandatory Subcategory for bill
company. Example
(water, solar)
Type String Mandatory Type of company for
payment
4. Bills API
The Bills API is used for inquiry of billing details against a specific consumer number for a company. This
is a GET operation where the consumer number, customer MSISDN and bill company details (service
provider returned from get companies list) are passed in URL as given below:
URL:
https://api.telenor.com.pk/v1.1/mm/account/msisdn@923xxxxxxxxx$consumerno@xxxxxxx$billcompany@electri
city_fesco.sp/bills
Due date Date Mandatory Due date for bill payment Due date for bill payment is
returned
Bill Status String Mandatory Bill Status for provided Status for the bill
consumer number and
billing company
URL:
https://api.telenor.com.pk/v1.1/mm/accounts/msisdn@923xxxxxxxxx/bills/0/payments
Supplementary Bill Ref Mandatory Addition billing details for Consumer number and billing
Reference Details Array bill payment company details to be passed
as payment reference
type/payment reference
value pair
8
Integration Guide
Request Response
{ {
"currency": "PKR", "currency": "PKR",
"paidAmount": "5.00", "paidAmount": "5.00",
"supplementaryBillReferenceDetails": [ "customerReference": "1124745",
{ "supplementaryBillReferenceDetails": [
"paymentReferenceType": "consumerno", {
"paymentReferenceValue": "01131130009720" "paymentReferenceType": "description",
}, "paymentReferenceValue": "success"
{ },
"paymentReferenceType": "billcompany", {
"paymentReferenceValue": "electricity_fesco.sp" "paymentReferenceType": "resultCode",
} "paymentReferenceValue": "00"
] }
} ]
}
6. Merchant Payment
Merchant Payment transactions enable customers to buy goods and pay through their Easypaisa accounts to
merchants. Transactions are initiated from merchant accounts where customer gets a USSD popup for mobile
account pin confirmation, upon successful verification amount is debited form customers account and crediting
into merchant account
URL:
https://api.telenor.com.pk/debitma/v1.1/mm/transactions
9
Integration Guide
Request Date Date Mandatory The creation date and Date of executed transaction
Time time of the transaction.
Transaction String Mandatory Reference of transaction Transaction ID of transaction is
Reference executed returned
Debit Party Ref Mandatory Debit party information MSISDN of debit party is
Array returned in key/value pair
Credit Party Ref Mandatory Credit Party information Store ID of merchant is
Array returned in key/value pair
10
Integration Guide
URL:
https://api.telenor.com.pk/otctoma/v1.1/mm/transactions
11
Integration Guide
Request Date Date Mandatory The creation date and Date of executed transaction
Time time of the transaction.
Transaction String Mandatory Reference of transaction Transaction ID of transaction is
Reference executed returned
Debit Party Ref Mandatory Debit party information MSISDN of debit party is
Array returned in key/value pair
Credit Party Ref Mandatory Credit Party information MSISDN of credit party is
Array returned in key/value pair
Metadata Ref Mandatory Extra information array Fee applied on transaction is
Array returned in key/value pair
URL:
https://api.telenor.com.pk/transferMA/v1.1/mm/transactions
12
Integration Guide
Request Date Date Mandatory The creation date and Date of executed transaction
Time time of the transaction.
Transaction String Mandatory Reference of transaction Transaction ID of transaction is
Reference executed returned
Debit Party Ref Mandatory Debit party information MSISDN of debit party is
Array returned in key/value pair
Credit Party Ref Mandatory Credit Party information MSISDN of credit party is
Array returned in key/value pair
Metadata Ref Mandatory Extra information array Fee and tax applied on
Array transaction is returned in
key/value pair
13
Integration Guide
], }
"creditParty": [ ],
{ "creditParty": [
"key": "msisdn", {
"value": "923455109903" "key": "msisdn",
} "value": "923455109903"
], }
"senderKyc": { ],
"Name": "adeel" "metadata": [
}, {
"recipientKyc": { "key": "fee",
"Name": "osama" "value": "0.00"
} },
} {
"key": "tax",
"value": "0"
}
]
}
URL:
https://api.telenor.com.pk/transferBank/v1.1/mm/transactions
Request Date Date Mandatory The creation date and Date of executed transaction
Time time of the transaction.
Transaction String Mandatory Reference of transaction Transaction ID of transaction is
Reference executed returned
Debit Party Ref Mandatory Debit party information MSISDN of debit party is
Array returned in key/value pair
Credit Party Ref Mandatory Credit Party information Bank account number, account
Array title and bank name of credit
party is returned in key/value
pair
Metadata Ref Mandatory Extra information array Fee and tax applied on
Array transaction is returned in
key/value pair
15
Integration Guide
"value": "0.0"
}
]
}
16