Web integration
Checkout
Payment Form integrates Swipez Payment Gateway in your website to accept payments quickly. In this integration method, you prepare the checkout form with the correct order and payee details and redirect the payee from your checkout page to the payment screen.
The Checkout form provides payees with a streamlined flow for initiating payments. Payee enters payment details on the payment screen and completes the payment.
Steps to integrate with Swipez Payment Gateway,
Step 1: Create Checkout Form
Customers transactions are associated with a unique identifier reference no for each transaction. The transaction amount is associated with an identifier transaction amount. To process the payments for these transactions, you must send us the reference no and the corresponding transaction amount. We send you the payment status against each transaction.
You need to send us a few more details to process the payment. Click here to see all the Request Parameters.
See the code below on how to generate a valid signature for Checkout integration.
Create a sample HTML form like shown below. Ensure to fill in the correct credentials for account id and secret key. You will get account id and xway key from Swipez support.
For Production/Live Environment set the action attribute of the form to: https://www.swipez.in/xway/secure
For Test Environment set the action attribute to: https://h7sak8am43.swipez.in/xway/secure
Request Parameters
Payment form accepts all the request parameters mentioned below. Ensure you send us all the required fields. Requests with an invalid secure hash will be rejected.
Step 2: Generate secure hash
Every request to Swipez must contain authentication information to establish the identity of the user making the request. We use a digital signature to validate each transaction. This will ensure integrity of the signed data against tampering.
In the sample form above, generate a secure hash for every checkout. The signature is generated as the HMAC value of the data being passed which is using MD5 hash function in combination with your xway key.
We will generate a secure hash at our end and want you to do the same with the posted data and match it with the passed argument.
Secure hash generation varies across integration methods, ensure you are using the right secure hash generation method.
Webhook Notification
Webhooks are events that notify you about the payment. A notification is sent to your backend from Swipez when payments are successful. These notifications are useful in cases when the internet connection is unstable or slow while the payment is being processed. This will allow you to reconcile all the successful orders at your end.
Notifications are sent only for successful payments.
Sometimes you may receive the same notification more than once. It is recommended to ensure that your implementation of the webhook is idempotent.
Response Parameters
Swipez sends details about every transaction to return Url. These parameters will be posted to the services you host on these URLs.
The return Url is the webpage where your customer will be redirected to after completing the payment on the Swipez payment page, we will post the response parameters to this page.
The response parameters which Swipez posts to these URLs are available below:
Response Verification
Similar to every request signature, we send a digital signature in our response message. We recommend you verify this response signature to check the authenticity of the transaction response. This will ensure that the response has not tampered.PHP PYTHON ASP .NET
Integration Kits
The integration kits for all major platforms are available below:
After the integration is complete, you can test the flow of the transaction before you start accepting payments online.
You can make a test transaction using the test card details available below. You can verify the payment status using the PG Dashboard, APIs. After completing the test, you can start accepting payments from your customers in real-time.
Card Details
Last updated