Create a payment transaction for paying from a prepaid Wallet. Once you have the response, depending on the “method” attribute, you will have to take the next step. If you receive GET, then take the value in the “URL” attribute and redirect the user to this location. If you receive POST, then “params” attribute will hold a map containing key-value pairs.
For Web, you can create a form with these parameters as hidden variables and auto submit the form. Example code in Javascript: Serialize Parameters.
For Android, serialize this data such that it can be loaded to WebView directly via postData. Example code in Java: Serialize Parameters.
payment_method | Bank |
---|---|
MOBIKWIK | MobiKwik Wallet |
PAYTM | PayTM |
FREECHARGE | FreeCharge wallet |
OLAMONEY | Ola Money wallet |
PAYUMONEY | Payu Money wallet |
AIRTELMONEY | Airtel Money |
OXIGEN | Oxigen Wallet |
PAYZAPP | PayZapp Wallet |
JANACASH | Jana Cash |
JIOMONEY | JioMoney |
PHONEPE | PHONEPE / BHIM UPI |
AMAZONPAY | Amazon Pay |
PAYPAL | PAYPAL |
HANDLING POST
When you get POST
as the authentication method in the response, then the customer must be redirected using a form. Example HTML code is given to you. Depending on your client language, choose the appropriate way to create the form.
<form method="POST" action="$authentication.url" id="authForm">
{{ for key in $authentication.params }}
<input type="hidden" name="$key" value="$authentication.params[$key]">
{{ end }}
</form>
<script type="text/javascript">
document.forms["authForm"].submit()
</script>
HANDLING GET
When you get GET
as the authentication method in the response, you may load the URL directly into the customer’s browser. You can easily achieve this by sending HTTP 302 from your server. However, if the API call was made from the browser, then you can utilize the code snippet provided.
<form method="POST" action="$authentication.url" id="authForm">
{{ for key in $authentication.params }}
<input type="hidden" name="$key" value="$authentication.params[$key]">
{{ end }}
</form>
<script type="text/javascript">
document.forms["authForm"].submit()
</script>