New Window

Payment Form Submission

This is a HTTP endpoint that the app refers to when creating the web view – transferring the user to Simplex. The redirect will be done by form submission.

<form id='payment_form' action='#{payment_post_url}' method='POST' target='_self'>
<input type='hidden' name='version' value='#{api_version}'>
<input type='hidden' name='partner' value='#{partner_name}'>
<input type='hidden' name='payment_flow_type' value='wallet'>
<input type='hidden' name='return_url_success' value='#{return_url}'>
<input type='hidden' name='return_url_fail' value='#{return_url}'>
<input type='hidden' name='payment_id' value='#{data.transaction_details.payment_details.payment_id}'>
</form>
<html>
<body>
<form id="payment_form" action="https://sandbox.test-simplexcc.com/payments/new" method="post">
<input type="hidden" name="version" value="1">
<input type="hidden" name="partner" value="partner_name">
<input type="hidden" name="payment_flow_type" value="wallet">
<input type="hidden" name="return_url_success" value="https://www.partner.com">
<input type="hidden" name="return_url_fail" value="https://www.partner.com/support">
<input type="hidden" name="payment_id" value="2222cb8e-98fe-4808-b275-ade81ff95d08">
</form>

<script type="text/javascript">
document.forms["payment_form"].submit();
</script>

</body>
</html>

Submission of the HTML form will redirect to the simplex checkout with a 303 response.

The parameters to use in the form are:

Field NameDefinition
versionVersion of Simplex’s form to work with. Currently is “1”.
partnerPartner name, as supplied by Simplex
payment_flow_typeshould be "wallet"
return_url_successURL to redirect the user to, in case of successful checkout completion
return_url_failURL to redirect the user to, in case of failure during checkout process
payment_idMust match the ID from the previous API call
payment_post_url
👍

The HTML form must be hosted on a whitelisted domain. Update your integration team.


Did this page help you?