logo logo
  • Home
  • Partners

Doc Navigation

  • Getting Started
  • TOP-UP APPLICATION
    • API Specification
    • TopUp Service
  • Sample Request

Documentation

Welcome to EnayaPay Documentation

API Specification

REST API

FUNCTION DESCRIPTION
MESSAGE FORMAT JSON
REQUEST METHOD POST
HEADER PARAMETERS
  • api-key
  • secret-key
  • Content-Type: application/json

List of service

ID SERVICE NAME DESCRIPTION METHOD TYPE WEBSERVICE TYPE
1 TopUp Service It sends TopUp request to Charging System. This service is provided in REST formats POST REST

TopUp Service

REST TopUp Service:

Request Parameters:

NAME TYPE DESCRIPTION
TRANSACTION_ID String Unique transaction id to distinguish between each transaction. Should contain only numbers with max length of 20
PHONE_NUMBER String Customer Number. Formatted as: ‘0*********’
AMOUNT Double The amount to be transferred.

Response Parameters:

NAME TYPE DESCRIPTION
MESSAGE String Custom message of transaction
TRANSACTION_ID String The same transaction id sent in the request.
RECEIPT_NO Integer Transaction receipt number.
PHONE_NUMBER String Customer Number.

Sample Request :

                                        Request URL
                                            
                                        
                                        
                                           
                                            https://platform.enayatech.com/api/v2.0.0/topup/
                                        
                                
Request Body:

{
“phone_number": "0963404723",
"amount":200,
"transaction_id":"1627683920938219"
}

Request Header:

{
Content-Type : application/ json
api-key : DSGFSGSDGFDSHGDFHSFDSFDHSGFG
secret-key : fsfdsgsdgdssdfsdfdsfdsfdsfsdfsdfdsfdsd
}

Response Body :
                                            Status Code: 200
                                            
                                               
                                                {
"message":"Success",
"transaction_id":"1627683920938219",
"phone_number":"249963404723",
"receipt_no":25121
}
                                            Status Code: 400
                                            
                                               
                                                {
"error_massage": "amount required"
}
                                            Status Code: 401
                                            
                                               
                                                {
"error_message": "Invalid Credentials"
}
                                            Status Code: 422
                                            
                                               
                                                {
"message":"Success",
"transaction_id":"1627683920938219",
"phone_number":"249963404723",
"receipt_no":25121
}
                                            Status Code: 503
                                            
                                               
                                                {
"error_message": “SERVICE DISABLE”
}

© 2022 All Rights Reserved by EnayaPay