Joy API Documentation
Joy API Documentation
-0-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
1- log in
Parameters needed
Code : user code
Password: user password
Request example
Parameter Value Type Position Mandatory
code User code String Header Yes
Response
{
"Status": true,
"Code": 200,
"Token": "TOKEN",
"Joyid": "TP8avWzSNXS6b5Z1n7Zt5YBT5Cv2",
"Name": "test",
"Balance": "13102.025"
}
-1-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
2- services
Description
All Joy available services
Request example
Parameter Value Type Position Mandatory
code User code String Header Yes
Response
{
"Code": 200,
"Msg": ""ناجحة عملية,
"Status": true,
"Data": [
{ "id": 2,
-2-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
{
"parameters": [
{
"id": 190,
"key": "190",
"max_length": 11,
"min_length": 11,
"name_ar": ""الموبايل رقم,
"name_en": "Mobile",
"parameter_inquiry_id": 189,
"required": "yes",
"type": "N"
}
],
"price_type": 0,
"type": "payment"
}
],
"id": 79,
"name_ar": ""فواتير,
"name_en": "Bill Payment",
"request_amount_input": "no",
"type": "inquiry_payment"
}
]
},
-3-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
inquiry_payment: if
service needs to make
inquiry before call
payment like (Mobile Bills,
ADSL Bills
-5-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
3- inquiry
Description
To make inquiry transaction
• Response
{
"Code": 200,
"Msg": "sucsess",
"Status": true,
"ServiceId": 26,
"Data": {
"amount": 479.5,
"fees": 5.2,
"totalAmount": 484.7,
"asyncRqUID": null,
"extraBillInfo": null,
"billRefNumber": null,
"statusDescription:": ""ناجحة عملية
}
}
-6-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
-7-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
4- payment
Description
To make payment transaction
Parameter Value Type Position Mandatory
code User code String Header Yes
-8-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
• Response
{
"Code": 200,
"Msg": "sucsess",
"Status": true,
"ServiceId": 4,
"Data": {
"amount": 0,
"fees": 3.57,
"totalAmount": 120.07,
"reciept": {
"invoiceId": "29548282",
"serviceName": ""سداد فاتورة التليفون,
"providerName": ""المصرية لإلتصاالت,
"invoiceDescription": "null",
"date": "2020/8/12",
"time": "14:13",
"fields": null,
"inputs":[
{
"FieldName": ""كود المحافظة,
"FieldValue": "03"
},
{
"FieldName": ""رقم التليفون
"FieldValue": "5461131"
}
]
},
"statusDescription:": "Success"
}
}
-9-
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
Data.reciept.invoiceId Invoice Id Int Yes
Data.reciept.serviceName Service name String Yes
Data.reciept. providerName Provider name String Yes
Data.reciept date Date String Yes
Data.reciept.time Time String Yes
Data.reciept.fields Extra info that should be Array No
print
Data.reciept.fields.FieldName Field name String No
- 10 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
5- transactionStatus
Description
To check transaction status and print
Parameter Value Type Position Mandatory
code User code String Header Yes
• Response
{
"Code": 200,
"Msg": "sucsess",
"Status": true,
"Data": {
"amount": 5,
"fees": 0.2,
"totalAmount": 5.2,
"reciept": {
"invoiceId": "29491796",
"serviceName": ""االسكندرية مياه شركة,
"providerName": "االسكندرية مياه شركة ",
"invoiceDescription": "null",
"date": "2020/8/9",
"time": "17:19",
"fields": null,
"inputs": [
{
"FieldName": ""االشتراك رقم,
"FieldValue": "10080000034701"
},
{
"FieldName": "FCRN",
"FieldValue": "4475246316"
}
]
},
"statusDescription:": ""ناجحة عملية
}
}
- 11 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
- 12 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
6- getBalance
Description
To get user’s credit
Parameter Value Type Position Mandatory
code User code String Header Yes
• Response
{
"Code": 200,
"Status": true,
"Id": "TP8avWzSNXS6b5Z1n7Zt5YBT5Cv2",
"Balance": "102.02"
}
- 13 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
6- getHistory
Description
To get user’s old operations
• Response
{
"Code": 200,
"Status": true,
"Id": "TP8avWzSNXS6b5Z1n7Zt5YBT5Cv2",
"Data": {
"1582223830568": {
"After": "4992.939375",
"Amount": "7.15",
"Before": "5000.0",
"Gain": "0.08937500000000001",
"reciept": "538"
},
}
- 14 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
- 15 -
JOY FOR MARKETING SERVICES E-PAYMENTS API V1.0
Code Description
302 Authentication Error
200 Successful Transaction
301 Transaction Error
103 Validation Error
- 16 -