This document provides Noqoody specification including integration with merchant website, and specification of initializing payment process. This document also provides HTTP API used to get payment token, validating payment request, as well as payment response with HTTP API specification.
Noqoody payment gateway exchanges data between merchant and gateway in the form of Request and Response. All communications with Noqoody are encrypted with an external layer of encryption “SSL” Once you are enrolled in the Noqoody, you will be provided with a unique UserID for both a sandbox and a production environment. The Noqoody environment UserID will be provided upon successful completion of your sandbox integration. Please note that the UserID is not interchangeable. It is merchant’s responsibility to keep the credentials in a secure and hidden environment.
Noqoody require user identification for each transaction level authentication and authorization.
Please click here to download the postman collection for your production
account
Please click here to download the postman collection for your sandbox
account
https://noqoodypay.com/sdk/token
POST /sdk/token HTTP/1.1 Host: noqoodypay.com Content-Length: 72 grant_type=password&username=noqoody_user_name&password=noqoody_password
{ "access_token": "access_token", "token_type": "bearer", "expires_in": 1209599, "userName": "user_name", "Name": "name_on_noqoody_account", "Role": "user_role", "ImageLocation": "logo_on_noqoody_account", "Email": "name_on_noqoody_account", ".issued": "Sun, 07 Aug 2022 07:38:57 GMT", ".expires": "Sun, 21 Aug 2022 07:38:57 GMT" }
This API will generate the payment url which will redirect the user to Noqoody where the
payment will be handeled automatically by the Noqoody Payment System or the
SessionID and UUID can be used
in section 4.3 API for generatinig the links separately if you are looking for a custom solution.
The SessionID and UUID in this API will be used for the API stated
in section 4.3 in which all the payment
options will be displayed in the form of an array with their respective links
Please use the following link as reference on how to generate secure hash:
LINK
Format:
{CustomerEmail}{CustomerName}{CustomerMobile}{Description}{ProjectCode}{Reference}
You will need the Client Secret Key as the key value to generate the securehash
Secret Key: The client secret will be sent via email to the registered account. For the
sandbox
environment you can find the secret key in the portal provided by
Technical Support Team
https://noqoodypay.com/sdk/api/PaymentLink/GenerateLinks
POST /sdk/api/PaymentLink/GenerateLinks HTTP/1.1 Host: noqoodypay.com Content-Length: 358 { "ProjectCode": "your_project_code", "Description": "order_description_less_than_40_characters_with_no_special_characters", "Amount": "45.00", "CustomerEmail": "customers_email", "CustomerMobile": "customers_mobile_number", "CustomerName": "customers_name", "SecureHash": "secure_hash", "Reference": "reference_id" }
{ "PaymentUrl": "https://sandbox.noqoodypay.com/test/payment.html?SessionID=8116ba10-1a25-457e-a818-vcaa323kjdfs&uuid=136852454", "ProjectCode": "project_code", "Reference": "your_custom_unique_reference", "Description": "Order_Description", "Amount": 36, "CustomerEmail": "example@gmail.com", "CustomerName": "Customer", "CustomerMobile": "12345678", "SessionId": "8116ba10-1a25-457e-a818-vcaa323kjdfs", "Uuid": "136852454", "success": true, "code": "OK", "message": "Payment Link Generated", "errors": [] }
This API will consume the SessionID and UUID generated by API stated in section 4.2.2 and will return the list of payment channels along with the transacion details
https://noqoodypay.com/sdk/api/PaymentLink/PaymentChannels?SessionID=sessionid_here&uuid=uuid_here
GET /sdk/api/PaymentLink/PaymentChannels?SessionID=sessionid_here&uuid=uuid_here HTTP/1.1 Host: noqoodypay.com
The following response will have payment links to Credit Card, Debit Card, PayPal, Google Pay™, Ooredoo & Vodafone
{ "PaymentChannels": [ { "ID": 0, "ChannelName": "Payment_Channel_Name", "ImageLocation": "Payment_Channel_Image", "PaymentURL": "Payment_URL_Used_for_redirecting_customer" } ], "TransactionDetail": { "MerchantName": "Company_name_on_noqoody_account", "TransactionDescription": "Transaction_Description", "Amount": 36, "Reference": "your_custom_unique_reference", "MobileNumber": "your_company_mobile_number_on_noqoody_account", "Email": "your_email_on_noqoody_account", "CustomerEmail": "example@gmail.com", "CustomerMobile": "12345678", "CustomerName": "Customer_Name", "MerchantLogo": "your_company_logo_url" }, "success": true, "code": "200", "message": "", "errors": [] }
This API will validate the payment by using your unique reference. We recommend all our merchants to
use this API as it will confirm the collection of the payment after the user is redirected back to
your redirect URL
https://noqoodypay.com/sdk/api/PaymentLink/PaymentChannels?SessionID=sessionid_here&uuid=uuid_here
GET /sdk/api/Members/GetTransactionDetailStatusByClientReference/?ReferenceNo={your_unique_reference} HTTP/1.1 Host: www.noqoodypay.com
{ "TransactionID": "00000", "ResponseCode": "NA", "Amount": 1.0000, "TransactionDate": "2022-05-17T09:02:30.097", "TransactionStatus": "0000", "Reference": "your_custom_unique_reference", "ServiceName": "Payment_Channel_Name", "Mobile": "customer_mobile", "TransactionMessage": "Payment processed successfully.", "PUN": "noqoody_bank_reference", "description": "Order_Description", "InvoiceNo": "invoice_number", "DollarAmount": 0.0, "Email": null, "PayeeName": null, "success": true, "code": "OK", "message": "Transaction Found", "errors": [] }
{ "TransactionID": "00000", "ResponseCode": "NA", "Amount": 36.0000, "TransactionDate": "2022-07-25T11:30:01.213", "TransactionStatus": "2996", "Reference": "your_custom_unique_reference", "ServiceName": "Payment_Channel_Name", "Mobile": "customer_mobile", "TransactionMessage": "Canceled before payment method selection.", "PUN": "noqoody_bank_reference", "description": "Order_Description", "InvoiceNo": "invoice_number", "DollarAmount": 0.0, "Email": null, "PayeeName": null, "success": false, "code": "OK", "message": "Transaction Found", "errors": [] }
The following API will consume the SessionID, UUID & another extra field ChannelID. The ChannelID property will represent the type of mobile payment
https://noqoodypay.com/sdk/api/PaymentLink/RequestDCBPayment
{ "SessionID": "sample string 1", "UUID": "sample string 2", "ChannelID": 3 }
{ "SessionID": "sample string 1", "UUID": "sample string 2", "ChannelID": 2, "RequestNumber": "sample string 4", "success": true, "code": "sample string 6", "message": "sample string 7", "errors": [ "sample string 1", "sample string 2" ] }
The following API will consume the SessionID, UUID, RequestNumber (In response of previous API) & OTP
https://noqoodypay.com/sdk/api/PaymentLink/ProcessDCBPayment
{ "SessionID": "sample string 1", "UUID": "sample string 2", "RequestNumber": "sample string 3", "OTP": "sample string 4" }
Use the RedirectURL in this response to redirect the user back to the callback URL that is set in your noqoody account.
{ "RedirectURL": "sample string 1", "PUN": "sample string 2", "TransactionID": "sample string 3", "ResponseCode": "sample string 4", "MobileNumber": "sample string 5", "Amount": 6.0, "TransactionDate": "2022-08-09T14:22:32.2273996+03:00", "TransactionStatus": "sample string 8", "Reference": "sample string 9", "Provider": "sample string 10", "success": true, "code": "sample string 12", "message": "sample string 13", "errors": [ "sample string 1", "sample string 2" ] }
Add it in your root build.gradle at the end of repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
dependencies { implementation 'com.github.Qmobile-IT:NoqoodyPaySDK:1.0.13' }
NoqoodyPay.Pay(Activity activity, String baseURL,String UserName, String Password, Double Amount,
String CustomerEmail, String CustomerMobile, String ProjectCode, String Description, String
RedirectURL, String Reference, String ClientSecret)
Note: base URL should end with “ / ”
public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == NoqoodyPay_Keys.Activity_RequestCode) { if (resultCode == Activity.RESULT_OK) { //For Payment Status data.getStringExtra(NoqoodyPay_Keys.paymentresult_status) //For Payment Result Message data.getStringExtra(NoqoodyPay_Keys.paymentresult) //For Payment Result Data data.getStringExtra(NoqoodyPay_Keys.paymentresultData) } } }