Load Money (Using Web View Component)


Load money using standard kit and WebView component.



How to load money using standard kit?

The POST request will be send over HTTPS to the endpoint.


Sample Request (URL Encoded)

String params = "
    merchantTransactionId="TD32434553454"
    &amount="50.00"
    &currency="USD"
    &descriptor="TD32434553454"
    &customerId="189405"
    &walletOwnerId="1"
    &verificationHash="8416e8c5cf8cecc7325d19c5b12015863d37f18f2ee9b669c975bf2db2be6125"
    &transactionType="LOAD"
    &mobilePlatform="android/iOS/web"
    &paymentMode="CC"
    &paymentBrand="VISA";


Sample Response

{  
   "status":"Success",
   "amount":"50.00",
   "statusdescription":"Transaction Successful"
}

NOTE:

  • merchantTransactionId – Provide Unique Id everytime
  • descriptor - same value of merchantTransactionId
  • customerContact – mobile number with country code
  • transactionType – LOAD
  • mobilePlatform – android/iOS
  • paymentMode – from above payment mode table
  • verificationHash – SHA256Algorithm.generateSHA256Hash(secKey.trim()+customerId.trim()+customerContact.trim()+walletOwnerId.trim())


How to generate verification hash?

Verification Hash has to be calculated with following combination using SHA256 algorithm and need to be send along with the authentication parameters in each server-to-server request:
<secKey><customerId><customerContact><walletOwnerId>


Sample Code



Example to call from WebView component

webView.postUrl(URL, params.getBytes());
webView.getSettings().setJavaScriptEnabled(true);
webView.addJavascriptInterface(this,"android");


Request Parameters

This reference lists all the standard flow parameters to be send in request.

Parameter Description Format Required
merchantTransactionId This reference number is provided by the merchant, should be unique for the transactions and is visible on the end customer’s statement. .\\p[0-9a-zA-Z\\p{Space}\\-{0,1024} Yes
amount Amount of the transaction. N50
[0-9] {1,50}
Yes
currency User's currency A3
[0-9]{3}
Yes
descriptor Same value as merchantTransactionId .\\p[0-9a-zA-Z\\p{Space}\\-{0,1024} Yes
customerId Generated unique customer id on per user sign up. N
[0-9]
Yes
walletOwnerId Provided by Unique id. N20
[0-9]
Yes
verificationHash Verification Hash has collected combination of parameters. String Yes
transactionType Pass transaction type as LOAD/PURCHASE. A255 Yes
mobilePlatform Mobile device platform android/iOS. A255 Yes
paymentMode Payment method for paying amount. For ex: CC for Credit Cards AN32
[a-zA-Z0-9] {1,32}
Yes
paymentBrand Type of Card while placing the transaction.For ex: VISA, MC AN32
[a-zA-Z0-9] {1,32}
Yes


Response Parameters

This reference list lists all the standard flow parameters to be received in response.

Parameter Description Format Required
status Response status (SUCCESS/FAILED). A
[A-Z]
Conditional
amount Amount of the transaction.. N
[0-9]
Yes
statusDescription Transaction status description. A255 Conditaional



List of response code from API

Status
Success
Failed
Pending
Declined