Process Payload
Payload for Process SDK
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. Find below the set of parameters which needs to be passed in the payload:
Variable | Description | Required | Default |
---|---|---|---|
action | Changes based on operation to be performed. Pass “paymentPage” to start the payment page interface. Pass “paymentManagement” to start the payment management interface Type: String | Yes | "paymentPage" |
merchantId | Identifies the merchant. Eg. “merchant”. Type: String | Yes | |
clientId | ClientId will be shared by Juspay team. Type: String | Yes | |
orderId | Unique identifier for the order. Should be Alphanumeric with character length less than 21. Note: Order ID at Juspay end is not case sensitive. We do not differentiate between upper and lower case values. Type: String | Yes | |
amount | Amount of the transaction. Type: String | Yes | |
customerId | 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 Type: String | Yes | |
customerEmail | Customer's email address. Type: String | Yes | |
customerMobile | Customer's phone number. Type: String | Yes | |
orderDetails | JSON stringified Order details. Refer JSON for orderDetails parameter for details Type: String | Yes | |
signature | 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. Type: String | Yes | |
merchantKeyId | Unique identifier for the Signature that will be provided after sharing the public key. Type: String | Yes | |
language | Pass the language value to localise payment experience in regional language. Accepted values are "english", "hindi", "telugu", "tamil", "bengali", "malayalam", "gujarati", "kannada", "marathi". | No | "English" |
guest_login_url | Provide URL where user should be redirected for login inorder to fetch saved payment methods. This feature is available only in Web payment page. Type: String | Conditional |
Sample Request
{
"requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
"service": "in.juspay.hyperpay",
"payload": {
"action": "paymentPage",
"merchantId": "idea_preprod",
"clientId": "idea",
"orderId": "R1096438018",
"amount": "1.00",
"customerId": "1234567890",
"customerEmail": "[email protected]",
"customerMobile": "9739534710",
"orderDetails": "{\"order_id\":\"R1096438018\",\"amount\":\"1.00\",\"customer_id\":\"1234567890\",\"merchant_id\":\"idea_preprod\",\"customer_email\":\"[email protected]\",\"customer_phone\":\"1234567890\",\"return_url\":\"https:\\/\\/sandbox.juspay.in\\/end\",\"timestamp\":\"1571922200845\"}",
"signature": "AZOn8jH8RPWSzrbZ0iiHSLjMdvnvDBkyKslgx4yDadtiQ49kqf8vFh7GMEC/aSARgfovwUOBoPPRTksV6IXNlwIBwuSLWeH7/dIBC+FdtgOR1UNhRGKM17xNg/A6iLufR880Pa31QT3JAWJtRPeQ3aGczsgsFc8NzbSNCQmV2w7ziSSUAwdpU8JWthkFc2oW23QTcMHXnk/EHXf9vAHUZS1x2vKMnrUE6JuTa8vNLlpAcsZ8ueGLvBuobx6lBltsyb8+DjWT+3+W4nt1xmH734g9aOkduLyQTvGIYDKCpnvWdR0J34SvgUnCnv5XzRm9+HQInZDSslJ+1q5hAe3PQQ==",
"merchantKeyId": "2980",
"language": "english"
}
}
JSON for orderDetails parameter
Variable | Description | Required | Default |
---|---|---|---|
order_id | Unique Identifier for the order. Should be Alphanumeric with character length less than 18. Type: String | Yes | |
merchant_id | Unique MerchantId shared during the on-boarding. Type: String | Yes | |
amount | 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. Type: String | Yes | |
timestamp | Epoch Unix timestamp in milliseconds. Type: String | Yes | |
customer_id | String that uniquely identifies the customer. It is the ID with which merchant refers to a customer object. Type: String | Yes | |
currency | ISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP. Type: String | No | "INR" |
gateway_id | 12 for PAYU, 18 for PAYTM Specify your preferred gateway for this order. Complete mapping for “gateway_id” can be found here: Gateway mapping Type: String | No | |
customer_email | Email address of the customer. If the backend gateway requires it, then you must send this value. Type: String | No | |
customer_phone | Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value. Type: String | No | |
description | Short description for the order. We send this information to the backend gateways whenever there is a provision for this. Type: String | No | |
return_url | 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. Note: Return URL must be a static URL, it should not return a 3XX status. Type: String | No | |
metadata.JUSPAY:gateway_reference_id | String that identifies the gateway for Merchant. This shall be passed only when the merchant uses a Multi-MID setup for each gateway (i.e) merchant has more than 1 MID linked with the same payment gateway. For multi MID setup of a Merchant, this parameter is mandatory Type: String | Conditional | |
options.create_mandate | Required to create a mandate transaction. Takes the value of REQUIRED, OPTIONAL Type: String | No | |
mandate.max_amount | Amount that can be set as maximum mandate Mandatory only if mandate.amount_rule = VARIABLE Type: String | Conditional | |
mandate.start_date | Mandate start date in UNIX EPOCH timestamp (UTC timezone). The start date has to be today’s date Type: String | Conditional Mandatory: only for UPI Mandates | |
mandate.end_date | 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 Type: String | Conditional Mandatory: only for UPI Mandates | |
mandate.frequency | Defines the frequency of mandate execution, how often a customer should be charged Type: String Values: ONETIME, DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, YEARLY, ASPRESENTED | No | ASPRESENTED |
mandate.rule_value | 1-7 when frequency is WEEKLY. In weekly, serial numbers start from Monday. Monday represents 1 and Sunday represents 7. 1-16 when frequency is FORTNIGHTLY. This mandate is executed twice a month. First day of the month is represented by value ‘1’ and ends with ‘15’ on 15th day of the month. Then again starts with ‘1’ for 16th of the month and ends with the last day of the month. 1-31 when frequency is MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY. Not required when frequency is ONETIME, DAILY, ASPRESENTED. For Razorpay, rule_value will be considered as the last date of the week/month/year. For Paytm, rule_value will be considered as today’s date/day | Conditional | |
mandate.amount_rule | Possible Values: FIXED, VARIABLE In case of FIXED amount_rule, amount will be equal to max amount Type: String | No | VARIABLE |
mandate.revokable_by_customer | Possible Values: TRUE, FALSE If false, the mandate cannot be revoked by the customer once set. It should be true for Recurring and true/false for ONETIME Type: Boolean | No | true |
mandate.block_funds | Possible Values: TRUE, FALSE Should be true for ONETIME and false for Recurring. Type: String | No | |
metadata.PAYTM_V2:SUBSCRIPTION_GRACE_DAYS | Applicable only for Paytm Number of days after renewal cycle start date for which merchant can send renewal request. Mandatory if subscriptionStartDate is sent in request. Conditional mandatory if SUBSCRIPTION_START_DATE is passed.If this is not passed renewal can be called after 24 hours (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) Type: String | Conditional | |
udf1 | Custom parameter Type: String | No | |
udf2 | Custom parameter Type: String | No | |
udf3 | Custom parameter Type: String | No | |
udf4 | Custom parameter Type: String | No | |
udf5 | Custom parameter Type: String | No | |
udf6 | Custom parameter Type: String | No | |
udf7 | Custom parameter Type: String | No | |
udf8 | Custom parameter Type: String | No | |
udf9 | Custom parameter Type: String | No | |
udf10 | Custom parameter Type: String | No |
Juspay supports 10 UDFs (UDF1 to UDF10). The values passed in UDFs are reflected back in the order status response and in webhooks back to the merchant.
If there are any special characters that need to be passed in UDF values, please use UDF 6 to 10 for passing the same. UDF 1 to 5 can be used to pass values which do not have any special characters. Also, do not pass boolean values such as True/False in UDF parameters.
Updated 4 months ago