<div style="background-color: #FFFFFF; min-width: 530px">
**This section will explain the structure of input & output payload (data) for HyperSDK.**
<div style="border-bottom: 5px solid #FFFFFF"></div>
### Payload structure for '**Initiate**' and '**Process**' API requests (input):
<div style= "min-width: 530px; max-width: 800px; border: 2px solid #C0C0C0; background-color: #B2D8D8"> <div style= "min-width: 530px; max-width: 800px; border: 2px solid #C0C0C0; background-color: #B2D8D8; margin: 10px">
Variable | Column Title | Type | Description |
requestId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique randomly generated UUID v4 string for triggering any operation on HyperSDK. It is used for tracking purposes.<br>Should be a UUID string (see [Generate UUID](🔗)). |
service | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Service name<br>(For payment page service, use: "**in.juspay.hyperpay**") |
payload:<span style= "color: #FFFFFF">wwwwwwww</span><br> {param1, param2,..} | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | JSON object<br>Strings | Request payload specific to each operation.<br>**Open a table below to list the payload object parameters for Initiate or Process APIs:** |
<div style="border-bottom: 3px solid #C0C0C0"></div> <div style="border-bottom: 8px solid #EBE8E4"></div>
<details style= "background-color: #EBE8E4"><summary style= "margin-left: 15px"> <span style="font: 15px Arial; font-weight:bold"> Initiate Payload Object Parameters:</span> <span style= "color: #2F7395"> (click to view)</span></summary>
<div style="border-bottom: 10px solid #EBE8E4"></div> <div style= "min-width: 530px; max-width: 800px; background-color: #EBE8E4; margin: 13px">
The payload passed to the **SDK** during **Initiate SDK** call shall contain <span style= "color: red; text-decoration: line-through">below parameters</span> <span style= "color: red"> parameters listed below</span>. Please note that <span style= "color: red; text-decoration: line-through">the below params</span> <span style= "color: red"> these parameters</span> will be sufficient for <span style="color: red">these </span> **Payment Methods<span style="color: red; font-weight: bold">:</span> Cards, Netbanking, Wallets** and **UPI** (Collect, Intent flows).
<div style= "border: 2px solid #C0C0C0">
Variable | Column Title | Type | Description | Default |
action | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Changes based on operation to be performed | <span style= "color: #FFFFFF">wi</span>"initiate"<span style= "color: #FFFFFF">wi</span> |
clientId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | ClientId will be shared by Juspay team. | |
<span style="color:red">customerId</span> | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | <span style="color:red">String</span> | Unique identifier of the customer. It is the ID with which merchant refers to a customer object. In case of guest login it should be an empty string. Guest user login is supported on Web platform only.<br><span style="color:red">**Note:** This parameter was found in the sample, but not in the original parameter list.</span> | |
signaturePayload:<span style= "color: #FFFFFF">wwww</span><br> "{param1, param2, ...}" | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | Stringified<br>Object | JSON Stringified signaturePayload object<br>**Open table below to list parameters:**<br><details style= "background-color: #E2EAEC; border: 1px solid #A0A0A0; min-width: 290px; border-radius: 5px"><summary><span style="font: 15px Arial; font-weight:bold"> signaturePayload Parameters:</span></summary><div style="border-bottom: 3px solid #E2EAEC"></div> **_merchant_id_**<span style= "color: #E2EAEC">nnnt</span><span style="color:red; font: 17px Arial; font-weight:bold">\*</span> <span style= "color: #E2EAEC">ww</span>String<span style= "color: #E2EAEC">www</span><div style="position: relative; left: 25px; max-width: 248px">Unique **MerchantId** shared during the on-boarding.</div> **_customer_id_**<span style= "color: #E2EAEC">nwnn</span><span style="color:red; font: 17px Arial; font-weight:bold">\*</span> <span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px; max-width: 248px">Uniquely identifies the customer. It is the ID with which merchant refers to a customer object.</div> **_mobile_number_** <span style= "color: #E2EAEC">t</span> <span style="color:red; font: 17px Arial; font-weight:bold">\*</span> <span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px">Mobile number of the customer.</div> **_email_address_**<span style= "color: #E2EAEC">nnn</span><span style="color:red; font: 17px Arial; font-weight:bold">\*</span> <span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px"> Email address of the customer.</div> **_first_name_**<span style= "color: #E2EAEC">nnnntnnn</span><span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px">Customer’s first name.</div> **_last_name_**<span style= "color: #E2EAEC">nnnnnnnn</span><span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px">Customer’s last name.</div> **_timestamp_**<span style= "color: #E2EAEC">nnnnntn</span><span style="color:red; font: 17px Arial; font-weight:bold">\*</span> <span style= "color: #E2EAEC">ww</span>String<div style="position: relative; left: 25px; max-width: 248px"> Time at which the session is started<br>(Epoch Unix timestamp in milliseconds). </div></details> | |
signature | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Signed <code>signaturePayload</code> (above mentioned JSON Stringified object). Please refer to [Generating the Signature](🔗) for instructions. | |
merchantKeyId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique identifier for the Signature that will be provided by Juspay after the merchant<span style= "color: red; text-decoration: line-through">s </span> share<span style= "color: red">s</span> the public key. <span style= "color: red">Please refer to [Generating the Signature](🔗) for instructions.</span> | |
merchantId | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Unique <code>merchantId</code> shared during onboarding.<br><br>This parameter shall not be passed if the customer/order is created through <span style= "color: red">the</span> Payments SDK.<br><br>It is Mandatory <span style= "color: red; text-decoration: line-through">, when</span><span style= "color: red"> if</span> the payment session token is obtained from Juspay Servers. | |
environment | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Environment to be used in the session. Accepted values are “**sandbox**” or “**prod**” | “prod” |
logLevel | | String | Pass this parameter to receive the user click events. Refer to [Clickstream Events](🔗) for list of events.<br>Value : “1” | |
merchantFonts | | String | This is an optional feature which may be used to enable the **SDK** to load fonts directly from merchants’ app. Please refer to [Merchant Fonts](🔗) for more details.<br><br>{<br>“bold” : {<br> “name” : String<br> ${source} : String/Int -> Placeholder for<br> “resId” or “path” <br> }<br>“regular” : {<br> “name” : String<br> ${source} : String/Int<br> }<br>“semiBold”:{<br> “name” : <br> ${source} : String/Int<br> }<br> } | |
</div></div><div style="border-bottom: 20px solid #EBE8E4"></div></details> <div style="border-bottom: 8px solid #EBE8E4"></div> <div style="border-bottom: 3px solid #C0C0C0"></div> <div style="border-bottom: 8px solid #FFFCD7"></div>
<details style= "background-color: #FFFCD7"><summary style= "margin-left: 15px" ><span style="font: 15px Arial; font-weight:bold"> Process Payload Object Parameters:</span> <span style= "color: #2F7395"> (click to view)</span></summary> <div style="border-bottom: 10px solid #FFFCD7"></div> <div style= "min-width: 530px; max-width: 800px; background-color: #FFFCD7; margin: 13px">
Since the SDK is an enhanced Payments Orchestrator, the payload to Process SDK is typically a bunch of basic Payments payload parameters. Merchants must make sure to add these required metrics while invoking Payments SDK. These parameters are crucial in initiating the SDK and for analytical purposes. <span style= "color: red; text-decoration: line-through">Find below the set of parameters which needs to be passed in the payload:</span><span style= "color: red"> Find the set of parameters to be passed in the payload from the list below</span>:
<div style="border-bottom: 1px solid #FFFCD7"></div> <span style="color:red; font: 16px Arial; font-weight:bold">Note : </span><span style="color:red"> When the parameter <b><i>action</i></b> is set to <code>“paymentManagement”</code>, the payload for the <b>Process API</b> shall contain only the parameters listed <a href= "doc:payment-management-1" target="_blank" >here</a>. This will start the payment management interface. </span>
<div style="border-bottom: 15px solid #FFFCD7"></div> <div style="border: 2px solid #C0C0C0;">
Variable | Column Title | Type | Description | Default |
orderDetails:<span style= "color: #FFFFFF">wwwwww</span><br> "{param1, param2, ...}" | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | Stringified<br>Object | JSON :stringified :Order details.<span style= "color: #FFFFFF">wwww</span><br>**Open table below to list parameters:** | <span style= "color: #FFFFFF">wwwwt</span> |
<div style="border-bottom: 3px solid #C0C0C0"></div> <div style="border-bottom: 8px solid #F6F1B2"></div>
<details style= "background-color: #F6F1B2"><summary style= "margin-left: 15px" ><span style="font: 15px Arial; font-weight:bold"> Order Details parameters:</span> <span style= "color: #2F7395"> (click to view)</span></span></summary> <div style="border-bottom: 10px solid #F6F1B2"></div> <div style= "min-width: 530px; max-width: 800px; border: 2px solid #C0C0C0; background-color: #F6F1B2; margin: 13px">
Variable | Column Title | Type | Description | Default |
order_id | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | <span style= "color: #FFFFFF">wt</span>String<span style= "color: #FFFFFF">wt</span> | Unique Identifier for the order.<span style= "color: #FFFFFF">wwwww</span><br>**Should be Alphanumeric with character length less than 18.** | |
merchant_id | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique MerchantId shared during the on-boarding. | |
amount | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Amount that the customer has to pay. Will accept stringified double or integer values with upto two decimal places. For example, "100.15" and "100" are valid input but "100.1532" is not valid. | |
timestamp | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Epoch Unix timestamp in milliseconds. | |
customer_id | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | String that uniquely identifies the customer. It is the ID with which merchant refers to a customer object. | |
<span style="color:red">first_name</span> | | <span style="color:red">String</span> | <span style="color:red">Customer’s first name.<br>**Note:** This was found in the _orderDetails_ object for **Payment Locking**, but not in the _orderDetails_ object for **Process Payload**.</span> | |
<span style="color:red">last_name</span> | | <span style="color:red">String</span> | <span style="color:red">Customer’s last name.<br>**Note:** This was found in the _orderDetails_ object for **Payment Locking**, but not in the _orderDetails_ object for **Process Payload**..</span> | |
currency | | String | **ISO** string of the currency. Use **INR** for Indian Rupee. Among other accepted values are **EUR, USD, GBP.** | "INR" |
gateway_id | | String | **12** for **PAYU, 18** for **PAYTM**<br>Specify your preferred gateway for this order. Complete mapping for “gateway_id” can be found here: Gateway mapping | |
customer_email | | String | Email address of the customer.<br>If the backend gateway requires it, then you must send this value. | |
customer_phone | | String | Mobile number or fixed line number of the customer.<br>If the backend gateway requires it, then you must send this value. | |
<span style="color:red">mobile_number</span> | | <span style="color:red">String</span> | <span style="color:red">Mobile number of the customer.<br>**Note:** This was found in the _orderDetails_ object for **Payment Locking**, but not in the _orderDetails_ object for **Process Payload**.</span> | |
description | | String | Short description for the order. We send this information to the backend gateways whenever there is a provision for this. | |
return_url | | String | A fully qualified URL such as http://shop.merchant.com/ to which the customer will be redirected after payment completion. This URL shouldn’t contain any query parameters. This URL takes higher precedence over the common return URL configured in your account settings. | |
udf1 | | String | Custom parameter | |
udf2 | | String | Custom parameter | |
udf3 | | String | Custom parameter | |
udf4 | | String | Custom parameter | |
udf5 | | String | Custom parameter | |
udf6 | | String | Custom parameter | |
udf7 | | String | Custom parameter | |
udf8 | | String | Custom parameter | |
udf9 | | String | Custom parameter | |
udf10 | | String | Custom parameter | |
options.<span style= "color: #FFFFFF">wwwwwwwww</span><br> create_mandate | | Object<br>String | Required to create a mandate transaction. Takes the value of **REQUIRED, OPTIONAL, DISABLED** | |
**mandate.<br> {{parameter}}** | | Object<br>String | Object containing a mandate detail (all mandate details are listed in **mandate.{{parameter}}** {object) format)<br>**(open table below to view list of parameters):** | |
<div style="border-bottom: 3px solid #C0C0C0"></div> <div style="border-bottom: 12px solid #EBE8E4"></div>
<details style= "background-color: #EBE8E4"><summary style= "margin-left: 15px"><span style="font: 15px Arial; font-weight:bold"> Mandate Object Parameters:</span> <span style= "color: #2F7395">(click to view)</span> </summary>
<div style="border-bottom: 10px solid #EBE8E4"></div> <div style= "margin: 13px">
Variable | Column Title | Type | Description | Default |
max_amount | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Maximum amount for a mandate. Mandatory only if `mandate.amount_rule ` = **VARIABLE**. | |
start_date | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Mandate start date in UNIX EPOCH timestamp (UTC timezone). The start date has to be today’s date.<br><br>Mandatory only for UPI Mandates | |
end_date | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Mandate end date in UNIX EPOCH timestamp (UTC timezone), from when a mandate will move to **EXPIRED** state, and recurring mandate will not be allowed.<br><br>Mandatory only for UPI Mandates | |
frequency | | String | Defines the frequency of mandate execution, or how often a customer should be charged.<br>**(See description below table)** | ASPRESENTED |
rule_value | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Determines the day of week or month that a mandate will be executed, depending on <code>mandate.frequency</code>.<br>**(See description below table)** | |
amount_rule | | String | Data type: **ENUM**<br>Possible values: **FIXED, VARIABLE.**<br><br>In case of **FIXED**, `max amount ` will be equal to `amount ` | VARIABLE |
rule_type | | String | **ON / BEFORE / AFTER**<br>For Razorpay, rule_type will be updated to **BEFORE**.<br>For Paytm, rule_type will be updated to **AFTER** | |
revokable_by_customer | | Boolean | Possible Values:<br>**TRUE, FALSE**<br><br>If **FALSE**, the mandate cannot be revoked by the customer once set. It should be **TRUE** for Recurring and **TRUE/FALSE** for **ONETIME** | true |
block_funds | | Boolean | Set to **TRUE** if funds have to be blocked while a mandate is being created. Should be **TRUE** for **ONETIME** and **FALSE** for **Recurring**. By default value will be **TRUE** for **ONETIME** and **FALSE** for Recurring. | |
</div> <div style="border-bottom: 10px solid #EBE8E4"></div> <div style= "margin-left: 15px"> <span style="color:red; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Required</span><br> <span style="color:blue; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Conditional</span></div>
<br> <div style="margin-left: 15px; margin-right: 15px">
<details class= "rjf"><summary style= "width: 580px; height: 35px"> <span style="font: 14px Arial; font-weight:bold">mandate.frequency / mandate.rule_value </span> definitions: <span style= "color: #2F7395">(click to view)</span></summary>
<div style="border-bottom: 5px solid #D7F9D5;"></div>
<div style= "width: 580px; height: 235px; margin-left: 13px; border: 1px solid #404040; border-radius: 10px; background-color: #FBFFDA; padding-left: 30px; padding-top: 10px; padding-right: 20px"><span style= "font: 14px Arial; color: #404040"><span style="font: 16px Arial; font-weight: bold">mandate.frequency</span><div style="border-bottom: 8px solid #FBFFDA"></div>Description: Defines the frequency of mandate execution, or how often a customer<div style="text-indent: 5.8em;">should be charged.</div><div style="border-bottom: 8px solid #FBFFDA"></div>Data type: String (<span style="font-weight: bold">ENUM</span> format)<div style="border-bottom: 10px solid #FBFFDA"></div>Possible values:<div style="border-bottom: 5px solid #FBFFDA"></div><span style="font-weight: bold">ONETIME, DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY,<br>QUARTERLY, HALFYEARLY, YEARLY, ASPRESENTED</span><div style="border-bottom: 10px solid #FBFFDA"></div>Default: <span style="font-weight: bold">ASPRESENTED</span></span></div>
<br>
<div style= "width: 580px; height: 415px; margin-left: 13px; border: 1px solid #404040; border-radius: 10px; background-color: #D3E5EE; padding-left: 30px; padding-top: 10px; padding-right: 20px"><span style= "font: 14px Arial; color: #404040"><span style="font: 16px Arial; font-weight: bold">mandate.rule_value</span><div style="border-bottom: 8px solid #D3E5EE"></div>Description: This value determines the day of week or month that a mandate will<div style="text-indent: 5.8em;">be executed, depending on the mandate.frequency.</div><div style="border-bottom: 8px solid #D3E5EE"></div>Data type: String (Integer format)<div style="border-bottom: 8px solid #D3E5EE"></div>Possible values:<div style="border-bottom: 8px solid #D3E5EE"></div><span style="font-weight: bold">1-7</span> when frequency is <span style="font-weight: bold">WEEKLY</span>. In weekly, serial numbers start from Monday.<div style="text-indent: 2.4em;"> Monday represents 1 and Sunday represents 7.</div><div style="border-bottom: 8px solid #D3E5EE"></div><span style="font-weight: bold">1-16</span> when frequency is <span style="font-weight: bold">FORTNIGHTLY</span>. This mandate is executed twice a month.<div style="text-indent: 2.4em;">First day of the month is represented by value ‘1’ and ends with ‘15’ on</div><div style="border-bottom: 3px solid #D3E5EE"></div><div style="text-indent: 2.4em;">15th day of the month. Then again starts with ‘1’ for 16th of the month and</div><div style="border-bottom: 3px solid #D3E5EE"></div><div style="text-indent: 2.4em;">ends with the last day of the month.</div><div style="border-bottom: 8px solid #D3E5EE"></div><span style="font-weight: bold">1-31</span> when frequency is <span style="font-weight: bold">MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY,</span> or<div style="text-indent: 2.4em;"><span style="font-weight: bold">YEARLY</span>.</div><div style="border-bottom: 15px solid #D3E5EE"></div>Not required when frequency is <span style="font-weight: bold">ONETIME, DAILY,</span> or <span style="font-weight: bold">ASPRESENTED.</span> For Razorpay, <code>rule_value</code> will be considered as the last date of the week/month/year. For Paytm, <code>rule_value</code> will be considered as today’s date/day.</span></div>
<div style="border-bottom: 14px solid #D7F9D5"></div> <div style="border-bottom: 20px solid #E8E8E8;"></div>
</details></div> <div style="margin-left: 15px; margin-right: 15px">
<details class= "rjf"><summary style= "width: 586px; height: 50px"> Special considerations for certain values of the <span style= "font: 14px Arial; font-weight: bold">mandate.rule_value /</span><div style="text-indent: 1.8em;"><span style= "font: 14px Arial; font-weight: bold">mandate.frequency </span> parameters: <span style="color: #2F7395"> (click to view)</span></div></summary>
<div style="background-color: #D7F9D5; min-width: 580px"> <div style="border-bottom: 10px solid #D7F9D5"></div>
<div style="text-indent: 2.3em;"><span style= "font: 13px Arial; font-weight: bold; color: #404040; background-color: #D7F9D5">Calculating the day of mandate execution for certain values of <code>mandate.rule_value</code></span></div><div style="text-indent: 2.3em;"><span style= "font: 13px Arial; font-weight: bold; color: #404040"> when <code>mandate.frequency</code> is set to 'FORTNIGHTLY' or 'MONTHLY'.</span></div>
<div style="border-bottom: 10px solid #D7F9D5"></div></div>
<div style= "width: 580px; height: 254px; margin-left: 13px; border: 1px solid #404040; border-radius: 10px; background-color: #EADAFF; padding-left: 30px; padding-top: 10px; padding-right: 20px"><span style= "font: 14px Arial; color: #404040"><span style="font: 15px Arial; font-weight: bold">mandate.frequency = FORTNIGHTLY:</span><div style="border-bottom: 8px solid #EADAFF"></div>1. If the value is ‘14’, ‘15’, or ‘16’, and falls on the latter half of February (16th to<div style="text-indent: 1.1em;">28th), then the mandate shall execute on the last day of February.</div><div style="border-bottom: 8px solid #EADAFF"></div>2. If the mandate start date is 24th January 2018 with value ‘16’, then the first<div style="text-indent: 1.2em;">debit will be on 31st January, followed by 15th February, 28th February,</div><div style="border-bottom: 3px solid #EADAFF"></div><div style="text-indent: 1.2em;">15th March, 31st March, and so on.</div><div style="border-bottom: 8px solid #EADAFF"></div>3. If the value is ‘16’, and the month has only 30 days, then the mandate should<div style="text-indent: 1.2em;">execute on 30th.</div><div style="border-bottom: 8px solid #EADAFF"></div>4. If the mandate start date is 29th January, and the value is ‘4’, then the first debit<div style="text-indent: 1.2em;">will be on 4th February, followed by 19th February, 4th March, and so on.</div></span></div>
<br>
<div style= "width: 580px; height: 186px; margin-left: 13px; border: 1px solid #404040; border-radius: 10px; background-color: #FFE8D8; padding-left: 30px; padding-top: 10px; padding-right: 20px"><span style= "font: 14px Arial; color: #404040"><span style="font: 15px Arial; font-weight: bold">mandate.frequency = MONTHLY:</span><div style="border-bottom: 8px solid #FFE8D8"></div> 1. If the value is ‘29’, ‘30’, or ‘31’, and falls in February, then the mandate shall<div style="text-indent: 1.1em;">execute on the last day of February.</div><div style="border-bottom: 8px solid #FFE8D8"></div>2. If the value is ‘31’, and the next executable month has 30 days, then the<div style="text-indent: 1.2em;">mandate will execute on the 30th.</div><div style="border-bottom: 8px solid #FFE8D8"></div>3. If the mandate start date is 29th January and the value is ‘17’, then the first<div style="text-indent: 1.2em;">debit will be on 17th February.</div></span></div>
<div style="border-bottom: 15px solid #D7F9D5"></div></details>
<div style="border-bottom: 20px solid #EBE8E4"></div></details>
<div style="border-bottom: 12px solid #EBE8E4"></div>
<div style="border-bottom: 3px solid #C0C0C0"></div>
Column Title | Column Title | Column Title | Column Title | Column Title |
**metadata.<span style= "color: #FFFFFF">wwwwwwww</span><br> {{parameter}}** | <span style= "color: #FFFFFF">*</span> | Object<br><span style= "color: #FFFFFF">wt</span>String<span style= "color: #FFFFFF">wt</span> | Object containing a Metadata parameter (all metadata details are listed in **metadata.{{parameter}}** (object) format)<br>**(open table below to view list of parameters):** | <span style= "color: #FFFFFF">wwww</span> |
<div style="border-bottom: 3px solid #C0C0C0"></div>
<div style="border-bottom: 12px solid #D3F5D3"></div>
<details style= "background-color: #D3F5D3"><summary style= "margin-left: 15px"><span style="font: 15px Arial; font-weight:bold"> Metadata Object Parameters:</span> <span style= "color: #2F7395">(click to view)</span></summary>
<div style="border-bottom: 10px solid #D3F5D3"></div> <div style= "margin: 13px">
Variable | Column Title | Type | Description | Default |
JUSPAY:gateway_reference_id | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | String that identifies the gateway for Merchant. This shall be passed only when the merchant uses a **Multi-MID** setup for each gateway<br>(i.e - merchant has more than **1 MID** linked with the same payment gateway).<br><br>For **Multi-MID** setup of a Merchant, this parameter is mandatory | |
PAYTM_V2:SUBSCRIPTION_EXPIRY_DATE | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | **Applicable only for Paytm**.<br><br>(format -> YYYY-MM-DD) Date <span style= "color: red; text-decoration: line-through">till</span> <span style= "color: red"> at </span> which subscription <span style= "color: red; text-decoration: line-through">date is active</span><span style= "color: red"> will expire</span>. | “2035-12-31” |
PAYTM_V2:SUBSCRIPTION_FREQUENCY_UNIT | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | **Applicable only for Paytm**.<br><br>This, combined with interval, defines the frequency. The values supported for this attribute currently are: **DAY , MONTH, YEAR**. If the billing cycle is of 2 months, the value for this attribute would be **MONTH**. | DAY |
PAYTM_V2:SUBSCRIPTION_FREQUENCY | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | **Applicable only for Paytm**.<br><br>Combined with <code>subscriptionFrequencyUnit</code>, defines the frequency of renewal transaction. If the renewal cycle is of 2 months, attribute values can be: <code> subscriptionFrequency</code> : 2, <code> subscriptionFrequencyUnit</code> : MONTH. If the renewal cycle is of 15 days, attribute values can be: <code> subscriptionFrequency</code> : 15, <code> subscriptionFrequencyUnit</code> : DAY | "1" |
PAYTM_V2:SUBSCRIPTION_START_DATE | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | **Applicable only for Paytm**.<br><br>(format -> YYYY-MM-DD) Date from which to start subscription. Conditionally mandatory if SUBSCRIPTION_GRACE_DAYS is passed. If this is not passed, renewal can be called after 24 hours. | |
PAYTM_V2:SUBSCRIPTION_GRACE_DAYS | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | **Applicable only for Paytm**.<br><br>Number of days after renewal cycle start date for which merchant can send renewal request. <span style= "text-decoration: line-through; color: red">Mandatory if <code>subscriptionStartDate</code> is sent in request</span>.<br><br>Conditionally mandatory if SUBSCRIPTION_START_DATE is passed. If this is not passed renewal can be called after 24 hours.<br><br>(If SUBSCRIPTION_FREQUENCY_UNIT and SUBSCRIPTION_FREQUENCY are not passed (in which case, they are given default values: DAY, 1), then grace days should be 0, as renewal cycle is of 1 day, if entered more than 0, **Paytm** will invalidate the request) | |
</div><div style="border-bottom: 10px solid #D3F5D3"></div> <div style="margin-left: 15px"> <span style="color:red; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Required</span><br> <span style="color:blue; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Conditional</span>
<div style="border-bottom: 20px solid #D3F5D3"></div> </div></details>
<div style="border-bottom: 12px solid #D3F5D3"></div> <div style="border-bottom: 3px solid #C0C0C0"></div>
Column Title | Column Title | Column Title | Column Title | Column Title |
<span style="font: 15px Arial; font-weight:bold">offer_details: {...}</span><span style= "color: #FFFFFF">wwwi</span> | <span style= "color: #FFFFFF">*</span> | <span style= "color: #FFFFFF">wi</span>**Object**<span style= "color: #FFFFFF">wi</span> | **Offer Details** object, which contains the **Payment Locking** parameters: <span style="color: #001933"> (See the "<a href= "https://developer.juspay.in/docs/payment-locking-1">Payment Locking</a>" page for details.)</span> | <span style= "color: #FFFFFF">wwww</span> |
</div> <div style="border-bottom: 40px solid #F6F1B2"></div> <div style="border-bottom: 3px solid #C0C0C0"></div>
<span style= "color: #FFFFFF">wt</span>Variable<span style= "color: #FFFFFF">wt</span> | <span style= "color: #FFFFFF">i</span> | Type | <span style= "color: #FFFFFF">wwwt</span>Description<span style= "color: #FFFFFF">wwwt</span> | Default |
</details>
<div style="border-bottom: 8px solid #F6F1B2"></div> <div style="border-bottom: 3px solid #C0C0C0"></div>
Column Title | Column Title | Column Title | Column Title | Column Title |
action <span style= "color: #FFFFFF">wwwwwwwwwwwwwwn</span> | <span style= "color: #FFFFFF">i</span> <span style="color:red; font: 17px Arial; font-weight:bold">*</span><span style= "color: #FFFFFF">i</span> | <span style= "color: #FFFFFF">wi</span>String<span style= "color: #FFFFFF">wi</span> | Changes based on operation to be performed.<br><span style= "color: #FFFFFF">wwwwwwwwwwwwwwwwwwwwwwww</span> <br>Pass “**paymentPage**” to start the payment page interface.<br><br>Pass “**quickPay**” to start the quick pay interface.<br><br>Pass “**paymentManagement**” to start the payment management interface. Refer [here](🔗) for complete **Process API** payload | "paymentPage" |
merchantId <span style= "color: #FFFFFF">wwwwwwwwwwwww</span> | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Identifies the merchant.<br>eg. “merchant”. | |
clientId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | ClientId will be shared by Juspay team | |
orderId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique identifier for the order. **Should be Alphanumeric, with character length less than 18.** | |
amount | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Amount of the transaction. | |
customerId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique identifier of the customer. It is the ID with which merchant refers to a customer object.<br><br>In case of guest login it should be an empty string. Guest user login is supported on Web platform only | |
customerEmail | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Customer's email address. | |
customerMobile | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Customer's phone number. | |
signature | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | **RSA-SHA256** Signature of orderDetails in **HEX** format. This is Mandatory if the order is created through Payments SDK. Please refer to [Generating the Signature](🔗) for instructions. | |
merchantKeyId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique identifier for the Signature that will be provided <span style= "color: red"> by Juspay </span> after <span style= "color: red; text-decoration: line-through">sharing</span> <span style= "color: red"> the merchant shares </span> the public key. <span style= "color: red">Please refer to [Generating the Signature](🔗) for instructions.</span> | |
language | | String | Pass the language value to localise payment experience in regional language. Accepted values are "**english**", "**hindi**", "**telugu**", "**tamil**", "**bengali**", "**malayalam**", "**gujarati**", "**kannada**", "**marathi**". | "english" |
environment | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Environment to be used in the session. Accepted values are “**sandbox**” or “**prod**” | "prod" |
guest_login_url | <span style="color:blue; font: 17px Arial; font-weight:bold">*</span> | String | Provide URL where user should be redirected for login inorder to fetch saved payment methods. This feature is available only in Web payment page. | |
<span style= "color: red">payeeName</span> | | String | Custom **_payeeName_** to override default **_payeeName_** in **UPI-INTENT APP**<br>**Note :** - May or may not reflect due to extra verification at **UpiApps** end which cannot be controlled by Juspay<br><span style= "color: red">(New parameter)</span> | |
<span style= "color: red">displayNote</span> | | String | Custom **_displayNote_** to override default **_displayNote_** (transaction-note) in **UPI-INTENT APP**<br>**Note :** - May or may not reflect due to extra verification at **UpiApps** end which cannot be controlled by Juspay<br><span style= "color: red">(New parameter)</span> | |
</div></div><div style="border-bottom: 20px solid #FFFCD7"></div></details>
<div style="border-bottom: 8px solid #FFFCD7"></div> <div style="border-bottom: 3px solid #C0C0C0"></div> <div style= "min-width: 530px; height: 75px; background-color: #FFFFFF; padding-left: 20px; padding-right: 10px; padding-top: 15px"><span style="color:red; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Required</span><br><span style="color:blue; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Conditional</span></div> </div></div></div> <div style="border-bottom: 1px solid #FFFFFF"></div>
#### Sample input API request for **Initiate:**
<br>
#### Sample input API request for **Process:**
<div id= "PayloadResponse"></div> <div style="border-bottom: 15px solid #FFFFFF"></div>
### Response structure for '**Initiate**' and '**Process**' APIs (output):
<div style= "min-width: 530px; max-width: 800px; border: 2px solid #C0C0C0; background-color: #B2D8D8"> <div style= "min-width: 530px; max-width: 800px; border: 2px solid #C0C0C0; background-color: #B2D8D8; margin: 10px">
Variable | Column Title | Type | Description |
requestId | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Unique identifier sent for every operation |
event | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Indicates what event is triggered by HyperSDK<br><span style="color:red">Possible events:<div style="position: relative; left: 10px">**_"initiate_result":_** for handling initiate responses, etc., and logging them<br>**_"hide_loader":_** for stopping the processing loader<br>**_"log_stream":_** for consuming the click events<br>**_"process_result":_** for handling process responses, etc., and logging them</div></span> |
service | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Service name<br>(For payment page service: in.juspay.hyperpay) |
error | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | Boolean | Error is returned <code>true</code> in case the operation is not successful. In case the error field is <code>true</code>, please check <code>errorCode</code> and <code>error message</code> for more details. |
errorCode | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Check for this key to detect error when ‘error’ parameter is <code>true</code>. |
errorMessage | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Check for this key to detect error when ‘error’ parameter is <code>true</code>.<br><span style="color:red">(See <a href= "https://developer.juspay.in/docs/error-codes-2">Error Codes</a> for details on error codes and messages.)</span> |
payload:<span style= "color: #FFFFFF">wwwwwwww</span><br> {param1, param2,..} | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | JSON object<br>Strings | Response payload specific to each operation ('Initiate' or 'Process') **Open table below to list payload parameters** |
<div style= "border-bottom: 3px solid #C0C0C0"></div> <div style="border-bottom: 8px solid #EBE8E4"></div>
<details style= "background-color: #EBE8E4"><summary style= "margin-left: 20px"><span style="font: 15px Arial; font-weight:bold"> Initiate API response payload:</span> <span style= "color: #2F7395"> (click to view)</span></summary>
<div style="border-bottom: 10px solid #EBE8E4"></div> <div style= "min-width: 530px; max-width: 800px; border: 1px solid #C0C0C0; margin: 13px">
Variable | Column Title | Type | Description |
action<span style= "color: #FFFFFF">wwwwwwwww</span> | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | ''initiate"<span style= "color: #FFFFFF">wwwwwwwwwwwwwwwwwwwwwwwnmwww</span> |
status | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Result of the action<br>**Open table below to list:**<br><details style= "background-color: #E2EAEC; border: 1px solid #A0A0A0; border-radius: 5px; max-width: 350px"><summary style= "margin-left: 10px"><span style="font: 15px Arial; font-weight:bold"> Possible status codes:</span></summary><div style="border-bottom: 5px solid #E2EAEC"></div><div style="position: relative; left: 10px">**_"success":_** Initiate successfully completed<br>**_"fail":_** Initiate failed</div><div style="border-bottom: 5px solid #E2EAEC"></div></details> |
</div> <div style="border-bottom: 30px solid #EBE8E4"></div> </details>
<div style="border-bottom: 8px solid #EBE8E4"></div> <div style="border-bottom: 3px solid #C0C0C0"></div>
<div style="border-bottom: 8px solid #FFFCD7"></div>
<details style= "background-color: #FFFCD7"><summary style= "margin-left: 20px"><span style="font: 15px Arial; font-weight:bold"> Process API response payload:</span> <span style= "color: #2F7395"> (click to view)</span></summary>
<div style="border-bottom: 10px solid #FFFCD7"></div> <div style= "min-width: 530px; max-width: 800px; border: 1px solid #C0C0C0; margin: 13px">
Variable | Column Title | Type | Description |
action | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | ''process" |
status | <span style="color:red; font: 17px Arial; font-weight:bold">*</span> | String | Result of the action<br>**Open table below to list:**<br><details style= "background-color: #E2EAEC; border: 1px solid #A0A0A0; border-radius: 5px;max-width: 350px"><summary style= "margin-left: 10px"><span style="font: 15px Arial; font-weight:bold"> Possible status codes:</span></summary><div style="border-bottom: 5px solid #E2EAEC"></div><div style="position: relative; left: 5px; max-width: 370px">**_"charged", "cod_initiated":_**<div style="position: relative; left: 20px; max-width: 310px">Transaction successfully completed (only when "**_error_**" is _false_ - "**_error_**" must be _true_ for all other _status_ indications) - call orderStatus once to verify (false positives) - process data (_"cod_initiated"_ means user opted for cash on delivery option displayed on payment page) </div>**_"backpressed":_**<div style="position: relative; left: 20px; max-width: 310px">User back-pressed from PP without without initiating transaction (/txn)</div>**_"user_aborted":_**<div style="position: relative; left: 20px; max-width: 310px">User initiated a Transaction (/txn) and pressed back - poll order status</div>**_"pending_vbv", "authorizing":_**<div style="position: relative; left: 20px; max-width: 310px">Transaction (/txn) in pending state - poll order status until backend says _fail_ or _success_</div>**_"authorization_failed", "authentication_failed", "api_failure":_**<div style="position: relative; left: 20px; max-width: 310px">Transaction (/txn) failed - poll order status to verify (false negatives)</div><span style= "color: red"> **_"juspay_declined":_**"<div style="position: relative; left: 20px; max-width: 310px">User input is not accepted by the underlying PG - poll order status to verify (false negatives) Error code found <a href= "https://developer.juspay.in/docs/transaction-status-codes-1#juspay_declined">here</a>.</div></span>**_"new":_**<div style="position: relative; left: 20px; max-width: 310px">Order created but transaction failed - very rare for V2 (signature based) - poll order status</div>**_" ":_**<div style="position: relative; left: 20px; max-width: 310px">(default) unknown status, this is also failure - poll order status</div><br><div style="position: relative; left: 5px; max-width: 330px"><span style="color:red">(See <a href= "https://developer.juspay.in/docs/transaction-status-codes-1">Status Codes</a> and <a href= "https://developer.juspay.in/docs/error-codes-2">Error Codes</a> for more details on status and error codes in responses to Process API calls.)</span></div><br></div></details> |
<span style="color:red"> paymentInstrument </span> | <span style="color: blue; font: 17px Arial; font-weight:bold">*</span> | <span style="color:red"> String</span> | <span style="color:red"> The payment instrument that was used within the selected payment instrument group<br>Example.: “NB_AXIS”or “NB_HDFC” for the "nb" group</span> |
<span style="color:red"> paymentInstrumentGroup</span> | <span style="color: blue; font: 17px Arial; font-weight:bold">*</span> | <span style="color:red"> String</span> | <span style="color:red"> The payment instrument group that was used<br>Example.: "nb", "card","wallet", etc. </span> |
</div> <div style= "margin-left: 18px"><span style= "color: blue; font: 18px Arial; font-weight: bold"> * </span> = </div><div style= "position: relative; top: -22px; left: 43px; max-width: 630px"><span style= "font: 14px Arial"> Conditional - included in the payload response for the <b>Process API</b> only if a payment instrument was used.</span></div> </details> <div style="border-bottom: 8px solid #FFFCD7"></div> <div style="border-bottom: 3px solid #C0C0C0"></div> <div style= "min-width: 530px; height: 55px; background-color: #FFFFFF; padding-left: 20px; padding-right: 10px; padding-top: 17px"><span style="color:red; font: 18px Arial; font-weight:bold">* </span><span style= "font: 14px Arial"> = Required</span><br></div> </div></div></div> <div style="border-bottom: 1px solid #FFFFFF"></div>
#### Sample output response for the '**Initiate**' API:
#### Sample output response for the '**Process**' API:
requestId - Juspay Reference
<span style="font: 15px Consolas; font-weight:bold">"requestId"</span> should be unique for all operations to HyperSDK. This <b>ID</b> allows for easier debugging and for querying responses required for integrations.