Link Based Payments
Overview
Link Based Payment APIs enable you to easily perform various invoicing based functions via APIs rather than manual setup. Payment links are sent to the customer via e-mail or SMS as per the details passed in the request. Alternatively, the link can also be captured by merchant by getting return URL configured and be sent to customer on any other communication channels.
The APIs developed to the corresponding functions in the merchant console will allow the Merchants to call the specific API to fetch the list of pre-existing invoice templates, fetch the details of any template, to generate invoice with payment link and send payment request using the pre-defined templates, and resend or cancel the payment request generated earlier respectively.
Alternatively, you can capture the response on return URL and share the link with end customer using any preferred communication channel.
API
- Get Template API:
When triggered, with the validation of the request the merchant receives template number and name in response as per the templates created by the merchant. - Get Template Details API:
When triggered, with the validation of the request the merchant receives all details pertaining to the specific template for which the API is triggered. - Create Payment Link API:
The Create Payment Link API is triggered in order to create invoice using a predefined template in the merchant console by the merchant which is sent along with the payment link. - Resend Payment Link API:
The merchant hits this API in order to resend the payment link and invoice to customer. - Cancel Payment Link API:
The merchant hits this API in order to cancel the sent invoice by disabling the ability to make payment using the payment link.
Note:Link based payment APIs can use only those invoice templates that are created in the merchant console.
Status Codes
| Status Code | Description |
|---|---|
| OTS0000 | Request Executed Successfully |
| OTS0001 | Invoice Link Sent Successfully |
| OTS0002 | Invoice Link Cancelled Successfully |
| OTS1001 | Parameters Are Missing |
| OTS1002 | Invalid Merch ID/Password |
| OTS1003 | Inactive Merchant |
| OTS1004 | Template Not Found |
| OTS1005 | Template Details Not Found |
| OTS1006 | Template Field/s Is/Are Missing |
| OTS1007 | Default Value Missing |
| OTS1008 | Value Missing (If Request Format(JSON) Is Invalid) |
| OTS1009 | Bad Request (For Unexpected Errors) |
| OTS1010 | Something Went Wrong |
| OTS1011 | Signature Mismatched |
| OTS1012 | Invoice Not Found |
| OTS1013 | Action Not Found |
| OTS1014 | Request Failed |
| OTS1015 | Cancelled Invoice |
Signature Generation
Signature is an element of the parameters being passed. It is part of the Category account validation. Signature needs to be created every time for new transaction. Signature type is HMACSHA512.
The param field consists of following elements:
| Signature String | |
|---|---|
| Create Payment Link | MID + Password+ amount + merchantTxnId |
| Resend/Cancel Payment Link | MID + Password + InvoiceNo |