@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationModel.d.ts +1742 -1726
  4. package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
  7. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  8. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  9. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  10. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  11. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
  12. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
  14. package/sdk/application/Content/ContentApplicationModel.js +757 -757
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  16. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  17. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  18. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  19. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
  21. package/sdk/application/Order/OrderApplicationModel.d.ts +852 -846
  22. package/sdk/application/Order/OrderApplicationModel.js +828 -822
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
  24. package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
  25. package/sdk/application/Payment/PaymentApplicationModel.d.ts +2176 -2145
  26. package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
  27. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
  28. package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
  29. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
  30. package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
  31. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  32. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  33. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  34. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  35. package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
  36. package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
  37. package/sdk/application/User/UserApplicationClient.d.ts +2 -2
  38. package/sdk/application/User/UserApplicationClient.js +4 -7
  39. package/sdk/application/User/UserApplicationModel.d.ts +769 -764
  40. package/sdk/application/User/UserApplicationModel.js +731 -741
  41. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
  44. package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
  46. package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
  47. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
  48. package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
  49. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
  50. package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
  51. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  52. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  53. package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
  54. package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
  55. package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
  56. package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
  57. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +26 -0
  58. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
  59. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
  60. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
  61. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
  62. package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
  63. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  64. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  65. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
  66. package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
  71. package/sdk/platform/Content/ContentPlatformModel.d.ts +1842 -1825
  72. package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
  73. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
  74. package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
  75. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
  76. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
  79. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
  81. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
  82. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
  83. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
  84. package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
  85. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  86. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  87. package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
  88. package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
  89. package/sdk/platform/Order/OrderPlatformModel.d.ts +5192 -5176
  90. package/sdk/platform/Order/OrderPlatformModel.js +4752 -4736
  91. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  92. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  93. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2693 -2657
  94. package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
  95. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  96. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  97. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
  98. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
  99. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
  100. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
  101. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
  102. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
  103. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
  104. package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
  105. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
  106. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
  107. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  108. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  109. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
  110. package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
  111. package/sdk/platform/User/UserPlatformModel.d.ts +823 -753
  112. package/sdk/platform/User/UserPlatformModel.js +731 -661
  113. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
  114. package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
  115. package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
  116. package/sdk/public/Billing/BillingPublicModel.js +51 -51
  117. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  118. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  119. package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
  120. package/sdk/public/Content/ContentPublicModel.js +28 -28
  121. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  122. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  123. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  124. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  125. package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
  126. package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
@@ -1,407 +1,417 @@
1
1
  const Joi = require("joi");
2
2
 
3
- /**
4
- * @typedef ActiveCardPaymentGatewayResponse
5
- * @property {CardPaymentGateway} cards
6
- * @property {string} message - Human readable message.
7
- * @property {boolean} success - Response is successful or not.
8
- */
9
-
10
- /**
11
- * @typedef AddBeneficiaryDetailsOTPRequest
12
- * @property {BankDetailsForOTP} details
13
- * @property {string} order_id
14
- */
15
-
16
- /**
17
- * @typedef AddBeneficiaryDetailsRequest
18
- * @property {boolean} delights - True if beneficiary to be added by delights or
19
- * False if by User
20
- * @property {BeneficiaryModeDetails} details
21
- * @property {string} order_id - Merchant Order Id
22
- * @property {string} [otp]
23
- * @property {string} [request_id]
24
- * @property {string} shipment_id - Shipment Id of the respective Merchant Order Id
25
- * @property {string} transfer_mode - Transfer Mode of the Beneficiary to be added
26
- */
27
-
28
- /**
29
- * @typedef AddBeneficiaryViaOtpVerificationRequest
30
- * @property {string} hash_key - Hash key of the beneficiary Id
31
- * @property {string} otp - Otp sent to the given Mobile No
32
- * @property {string} request_id - Request Id sent in
33
- */
34
-
35
- /**
36
- * @typedef AddBeneficiaryViaOtpVerificationResponse
37
- * @property {string} message - Aggregator Response of beneficicary
38
- * @property {boolean} [success] - Response is successful or not
39
- */
40
-
41
- /**
42
- * @typedef AdvanceObject
43
- * @property {string[]} [all_prepayment_type] - All available types of prepayment
44
- * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed?
45
- * @property {number} [amount] - Amount for Payment Breakdown
46
- * @property {string} [cancellation_type] - Type of cancellation
47
- * @property {string} [description] - The description for Advance Payment (user
48
- * configured)
49
- * @property {string} [display_name] - The display name for Advance payment
50
- * @property {boolean} [is_active] - Is Advance Payment active
51
- * @property {string} [prepayment_type] - Type of prepayment value
52
- * @property {number} [prepayment_value] - Value for prepayment in advance payment
53
- * @property {number} [refund_time_limit] - Time limit for processing refund
54
- * @property {string} [time_unit] - Time unit for refunds
55
- */
56
-
57
- /**
58
- * @typedef AdvancePaymentObject
59
- * @property {AdvanceObject} [advance]
60
- * @property {string} [display_name] - Display name for Advance Payment Mode
61
- * @property {number} [display_priority] - Display Priority for Payment Option
62
- * @property {PaymentModeList[]} [list] - Payment mode
63
- * @property {string} [name] - Name of Advance Payment Mode
64
- * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option
65
- * @property {SplitObject} [split]
66
- */
67
-
68
3
  /**
69
4
  * @typedef AggregatorConfigDetail
5
+ * @property {boolean} [sdk] - SDK
6
+ * @property {string} secret - Masked payment gateway api secret
70
7
  * @property {string} [api] - Payment gateway api endpoint
8
+ * @property {string} [pin] - Masked pin
71
9
  * @property {string} config_type - Fynd or self payment gateway
72
- * @property {string} key - Payment gateway api key
73
- * @property {string} [merchant_id] - Unique merchant id
74
10
  * @property {string} [merchant_key] - Unique merchant key
75
- * @property {string} [pin] - Masked pin
76
- * @property {boolean} [sdk] - SDK
77
- * @property {string} secret - Masked payment gateway api secret
78
- * @property {string} [user_id] - Registered User id
79
11
  * @property {string} [verify_api] - Payment gateway verify payment api endpoint
80
- */
81
-
82
- /**
83
- * @typedef AggregatorRoute
84
- * @property {string} [api_link] - Api_link
85
- * @property {Object} [data] - Data
86
- * @property {string} [payment_flow] - Payment_flow
87
- * @property {string} [payment_flow_data] - Payment_flow_data
12
+ * @property {string} key - Payment gateway api key
13
+ * @property {string} [user_id] - Registered User id
14
+ * @property {string} [merchant_id] - Unique merchant id
88
15
  */
89
16
 
90
17
  /**
91
18
  * @typedef AggregatorsConfigDetailResponse
92
- * @property {AggregatorConfigDetail} [ccavenue]
93
- * @property {string} env - Environment i.e Live or Test
19
+ * @property {boolean} success
20
+ * @property {AggregatorConfigDetail} [razorpay]
94
21
  * @property {AggregatorConfigDetail} [juspay]
95
- * @property {AggregatorConfigDetail} [mswipe]
22
+ * @property {AggregatorConfigDetail} [simpl]
96
23
  * @property {AggregatorConfigDetail} [payumoney]
97
- * @property {AggregatorConfigDetail} [razorpay]
98
24
  * @property {AggregatorConfigDetail} [rupifi]
99
- * @property {AggregatorConfigDetail} [simpl]
25
+ * @property {AggregatorConfigDetail} [mswipe]
100
26
  * @property {AggregatorConfigDetail} [stripe]
101
- * @property {boolean} success
102
- */
103
-
104
- /**
105
- * @typedef AttachCardRequest
106
- * @property {string} card_id - Card token of payment gateway.
107
- * @property {string} [name_on_card]
108
- * @property {string} [nickname]
109
- * @property {boolean} [refresh] - Refresh cache flag.
110
- */
111
-
112
- /**
113
- * @typedef AttachCardsResponse
114
- * @property {Object} data - List of cards of customer.
115
- * @property {string} [message] - Human readable message.
116
- * @property {boolean} success - Response is successful or not.
27
+ * @property {AggregatorConfigDetail} [ccavenue]
28
+ * @property {string} env - Environment i.e Live or Test
117
29
  */
118
30
 
119
31
  /**
120
- * @typedef BalanceDetails
121
- * @property {string} [currency] - Currency Code
122
- * @property {string} [formatted_value] - Formated Amount with currency symbol
123
- * @property {number} [value] - Payment amount
32
+ * @typedef ErrorCodeAndDescription
33
+ * @property {string} code - Error descrption code.
34
+ * @property {string} description - Error human understandable description.
124
35
  */
125
36
 
126
37
  /**
127
- * @typedef BankDetailsForOTP
128
- * @property {string} account_holder
129
- * @property {string} account_no
130
- * @property {string} bank_name
131
- * @property {string} branch_name
132
- * @property {string} ifsc_code
38
+ * @typedef HttpErrorCodeAndResponse
39
+ * @property {ErrorCodeAndDescription} [error]
40
+ * @property {boolean} success - Response is successful or not
133
41
  */
134
42
 
135
43
  /**
136
- * @typedef BeneficiaryModeDetails
137
- * @property {string} account_holder - Name of the Account Holder
138
- * @property {string} account_no - Account NUmber of the Account Holder
139
- * @property {string} [address] - Address of the User
140
- * @property {string} bank_name - Bank Name of the Account
141
- * @property {string} branch_name - Branch Name of the Account
142
- * @property {string} [comment] - Remarks added by The user
143
- * @property {string} email - Email of the Account Holder
144
- * @property {string} ifsc_code - Ifsc Code of the Account
145
- * @property {string} mobile - Moblie Number of the User
146
- * @property {string} [vpa]
147
- * @property {string} [wallet]
44
+ * @typedef AttachCardRequest
45
+ * @property {string} [nickname]
46
+ * @property {boolean} [refresh] - Refresh cache flag.
47
+ * @property {string} card_id - Card token of payment gateway.
48
+ * @property {string} [name_on_card]
148
49
  */
149
50
 
150
51
  /**
151
- * @typedef BusinessDetails
152
- * @property {KYCAddress} [address]
153
- * @property {string} [business_ownership_type] - Business Ownershipp type(e.g Rented)
154
- * @property {string} [business_type] - Business Type
155
- * @property {string} [entity_type] - Busineess Entity Type
156
- * @property {string} [fda] - Driver License
157
- * @property {string} [fssai] - FDA License Number
158
- * @property {string} [gstin] - GSTIN Number
159
- * @property {string} [name] - Business Name
160
- * @property {string} [pan] - Pan Number
161
- * @property {Object} [shop_and_establishment] - Shop Establishment
162
- * @property {string} [vintage] - Vintage
52
+ * @typedef AttachCardsResponse
53
+ * @property {Object} data - List of cards of customer.
54
+ * @property {boolean} success - Response is successful or not.
55
+ * @property {string} [message] - Human readable message.
163
56
  */
164
57
 
165
58
  /**
166
- * @typedef CancelOrResendPaymentLinkRequest
167
- * @property {string} payment_link_id - Unique id of payment link
59
+ * @typedef CardPaymentGateway
60
+ * @property {string} [api] - Payment gateway CARD api endpoint
61
+ * @property {string} aggregator - Payment gateway name.
62
+ * @property {string} [customer_id] - Payment gateway customer id.
168
63
  */
169
64
 
170
65
  /**
171
- * @typedef CancelPaymentLinkResponse
172
- * @property {string} message - Message
173
- * @property {number} status_code - HTTP status code
174
- * @property {boolean} success - Successful or failure
66
+ * @typedef ActiveCardPaymentGatewayResponse
67
+ * @property {CardPaymentGateway} cards
68
+ * @property {boolean} success - Response is successful or not.
69
+ * @property {string} message - Human readable message.
175
70
  */
176
71
 
177
72
  /**
178
73
  * @typedef Card
179
- * @property {string} aggregator_name - Aggregator_name
180
- * @property {string} [card_brand] - Card_brand
181
- * @property {string} [card_brand_image] - Card_brand_image
182
- * @property {string} [card_fingerprint] - Card_fingerprint
183
- * @property {string} [card_id] - Card_id
184
- * @property {string} [card_isin] - Card_isin
185
- * @property {string} [card_issuer] - Card_issuer
186
- * @property {string} [card_name] - Card_name
187
74
  * @property {string} [card_number] - Card_number
188
- * @property {string} [card_reference] - Card_reference
189
- * @property {string} [card_token] - Card_token
75
+ * @property {string} [card_name] - Card_name
190
76
  * @property {string} [card_type] - Card_type
77
+ * @property {string} [card_brand_image] - Card_brand_image
78
+ * @property {string} [card_reference] - Card_reference
79
+ * @property {string} [card_issuer] - Card_issuer
80
+ * @property {string} [card_brand] - Card_brand
81
+ * @property {boolean} [expired] - Expired
191
82
  * @property {boolean} [compliant_with_tokenisation_guidelines] - If card is
192
83
  * tokenised or not
193
- * @property {number} [exp_month] - Exp_month
84
+ * @property {string} [card_isin] - Card_isin
194
85
  * @property {number} [exp_year] - Exp_year
195
- * @property {boolean} [expired] - Expired
196
86
  * @property {string} [nickname] - Nickname
87
+ * @property {string} aggregator_name - Aggregator_name
88
+ * @property {string} [card_fingerprint] - Card_fingerprint
89
+ * @property {string} [card_token] - Card_token
90
+ * @property {number} [exp_month] - Exp_month
91
+ * @property {string} [card_id] - Card_id
197
92
  */
198
93
 
199
94
  /**
200
- * @typedef CardDetails
201
- * @property {string} bank - Bank name
202
- * @property {string} bank_code - Bank Code
203
- * @property {string} card_brand - Card brand like VISA/RUPAY
204
- * @property {string} [card_exp_month] - Card Expire Month
205
- * @property {string} [card_exp_year] - Card Expire Year
206
- * @property {string} card_object - Card bin or Card refrence
207
- * @property {string} card_sub_type - Card Sub type
208
- * @property {string} [card_token] - Card Token
209
- * @property {string} country - Country Name
210
- * @property {string} extended_card_type - Extended Card Type
211
- * @property {string} id - Id
212
- * @property {boolean} is_domestic_card - Is card domestic or international
213
- * @property {string} [name_on_card] - Name on Card
214
- * @property {boolean} status - Status
215
- * @property {string} type - Card Type Credit/Debit
216
- * @property {string} [user] - Customer/User ID
95
+ * @typedef ListCardsResponse
96
+ * @property {Card[]} [data] - List of cards of customer.
97
+ * @property {boolean} success - Response is successful or not.
98
+ * @property {string} message - Human readable message.
217
99
  */
218
100
 
219
101
  /**
220
- * @typedef CardDetailsResponse
221
- * @property {CardDetails} data
102
+ * @typedef DeletehCardRequest
103
+ * @property {string} card_id - Card token of payment gateway.
104
+ */
105
+
106
+ /**
107
+ * @typedef DeleteCardsResponse
222
108
  * @property {boolean} success - Response is successful or not.
109
+ * @property {string} [message] - Human readable message.
223
110
  */
224
111
 
225
112
  /**
226
- * @typedef CardPaymentGateway
227
- * @property {string} aggregator - Payment gateway name.
228
- * @property {string} [api] - Payment gateway CARD api endpoint
229
- * @property {string} [customer_id] - Payment gateway customer id.
113
+ * @typedef ValidateCustomerRequest
114
+ * @property {string} aggregator - Payment gateway name in camel case i.e Simpl, Rupifi
115
+ * @property {number} transaction_amount_in_paise - Payable amount in paise
116
+ * @property {string} phone_number - User mobile number without country code.
117
+ * @property {Object} [billing_address] - Extra meta fields.
118
+ * @property {Object[]} [order_items] - Extra meta fields.
119
+ * @property {string} [payload] - Hashed payload string.
120
+ * @property {Object} [merchant_params] - Extra meta fields.
121
+ * @property {Object} [delivery_address] - Extra meta fields.
122
+ */
123
+
124
+ /**
125
+ * @typedef ValidateCustomerResponse
126
+ * @property {Object} data - Payment gateway response data
127
+ * @property {boolean} success - Response is successful or not
128
+ * @property {string} message - Error or success message.
230
129
  */
231
130
 
232
131
  /**
233
132
  * @typedef ChargeCustomerRequest
133
+ * @property {boolean} [verified] - Already Verified flag from payment gateway i.e Mswipe
234
134
  * @property {string} aggregator - Payment gateway name i.e Simpl, Mswipe
235
- * @property {number} amount - Chargable amount of order.
236
135
  * @property {string} order_id - Unique order id.
237
136
  * @property {string} [transaction_token] - Transaction token of payment gateway.
238
- * @property {boolean} [verified] - Already Verified flag from payment gateway i.e Mswipe
137
+ * @property {number} amount - Chargable amount of order.
239
138
  */
240
139
 
241
140
  /**
242
141
  * @typedef ChargeCustomerResponse
243
- * @property {string} aggregator - Payment gateway name i.e Simpl, Mswipe
142
+ * @property {string} status - Status of charged payment.
244
143
  * @property {string} [cart_id] - Cart id of customer
245
- * @property {string} [delivery_address_id] - Delivery adddress id of customer
144
+ * @property {boolean} success - Response is successful or not.
145
+ * @property {string} aggregator - Payment gateway name i.e Simpl, Mswipe
246
146
  * @property {string} message - Human readable message.
247
147
  * @property {string} order_id - Unique order id.
248
- * @property {string} status - Status of charged payment.
148
+ * @property {string} [delivery_address_id] - Delivery adddress id of customer
149
+ */
150
+
151
+ /**
152
+ * @typedef PaymentInitializationRequest
153
+ * @property {string} [razorpay_payment_id] - Payment gateway payment id
154
+ * @property {string} method - Payment method
155
+ * @property {string} [device_id] - EDC machine Unique Identifier
156
+ * @property {string} aggregator - Payment gateway name
157
+ * @property {string} customer_id - Payment gateway customer id.
158
+ * @property {string} contact - Customer valid mobile number
159
+ * @property {string} merchant_order_id - Unique fynd order id
160
+ * @property {string} [vpa] - Customer vpa address
161
+ * @property {string} order_id - Payment gateway order id
162
+ * @property {string} currency - Currency code.
163
+ * @property {number} [timeout] - Payment polling timeout if not recieved response
164
+ * @property {number} amount - Payable amount.
165
+ * @property {string} email - Customer valid email
166
+ */
167
+
168
+ /**
169
+ * @typedef PaymentInitializationResponse
170
+ * @property {string} [status] - Status of payment.
171
+ * @property {string} [razorpay_payment_id] - Payment id.
172
+ * @property {string} [aggregator_order_id] - Payment order id
173
+ * @property {string} method - Payment method
249
174
  * @property {boolean} success - Response is successful or not.
175
+ * @property {string} [upi_poll_url] - UPI poll url.
176
+ * @property {string} [virtual_id] - Payment virtual address.
177
+ * @property {string} [device_id] - EDC machine Unique Identifier
178
+ * @property {string} polling_url - Polling url.
179
+ * @property {string} aggregator - Payment gateway name
180
+ * @property {string} merchant_order_id - Order id
181
+ * @property {string} [customer_id] - Payment gateway customer id.
182
+ * @property {string} [vpa] - Customer vpa address
183
+ * @property {string} [currency] - Currency code.
184
+ * @property {number} [timeout] - Timeout.
185
+ * @property {number} [amount] - Payable amount.
186
+ * @property {string} [bqr_image] - Bharath qr image url.
250
187
  */
251
188
 
252
189
  /**
253
- * @typedef CheckCreditResponse
254
- * @property {CreditDetail} data
255
- * @property {boolean} success - Operation is successful or not.
190
+ * @typedef PaymentStatusUpdateRequest
191
+ * @property {string} status - Status of payment.
192
+ * @property {string} merchant_transaction_id - Unique fynd transaction id
193
+ * @property {string} method - Payment method
194
+ * @property {string} [device_id] - EDC machine Unique Identifier
195
+ * @property {string} aggregator - Payment gateway name
196
+ * @property {string} customer_id - Payment gateway customer id.
197
+ * @property {string} contact - Customer valid mobile number
198
+ * @property {string} merchant_order_id - Unique fynd order id
199
+ * @property {string} [vpa] - Customer vpa address
200
+ * @property {string} order_id - Payment gateway order id
201
+ * @property {string} currency - Currency code.
202
+ * @property {number} amount - Payable amount.
203
+ * @property {string} email - Customer valid email
256
204
  */
257
205
 
258
206
  /**
259
- * @typedef CreateOrderUserData
260
- * @property {string} [aggregator] - Aggregator name
261
- * @property {number} [amount] - Amount
262
- * @property {string} [callback_url] - Callback url for aggregator
263
- * @property {string} [contact] - Mobile number
264
- * @property {string} [currency] - Currency
265
- * @property {string} [customer_id] - Aggregator customer id
266
- * @property {string} [email] - Email
267
- * @property {string} [merchant_order_id] - Merchant order id
268
- * @property {string} [method] - Method
269
- * @property {string} [order_id] - Aggregator order id
207
+ * @typedef PaymentStatusUpdateResponse
208
+ * @property {string} status - Payment status
209
+ * @property {boolean} [success] - Response is successful or not
210
+ * @property {boolean} retry - Response is successful or not.
211
+ * @property {string} [redirect_url] - Redirect url
212
+ * @property {string} aggregator_name - Payment gateway name
270
213
  */
271
214
 
272
215
  /**
273
- * @typedef CreateOrderUserPaymentMethods
274
- * @property {PaymentMethodsMeta} meta
275
- * @property {string} mode - Payment mode
216
+ * @typedef IntentAppErrorList
217
+ * @property {string} [code] - Code
218
+ * @property {string} [package_name] - Package_name
219
+ */
220
+
221
+ /**
222
+ * @typedef PaymentModeLogo
223
+ * @property {string} large - Large
224
+ * @property {string} small - Smalll
225
+ */
226
+
227
+ /**
228
+ * @typedef IntentApp
229
+ * @property {string} [code] - Code
230
+ * @property {string} [package_name] - Package_name
231
+ * @property {PaymentModeLogo} [logos]
232
+ * @property {string} [display_name] - Display_name
233
+ */
234
+
235
+ /**
236
+ * @typedef PaymentModeList
237
+ * @property {string} [card_number] - Card_number
238
+ * @property {string} [merchant_code] - Merchant code
239
+ * @property {string} [card_reference] - Card_reference
240
+ * @property {string} [card_issuer] - Card_issuer
241
+ * @property {boolean} [compliant_with_tokenisation_guidelines] - If card is
242
+ * tokenised or not
243
+ * @property {string} [code] - Code
244
+ * @property {number} [cod_limit] - Cod limit
245
+ * @property {boolean} [intent_flow] - Intent_flow
246
+ * @property {string} [fynd_vpa] - Fynd_vpa
247
+ * @property {IntentAppErrorList[]} [intent_app_error_dict_list] -
248
+ * Intent_app_error_dict_list
249
+ * @property {string} aggregator_name - Aggregator_name
250
+ * @property {string} [card_fingerprint] - Card_fingerprint
251
+ * @property {string[]} [intent_app_error_list] - Intent_app_error_list
252
+ * @property {IntentApp[]} [intent_app] - Intent_app
253
+ * @property {boolean} [expired] - Expired
254
+ * @property {number} [retry_count] - Retry_count
255
+ * @property {number} [exp_year] - Exp_year
256
+ * @property {number} [exp_month] - Exp_month
257
+ * @property {string} [card_id] - Card_id
258
+ * @property {number} [remaining_limit] - Remaining limit
259
+ * @property {number} [display_priority] - Dispaly Priority
260
+ * @property {string} [card_brand] - Card_brand
261
+ * @property {number} [cod_limit_per_order] - Cod limit per order
262
+ * @property {PaymentModeLogo} [logo_url]
263
+ * @property {string} [nickname] - Nickname
264
+ * @property {string} [card_name] - Card_name
265
+ * @property {string} [card_type] - Card_type
266
+ * @property {string} [card_brand_image] - Card_brand_image
267
+ * @property {string} [display_name] - Display name
268
+ * @property {string} [card_isin] - Card_isin
269
+ * @property {number} [timeout] - Timeout
270
+ * @property {string} [card_token] - Card_token
271
+ * @property {string} [name] - Name
272
+ * @property {Object} [meta] - Payment methods meta
273
+ */
274
+
275
+ /**
276
+ * @typedef RootPaymentMode
277
+ * @property {boolean} [is_pay_by_card_pl] - This flag will be true in case of
278
+ * Payment link payment through card
279
+ * @property {boolean} [add_card_enabled] - Annonymous card flag
280
+ * @property {number} display_priority - Dispaly Priority
281
+ * @property {string} display_name - Payment mode display name
282
+ * @property {PaymentModeList[]} [list] - Payment mode
283
+ * @property {boolean} [save_card] - Card save or not
284
+ * @property {string} [aggregator_name] - Dispaly Priority
276
285
  * @property {string} name - Payment mode name
286
+ * @property {boolean} [anonymous_enable] - Annonymous card flag
277
287
  */
278
288
 
279
289
  /**
280
- * @typedef CreateOrderUserRequest
281
- * @property {string} currency - Currency
282
- * @property {string} failure_callback_url - Failure page url
283
- * @property {Object} [meta] - Meta
284
- * @property {string} payment_link_id - Unique id of payment link
285
- * @property {CreateOrderUserPaymentMethods} payment_methods
286
- * @property {string} success_callback_url - Success page url
290
+ * @typedef AggregatorRoute
291
+ * @property {Object} [data] - Data
292
+ * @property {string} [payment_flow_data] - Payment_flow_data
293
+ * @property {string} [payment_flow] - Payment_flow
294
+ * @property {string} [api_link] - Api_link
287
295
  */
288
296
 
289
297
  /**
290
- * @typedef CreateOrderUserResponse
291
- * @property {string} [callback_url] - Callback url for aggregator
292
- * @property {CreateOrderUserData} [data]
293
- * @property {string} message - Message
294
- * @property {string} [order_id] - Merchant order id
295
- * @property {string} [payment_confirm_url] - Payment confirm url for aggregator
296
- * @property {number} status_code - HTTP status code
297
- * @property {boolean} success - Successful or failure
298
+ * @typedef PaymentDefaultSelection
299
+ * @property {string} [mode] - Default Selection Payment Mode
300
+ * @property {string} [identifier] - Identifier for Payment Mode
301
+ * @property {boolean} [skip] - Decide if the default payment mode will skip the
302
+ * payment options page altogether or just be preferred on the Frontend
298
303
  */
299
304
 
300
305
  /**
301
- * @typedef CreatePaymentLinkMeta
302
- * @property {string} amount
303
- * @property {string} [assign_card_id]
304
- * @property {string} cart_id
305
- * @property {string} checkout_mode
306
+ * @typedef PaymentFlow
307
+ * @property {AggregatorRoute} [bqr_razorpay]
308
+ * @property {AggregatorRoute} [fynd]
309
+ * @property {AggregatorRoute} [epaylater]
310
+ * @property {AggregatorRoute} [razorpay]
311
+ * @property {AggregatorRoute} [juspay]
312
+ * @property {AggregatorRoute} [ajiodhan]
313
+ * @property {AggregatorRoute} [simpl]
314
+ * @property {AggregatorRoute} [rupifi]
315
+ * @property {AggregatorRoute} [mswipe]
316
+ * @property {AggregatorRoute} [stripe]
317
+ * @property {AggregatorRoute} [ccavenue]
318
+ * @property {AggregatorRoute} [payubiz]
319
+ * @property {AggregatorRoute} [jiopay]
320
+ * @property {AggregatorRoute} [upi_razorpay]
306
321
  */
307
322
 
308
323
  /**
309
- * @typedef CreatePaymentLinkRequest
310
- * @property {number} amount - Total value of order
311
- * @property {string} [description] - Merchant order id
312
- * @property {string} email - Email to which the payment link is to be sent
313
- * @property {string} external_order_id - Merchant order id
314
- * @property {CreatePaymentLinkMeta} meta
315
- * @property {string} mobile_number - Mobile number to which the payment link is
316
- * to be sent
324
+ * @typedef PaymentOptionAndFlow
325
+ * @property {RootPaymentMode} payment_option
326
+ * @property {PaymentFlow} payment_flows
327
+ * @property {PaymentDefaultSelection} [payment_default_selection]
317
328
  */
318
329
 
319
330
  /**
320
- * @typedef CreatePaymentLinkResponse
321
- * @property {string} message - Message
322
- * @property {string} [payment_link_id] - Unique id of payment link
323
- * @property {string} [payment_link_url] - Url of payment link
324
- * @property {number} [polling_timeout] - Polling request timeout
325
- * @property {number} status_code - HTTP status code
326
- * @property {boolean} success - Successful or failure
331
+ * @typedef AdvanceObject
332
+ * @property {boolean} [is_active] - Is Advance Payment active
333
+ * @property {number} [amount] - Amount for Payment Breakdown
334
+ * @property {string} [time_unit] - Time unit for refunds
335
+ * @property {string} [description] - The description for Advance Payment (user
336
+ * configured)
337
+ * @property {string} [display_name] - The display name for Advance payment
338
+ * @property {string} [prepayment_type] - Type of prepayment value
339
+ * @property {number} [prepayment_value] - Value for prepayment in advance payment
340
+ * @property {string} [cancellation_type] - Type of cancellation
341
+ * @property {number} [refund_time_limit] - Time limit for processing refund
342
+ * @property {string[]} [all_prepayment_type] - All available types of prepayment
343
+ * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed?
327
344
  */
328
345
 
329
346
  /**
330
- * @typedef CreditDetail
331
- * @property {boolean} is_registered - User is registered with aggregator or not.
332
- * @property {string} signup_url - URL to which the user may redirect.
333
- * @property {boolean} status - Operation is successful or not.
347
+ * @typedef SplitObject
348
+ * @property {number} [total_number_of_splits] - Maximum amount of splits allowed
349
+ * @property {number} [splits_remaining] - Number of splits remaining
350
+ * @property {number} [amount_remaining] - Amount pending to be paid
334
351
  */
335
352
 
336
353
  /**
337
- * @typedef CreditSummary
338
- * @property {string} [activation_url] - Url for activation
339
- * @property {BalanceDetails} [amount_available]
340
- * @property {BalanceDetails} [balance]
341
- * @property {string} [buyer_status] - Status from Credit aggregator's end
342
- * @property {string} [credit_line_id] - ID at Credit aggregator's end
343
- * @property {BalanceDetails} [due_amount]
344
- * @property {string} [due_date] - Due date for repayment
345
- * @property {boolean} [is_eligible_for_txn] - Eligiblity flag to complete transaction
346
- * @property {BalanceDetails} [limit]
347
- * @property {string} [merchant_customer_ref_id] - Unique aggregator customer id
348
- * @property {string} [repayment_url] - Url for repayment
349
- * @property {string} [soa_url] - Statement of accounts. Show payment history.
350
- * @property {string} [status] - Customer Credit status
351
- * @property {string} [status_message] - Message to customer
352
- * @property {BalanceDetails} [total_due_amount]
354
+ * @typedef AdvancePaymentObject
355
+ * @property {string} [name] - Name of Advance Payment Mode
356
+ * @property {number} [display_priority] - Display Priority for Payment Option
357
+ * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option
358
+ * @property {string} [display_name] - Display name for Advance Payment Mode
359
+ * @property {PaymentModeList[]} [list] - Payment mode
360
+ * @property {SplitObject} [split]
361
+ * @property {AdvanceObject} [advance]
353
362
  */
354
363
 
355
364
  /**
356
- * @typedef CustomerCreditSummaryResponse
357
- * @property {CreditSummary} [data]
358
- * @property {boolean} success - Payment confirmation updated or not.
365
+ * @typedef PaymentModeRouteResponse
366
+ * @property {PaymentOptionAndFlow} payment_options
367
+ * @property {boolean} success - Response is successful or not
368
+ * @property {Object} [payment_breakup] - Payment Breakup for advance payment
369
+ * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array
359
370
  */
360
371
 
361
372
  /**
362
- * @typedef CustomerOnboardingRequest
373
+ * @typedef WalletLinkRequestSchema
363
374
  * @property {string} aggregator - Aggregator Name
364
- * @property {BusinessDetails} [business_info]
365
- * @property {DeviceDetails} [device]
366
- * @property {MarketplaceInfo} [marketplace_info]
367
- * @property {string} [mcc] - Mcc
368
- * @property {UserPersonalInfoInDetails} [personal_info]
369
- * @property {string} source - CallbackURL
375
+ * @property {string} mobile - Mobile Number for Wallet
376
+ * @property {string} wallet_code - Wallet Code
370
377
  */
371
378
 
372
379
  /**
373
- * @typedef CustomerOnboardingResponse
374
- * @property {OnboardSummary} data
375
- * @property {boolean} success - Status updated or not.
380
+ * @typedef WalletVerifyRequestSchema
381
+ * @property {string} aggregator - Aggregator Name
382
+ * @property {string} link_token - Token for wallet linking
383
+ * @property {number} otp - OTP received for wallet linking
376
384
  */
377
385
 
378
386
  /**
379
- * @typedef DeleteCardsResponse
380
- * @property {string} [message] - Human readable message.
381
- * @property {boolean} success - Response is successful or not.
387
+ * @typedef WalletDelinkRequestSchema
388
+ * @property {string} aggregator - Aggregator Name
389
+ * @property {string} wallet_code - Wallet Code
382
390
  */
383
391
 
384
392
  /**
385
- * @typedef DeletehCardRequest
386
- * @property {string} card_id - Card token of payment gateway.
393
+ * @typedef WalletResponseSchema
394
+ * @property {Object} data - Response received from aggregator
395
+ * @property {boolean} success - Success/Failure of the API call
387
396
  */
388
397
 
389
398
  /**
390
- * @typedef DeviceDetails
391
- * @property {string} [device_make] - Device maker
392
- * @property {string} [device_model] - Device Model
393
- * @property {string} [device_type] - Device Type(E.g. Mobile)
394
- * @property {string} [identification_number] - IP
395
- * @property {string} [identifier_type] - Static value = ip
396
- * @property {string} [os] - OS Name
397
- * @property {string} [os_version] - OS Version
399
+ * @typedef RupifiBannerData
400
+ * @property {string} [status] - Rupifi KYC status
401
+ * @property {string} [kyc_url] - Rupifi KYC banner url.
402
+ */
403
+
404
+ /**
405
+ * @typedef RupifiBannerResponse
406
+ * @property {RupifiBannerData} data
407
+ * @property {boolean} success - Successful or not.
398
408
  */
399
409
 
400
410
  /**
401
411
  * @typedef EpaylaterBannerData
402
- * @property {boolean} display - Need to display banner or not
403
- * @property {string} [message] - EPayLater message
404
412
  * @property {string} [status] - Epaylater KYC status
413
+ * @property {string} [message] - EPayLater message
414
+ * @property {boolean} display - Need to display banner or not
405
415
  */
406
416
 
407
417
  /**
@@ -411,734 +421,661 @@ const Joi = require("joi");
411
421
  */
412
422
 
413
423
  /**
414
- * @typedef ErrorCodeAndDescription
415
- * @property {string} code - Error descrption code.
416
- * @property {string} description - Error human understandable description.
424
+ * @typedef ResendOrCancelPaymentRequest
425
+ * @property {string} order_id - Unique order id
426
+ * @property {string} [device_id] - EDC machine Unique Identifier
427
+ * @property {string} request_type - Either resend or cancel
417
428
  */
418
429
 
419
430
  /**
420
- * @typedef ErrorCodeDescription
421
- * @property {string} code - Error descrption code.
422
- * @property {string} description - Error human understandable description.
423
- * @property {boolean} success - Response is successful or not
431
+ * @typedef LinkStatus
432
+ * @property {boolean} status - Link action status
433
+ * @property {string} message - Message
424
434
  */
425
435
 
426
436
  /**
427
- * @typedef ErrorDescription
428
- * @property {number} [amount] - Amount paid
429
- * @property {boolean} [cancelled] - Payment link is cancelled or not
430
- * @property {boolean} [expired] - Payment link expired or not
431
- * @property {boolean} [invalid_id] - Payment link id is valid or not
432
- * @property {string} [merchant_name] - Name of merchant that created payment link
433
- * @property {string} [merchant_order_id] - Order id
434
- * @property {string} [msg] - Message
435
- * @property {string} [payment_transaction_id] - Payment transaction id
437
+ * @typedef ResendOrCancelPaymentResponse
438
+ * @property {LinkStatus} data
439
+ * @property {boolean} success - Response is successful or not.
436
440
  */
437
441
 
438
442
  /**
439
- * @typedef ErrorResponse
440
- * @property {ErrorDescription} [error]
441
- * @property {string} message - Message
442
- * @property {number} status_code - HTTP status code
443
- * @property {boolean} success - Successful or failure
443
+ * @typedef renderHTMLRequest
444
+ * @property {string} [returntype] - Return Type of API
445
+ * @property {string} base64_html - Base64 encoded html string
444
446
  */
445
447
 
446
448
  /**
447
- * @typedef GetPaymentLinkResponse
448
- * @property {number} [amount] - Total value of order
449
- * @property {string} [external_order_id] - Merchant order id
450
- * @property {string} [merchant_name] - Merchant name
451
- * @property {string} message - Message
452
- * @property {string} [payment_link_current_status] - Status of payment link
453
- * @property {string} [payment_link_url] - Url of payment link
454
- * @property {number} [polling_timeout] - Polling request timeout
455
- * @property {number} status_code - HTTP status code
456
- * @property {boolean} success - Successful or failure
449
+ * @typedef renderHTMLResponse
450
+ * @property {string} html - HTML string
457
451
  */
458
452
 
459
453
  /**
460
- * @typedef HttpErrorCodeAndResponse
461
- * @property {ErrorCodeAndDescription} [error]
462
- * @property {boolean} success - Response is successful or not
454
+ * @typedef ValidateVPARequest
455
+ * @property {string} upi_vpa - UPI ID
456
+ * @property {string} [aggregator] - Aggregator slug
463
457
  */
464
458
 
465
459
  /**
466
- * @typedef IfscCodeResponse
467
- * @property {string} bank_name - Bank Name Of Account
468
- * @property {string} branch_name - Branch Name Of Account
469
- * @property {boolean} [success] - Response is successful or not
460
+ * @typedef ValidateUPI
461
+ * @property {string} status - VALID or INVALID
462
+ * @property {string} customer_name - Customer Bank
463
+ * @property {boolean} is_valid - Boolean is true or false.
464
+ * @property {string} upi_vpa - UPI ID
470
465
  */
471
466
 
472
467
  /**
473
- * @typedef IntentApp
474
- * @property {string} [code] - Code
475
- * @property {string} [display_name] - Display_name
476
- * @property {PaymentModeLogo} [logos]
477
- * @property {string} [package_name] - Package_name
468
+ * @typedef ValidateVPAResponse
469
+ * @property {ValidateUPI} data
470
+ * @property {boolean} success - Response is successful or not.
478
471
  */
479
472
 
480
473
  /**
481
- * @typedef IntentAppErrorList
482
- * @property {string} [code] - Code
483
- * @property {string} [package_name] - Package_name
474
+ * @typedef CardDetails
475
+ * @property {boolean} status - Status
476
+ * @property {string} country - Country Name
477
+ * @property {string} bank_code - Bank Code
478
+ * @property {string} id - Id
479
+ * @property {string} [card_exp_year] - Card Expire Year
480
+ * @property {string} card_brand - Card brand like VISA/RUPAY
481
+ * @property {string} type - Card Type Credit/Debit
482
+ * @property {string} card_sub_type - Card Sub type
483
+ * @property {boolean} is_domestic_card - Is card domestic or international
484
+ * @property {string} [name_on_card] - Name on Card
485
+ * @property {string} [card_exp_month] - Card Expire Month
486
+ * @property {string} extended_card_type - Extended Card Type
487
+ * @property {string} card_object - Card bin or Card refrence
488
+ * @property {string} [card_token] - Card Token
489
+ * @property {string} [user] - Customer/User ID
490
+ * @property {string} bank - Bank name
484
491
  */
485
492
 
486
493
  /**
487
- * @typedef KYCAddress
488
- * @property {string} addressline1 - Address Line 1
489
- * @property {string} [addressline2] - Address Line 2
490
- * @property {string} city - City
491
- * @property {string} [land_mark] - Land Mark
492
- * @property {string} [ownership_type] - Address Owner Type
493
- * @property {string} pincode - Pincode
494
- * @property {string} state - State
494
+ * @typedef CardDetailsResponse
495
+ * @property {CardDetails} data
496
+ * @property {boolean} success - Response is successful or not.
495
497
  */
496
498
 
497
499
  /**
498
- * @typedef LinkStatus
499
- * @property {string} message - Message
500
- * @property {boolean} status - Link action status
500
+ * @typedef TransferItemsDetails
501
+ * @property {number} id -
502
+ * @property {string} [display_name] - Beneficiary Display Name
503
+ * @property {string} logo_large - Beneficiary large Logo
504
+ * @property {string} logo_small - Beneficiary small Logo
505
+ * @property {string} name - Beneficiary Name
501
506
  */
502
507
 
503
508
  /**
504
- * @typedef ListCardsResponse
505
- * @property {Card[]} [data] - List of cards of customer.
506
- * @property {string} message - Human readable message.
507
- * @property {boolean} success - Response is successful or not.
509
+ * @typedef TransferModeDetails
510
+ * @property {TransferItemsDetails[]} [items] - Beneficiary Mode Items
511
+ * @property {string} display_name - Beneficiary Mode Name
508
512
  */
509
513
 
510
514
  /**
511
- * @typedef MarketplaceInfo
512
- * @property {string} [date_of_joining] - Date of joining
513
- * @property {string} membership_id - Merchant id
514
- * @property {string} name - Name of store
515
+ * @typedef TransferModeResponse
516
+ * @property {TransferModeDetails[]} data - Response Object
515
517
  */
516
518
 
517
519
  /**
518
- * @typedef NotFoundResourceError
519
- * @property {string} code - Bad Request Data
520
- * @property {string} description - Not Found
521
- * @property {boolean} success - Response is successful or not
520
+ * @typedef UpdateRefundTransferModeRequest
521
+ * @property {boolean} enable - True for enabling the Transfer Mode
522
+ * @property {string} transfer_mode - Transfer Mode of the Beneficiary to be added
522
523
  */
523
524
 
524
525
  /**
525
- * @typedef OnboardSummary
526
- * @property {string} [activation_url] - Url for activation
527
- * @property {boolean} [is_eligible_for_txn] - Whether is eligible for transaction
528
- * @property {string} [merchant_customer_ref_id] - Rupifi customer ID
529
- * @property {string} [redirect_url] - URL to which the user may redirect.
530
- * @property {Object} [session] - User Session
531
- * @property {boolean} status - Transaction status
532
- * @property {string} [status_remark] - Decription of status
526
+ * @typedef UpdateRefundTransferModeResponse
527
+ * @property {boolean} [success] - Response is successful or not
533
528
  */
534
529
 
535
530
  /**
536
531
  * @typedef OrderBeneficiaryDetails
537
- * @property {string} account_holder - Account Holder Name
532
+ * @property {string} modified_on - MOdification Date of Beneficiary
538
533
  * @property {string} account_no - Account Number
539
- * @property {string} address - Address of User
534
+ * @property {string} [mobile] - MObile no of User
540
535
  * @property {string} bank_name - Bank Name Of Account
536
+ * @property {string} ifsc_code - Ifsc Code Of Account
537
+ * @property {boolean} is_active - Boolean Flag whether Beneficiary set or not
541
538
  * @property {string} beneficiary_id - Benenficiary Id
542
- * @property {string} [branch_name] - Branch Name Of Account
543
- * @property {string} [comment] - Remarks
544
- * @property {string} created_on - Creation Date of Beneficiary
545
- * @property {string} [delights_user_name] - User Id Who filled the Beneficiary
546
- * @property {string} display_name - Display Name Of Account
539
+ * @property {string} account_holder - Account Holder Name
547
540
  * @property {string} email - EMail of User
541
+ * @property {string} [delights_user_name] - User Id Who filled the Beneficiary
548
542
  * @property {number} id -
549
- * @property {string} ifsc_code - Ifsc Code Of Account
550
- * @property {boolean} is_active - Boolean Flag whether Beneficiary set or not
551
- * @property {string} [mobile] - MObile no of User
552
- * @property {string} modified_on - MOdification Date of Beneficiary
543
+ * @property {string} transfer_mode - Transfer Mode Of Account
544
+ * @property {string} [branch_name] - Branch Name Of Account
545
+ * @property {string} created_on - Creation Date of Beneficiary
553
546
  * @property {string} subtitle - SHort Title Of Account
547
+ * @property {string} [comment] - Remarks
548
+ * @property {string} address - Address of User
554
549
  * @property {string} title - Title Of Account
555
- * @property {string} transfer_mode - Transfer Mode Of Account
550
+ * @property {string} display_name - Display Name Of Account
556
551
  */
557
552
 
558
553
  /**
559
554
  * @typedef OrderBeneficiaryResponse
560
- * @property {OrderBeneficiaryDetails[]} [beneficiaries] - All Beneficiaries Of An Order
561
555
  * @property {boolean} [show_beneficiary_details] - Show beneficiary details or not.
556
+ * @property {OrderBeneficiaryDetails[]} [beneficiaries] - All Beneficiaries Of An Order
562
557
  */
563
558
 
564
559
  /**
565
- * @typedef OutstandingOrderDetailsResponse
566
- * @property {Object[]} [data] - Dict containing the outstanding order details
567
- * @property {string} [message] - Message
568
- * @property {number} status_code - HTTP Status code
569
- * @property {boolean} success - Response is successful or not.
560
+ * @typedef NotFoundResourceError
561
+ * @property {string} code - Bad Request Data
562
+ * @property {string} description - Not Found
563
+ * @property {boolean} success - Response is successful or not
570
564
  */
571
565
 
572
566
  /**
573
- * @typedef PaidOrderDetailsResponse
574
- * @property {Object[]} [data] - Dict containing the paid order details
575
- * @property {string} [message] - Message
576
- * @property {number} status_code - HTTP Status code
577
- * @property {boolean} success - Response is successful or not.
567
+ * @typedef IfscCodeResponse
568
+ * @property {string} branch_name - Branch Name Of Account
569
+ * @property {boolean} [success] - Response is successful or not
570
+ * @property {string} bank_name - Bank Name Of Account
578
571
  */
579
572
 
580
573
  /**
581
- * @typedef PaymentFlow
582
- * @property {AggregatorRoute} [ajiodhan]
583
- * @property {AggregatorRoute} [bqr_razorpay]
584
- * @property {AggregatorRoute} [ccavenue]
585
- * @property {AggregatorRoute} [epaylater]
586
- * @property {AggregatorRoute} [fynd]
587
- * @property {AggregatorRoute} [jiopay]
588
- * @property {AggregatorRoute} [juspay]
589
- * @property {AggregatorRoute} [mswipe]
590
- * @property {AggregatorRoute} [payubiz]
591
- * @property {AggregatorRoute} [razorpay]
592
- * @property {AggregatorRoute} [rupifi]
593
- * @property {AggregatorRoute} [simpl]
594
- * @property {AggregatorRoute} [stripe]
595
- * @property {AggregatorRoute} [upi_razorpay]
574
+ * @typedef ErrorCodeDescription
575
+ * @property {string} code - Error descrption code.
576
+ * @property {string} description - Error human understandable description.
577
+ * @property {boolean} success - Response is successful or not
596
578
  */
597
579
 
598
580
  /**
599
- * @typedef PaymentInitializationRequest
600
- * @property {string} aggregator - Payment gateway name
601
- * @property {number} amount - Payable amount.
602
- * @property {string} contact - Customer valid mobile number
603
- * @property {string} currency - Currency code.
604
- * @property {string} customer_id - Payment gateway customer id.
605
- * @property {string} [device_id] - EDC machine Unique Identifier
606
- * @property {string} email - Customer valid email
607
- * @property {string} merchant_order_id - Unique fynd order id
608
- * @property {string} method - Payment method
609
- * @property {string} order_id - Payment gateway order id
610
- * @property {string} [razorpay_payment_id] - Payment gateway payment id
611
- * @property {number} [timeout] - Payment polling timeout if not recieved response
612
- * @property {string} [vpa] - Customer vpa address
581
+ * @typedef AddBeneficiaryViaOtpVerificationRequest
582
+ * @property {string} request_id - Request Id sent in
583
+ * @property {string} hash_key - Hash key of the beneficiary Id
584
+ * @property {string} otp - Otp sent to the given Mobile No
613
585
  */
614
586
 
615
587
  /**
616
- * @typedef PaymentInitializationResponse
617
- * @property {string} aggregator - Payment gateway name
618
- * @property {string} [aggregator_order_id] - Payment order id
619
- * @property {number} [amount] - Payable amount.
620
- * @property {string} [bqr_image] - Bharath qr image url.
621
- * @property {string} [currency] - Currency code.
622
- * @property {string} [customer_id] - Payment gateway customer id.
623
- * @property {string} [device_id] - EDC machine Unique Identifier
624
- * @property {string} merchant_order_id - Order id
625
- * @property {string} method - Payment method
626
- * @property {string} polling_url - Polling url.
627
- * @property {string} [razorpay_payment_id] - Payment id.
628
- * @property {string} [status] - Status of payment.
629
- * @property {boolean} success - Response is successful or not.
630
- * @property {number} [timeout] - Timeout.
631
- * @property {string} [upi_poll_url] - UPI poll url.
632
- * @property {string} [virtual_id] - Payment virtual address.
633
- * @property {string} [vpa] - Customer vpa address
588
+ * @typedef AddBeneficiaryViaOtpVerificationResponse
589
+ * @property {boolean} [success] - Response is successful or not
590
+ * @property {string} message - Aggregator Response of beneficicary
634
591
  */
635
592
 
636
593
  /**
637
- * @typedef PaymentMethodsMeta
638
- * @property {string} merchant_code - Merchant code
639
- * @property {string} payment_gateway - Payment gateway name
640
- * @property {string} payment_identifier - Payment identifier
594
+ * @typedef WrongOtpError
595
+ * @property {boolean} is_verified_flag - Vefified flag.
596
+ * @property {string} description - Wrong OTP Code
597
+ * @property {string} success - Response is successful or not
641
598
  */
642
599
 
643
600
  /**
644
- * @typedef PaymentMethodsMetaOrder
645
- * @property {string} merchant_code - Merchant code
646
- * @property {string} payment_gateway - Payment gateway name
647
- * @property {string} payment_identifier - Payment identifier
601
+ * @typedef BeneficiaryModeDetails
602
+ * @property {string} account_no - Account NUmber of the Account Holder
603
+ * @property {string} [address] - Address of the User
604
+ * @property {string} mobile - Moblie Number of the User
605
+ * @property {string} bank_name - Bank Name of the Account
606
+ * @property {string} [comment] - Remarks added by The user
607
+ * @property {string} ifsc_code - Ifsc Code of the Account
608
+ * @property {string} [vpa]
609
+ * @property {string} branch_name - Branch Name of the Account
610
+ * @property {string} account_holder - Name of the Account Holder
611
+ * @property {string} [wallet]
612
+ * @property {string} email - Email of the Account Holder
648
613
  */
649
614
 
650
615
  /**
651
- * @typedef PaymentModeList
652
- * @property {string} aggregator_name - Aggregator_name
653
- * @property {string} [card_brand] - Card_brand
654
- * @property {string} [card_brand_image] - Card_brand_image
655
- * @property {string} [card_fingerprint] - Card_fingerprint
656
- * @property {string} [card_id] - Card_id
657
- * @property {string} [card_isin] - Card_isin
658
- * @property {string} [card_issuer] - Card_issuer
659
- * @property {string} [card_name] - Card_name
660
- * @property {string} [card_number] - Card_number
661
- * @property {string} [card_reference] - Card_reference
662
- * @property {string} [card_token] - Card_token
663
- * @property {string} [card_type] - Card_type
664
- * @property {number} [cod_limit] - Cod limit
665
- * @property {number} [cod_limit_per_order] - Cod limit per order
666
- * @property {string} [code] - Code
667
- * @property {boolean} [compliant_with_tokenisation_guidelines] - If card is
668
- * tokenised or not
669
- * @property {string} [display_name] - Display name
670
- * @property {number} [display_priority] - Dispaly Priority
671
- * @property {number} [exp_month] - Exp_month
672
- * @property {number} [exp_year] - Exp_year
673
- * @property {boolean} [expired] - Expired
674
- * @property {string} [fynd_vpa] - Fynd_vpa
675
- * @property {IntentApp[]} [intent_app] - Intent_app
676
- * @property {IntentAppErrorList[]} [intent_app_error_dict_list] -
677
- * Intent_app_error_dict_list
678
- * @property {string[]} [intent_app_error_list] - Intent_app_error_list
679
- * @property {boolean} [intent_flow] - Intent_flow
680
- * @property {PaymentModeLogo} [logo_url]
681
- * @property {string} [merchant_code] - Merchant code
682
- * @property {Object} [meta] - Payment methods meta
683
- * @property {string} [name] - Name
684
- * @property {string} [nickname] - Nickname
685
- * @property {number} [remaining_limit] - Remaining limit
686
- * @property {number} [retry_count] - Retry_count
687
- * @property {number} [timeout] - Timeout
616
+ * @typedef AddBeneficiaryDetailsRequest
617
+ * @property {boolean} delights - True if beneficiary to be added by delights or
618
+ * False if by User
619
+ * @property {string} shipment_id - Shipment Id of the respective Merchant Order Id
620
+ * @property {BeneficiaryModeDetails} details
621
+ * @property {string} [otp]
622
+ * @property {string} order_id - Merchant Order Id
623
+ * @property {string} transfer_mode - Transfer Mode of the Beneficiary to be added
624
+ * @property {string} [request_id]
688
625
  */
689
626
 
690
627
  /**
691
- * @typedef PaymentModeLogo
692
- * @property {string} large - Large
693
- * @property {string} small - Smalll
628
+ * @typedef RefundAccountResponse
629
+ * @property {boolean} [is_verified_flag]
630
+ * @property {Object} [data] - Refund account data.
631
+ * @property {boolean} success - Success or failure flag.
632
+ * @property {string} message - Response message
694
633
  */
695
634
 
696
635
  /**
697
- * @typedef PaymentModeRouteResponse
698
- * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array
699
- * @property {Object} [payment_breakup] - Payment Breakup for advance payment
700
- * @property {PaymentOptionAndFlow} payment_options
701
- * @property {boolean} success - Response is successful or not
636
+ * @typedef BankDetailsForOTP
637
+ * @property {string} account_no
638
+ * @property {string} bank_name
639
+ * @property {string} ifsc_code
640
+ * @property {string} branch_name
641
+ * @property {string} account_holder
702
642
  */
703
643
 
704
644
  /**
705
- * @typedef PaymentOptionAndFlow
706
- * @property {PaymentFlow} payment_flows
707
- * @property {RootPaymentMode} payment_option
645
+ * @typedef AddBeneficiaryDetailsOTPRequest
646
+ * @property {string} order_id
647
+ * @property {BankDetailsForOTP} details
708
648
  */
709
649
 
710
650
  /**
711
- * @typedef PaymentOrderData
712
- * @property {string} [aggregator] - Aggregator name
713
- * @property {number} [amount] - Amount
714
- * @property {string} [callback_url] - Callback url for aggregator
715
- * @property {string} [contact] - Mobile number
716
- * @property {string} [currency] - Currency
717
- * @property {string} [customer_id] - Aggregator customer id
718
- * @property {string} [email] - Email
719
- * @property {string} [merchant_order_id] - Merchant order id
720
- * @property {string} [method] - Method
721
- * @property {string} [order_id] - Aggregator order id
651
+ * @typedef WalletOtpRequest
652
+ * @property {string} country_code - Country Code of the Mobile Number
653
+ * @property {string} mobile - Wallet Moblie Number of the User
722
654
  */
723
655
 
724
656
  /**
725
- * @typedef PaymentOrderMethods
726
- * @property {number} amount - Amount to be collected
727
- * @property {PaymentMethodsMetaOrder} meta
728
- * @property {string} mode - Payment mode
729
- * @property {string} name - Payment mode name
730
- * @property {string} [payment] - Payment type i.e. Required / Blocked
657
+ * @typedef WalletOtpResponse
658
+ * @property {string} request_id - Request id
659
+ * @property {string} is_verified_flag - Boolean Flag whether OTP Validation is
660
+ * already done or not
661
+ * @property {boolean} [success] - Response is successful or not
731
662
  */
732
663
 
733
664
  /**
734
- * @typedef PaymentOrderRequest
735
- * @property {string} order_id - Order id
736
- * @property {PaymentOrderMethods[]} [payment_methods]
737
- * @property {string} [shipment_id] - Shipment_id
665
+ * @typedef SetDefaultBeneficiaryRequest
666
+ * @property {string} order_id - Merchant Order Id
667
+ * @property {string} beneficiary_id - Beneficiary Hash Id of the beneficiary added
738
668
  */
739
669
 
740
670
  /**
741
- * @typedef PaymentOrderResponse
742
- * @property {string} [callback_url] - Callback url for aggregator
743
- * @property {PaymentOrderData} [data]
744
- * @property {string} message - Message
745
- * @property {string} [order_id] - Merchant order id
746
- * @property {string} [payment_confirm_url] - Payment confirm url for aggregator
671
+ * @typedef SetDefaultBeneficiaryResponse
672
+ * @property {boolean} is_beneficiary_set - Boolean Flag whether Beneficiary set or not
673
+ * @property {boolean} [success] - Response is successful or not
674
+ */
675
+
676
+ /**
677
+ * @typedef GetPaymentLinkResponse
747
678
  * @property {number} status_code - HTTP status code
679
+ * @property {string} [payment_link_current_status] - Status of payment link
748
680
  * @property {boolean} success - Successful or failure
681
+ * @property {number} [polling_timeout] - Polling request timeout
682
+ * @property {string} [payment_link_url] - Url of payment link
683
+ * @property {string} [external_order_id] - Merchant order id
684
+ * @property {string} message - Message
685
+ * @property {string} [merchant_name] - Merchant name
686
+ * @property {number} [amount] - Total value of order
749
687
  */
750
688
 
751
689
  /**
752
- * @typedef PaymentStatusUpdateRequest
753
- * @property {string} aggregator - Payment gateway name
754
- * @property {number} amount - Payable amount.
755
- * @property {string} contact - Customer valid mobile number
756
- * @property {string} currency - Currency code.
757
- * @property {string} customer_id - Payment gateway customer id.
758
- * @property {string} [device_id] - EDC machine Unique Identifier
759
- * @property {string} email - Customer valid email
760
- * @property {string} merchant_order_id - Unique fynd order id
761
- * @property {string} merchant_transaction_id - Unique fynd transaction id
762
- * @property {string} method - Payment method
763
- * @property {string} order_id - Payment gateway order id
764
- * @property {string} status - Status of payment.
765
- * @property {string} [vpa] - Customer vpa address
690
+ * @typedef ErrorDescription
691
+ * @property {string} [payment_transaction_id] - Payment transaction id
692
+ * @property {boolean} [expired] - Payment link expired or not
693
+ * @property {string} [merchant_order_id] - Order id
694
+ * @property {string} [merchant_name] - Name of merchant that created payment link
695
+ * @property {string} [msg] - Message
696
+ * @property {boolean} [cancelled] - Payment link is cancelled or not
697
+ * @property {number} [amount] - Amount paid
698
+ * @property {boolean} [invalid_id] - Payment link id is valid or not
766
699
  */
767
700
 
768
701
  /**
769
- * @typedef PaymentStatusUpdateResponse
770
- * @property {string} aggregator_name - Payment gateway name
771
- * @property {string} [redirect_url] - Redirect url
772
- * @property {boolean} retry - Response is successful or not.
773
- * @property {string} status - Payment status
774
- * @property {boolean} [success] - Response is successful or not
702
+ * @typedef ErrorResponse
703
+ * @property {number} status_code - HTTP status code
704
+ * @property {ErrorDescription} [error]
705
+ * @property {string} message - Message
706
+ * @property {boolean} success - Successful or failure
775
707
  */
776
708
 
777
709
  /**
778
- * @typedef PollingPaymentLinkResponse
779
- * @property {string} [aggregator_name] - Aggregator name
780
- * @property {number} [amount] - Amount
781
- * @property {number} [http_status] - HTTP status code
782
- * @property {string} [message] - Message
783
- * @property {string} [order_id] - Fynd order id
784
- * @property {string} [payment_link_id] - Payment link id
785
- * @property {string} [redirect_url] - Url to redirect to
786
- * @property {string} [status] - Status of payment link
787
- * @property {number} [status_code] - HTTP status code
788
- * @property {boolean} [success] - Successful or failure
710
+ * @typedef CreatePaymentLinkMeta
711
+ * @property {string} cart_id
712
+ * @property {string} checkout_mode
713
+ * @property {string} [assign_card_id]
714
+ * @property {string} amount
789
715
  */
790
716
 
791
717
  /**
792
- * @typedef RedirectToAggregatorResponse
793
- * @property {RedirectURL} data
794
- * @property {boolean} success - Status updated or not.
718
+ * @typedef CreatePaymentLinkRequest
719
+ * @property {string} [description] - Merchant order id
720
+ * @property {string} external_order_id - Merchant order id
721
+ * @property {string} mobile_number - Mobile number to which the payment link is
722
+ * to be sent
723
+ * @property {number} amount - Total value of order
724
+ * @property {CreatePaymentLinkMeta} meta
725
+ * @property {string} email - Email to which the payment link is to be sent
795
726
  */
796
727
 
797
728
  /**
798
- * @typedef RedirectURL
799
- * @property {string} signup_url - URL to which the user may redirect.
800
- * @property {boolean} status - Aggregator's Operation is successful or not.
729
+ * @typedef CreatePaymentLinkResponse
730
+ * @property {number} status_code - HTTP status code
731
+ * @property {boolean} success - Successful or failure
732
+ * @property {number} [polling_timeout] - Polling request timeout
733
+ * @property {string} [payment_link_url] - Url of payment link
734
+ * @property {string} message - Message
735
+ * @property {string} [payment_link_id] - Unique id of payment link
801
736
  */
802
737
 
803
738
  /**
804
- * @typedef RefundAccountResponse
805
- * @property {Object} [data] - Refund account data.
806
- * @property {boolean} [is_verified_flag]
807
- * @property {string} message - Response message
808
- * @property {boolean} success - Success or failure flag.
739
+ * @typedef CancelOrResendPaymentLinkRequest
740
+ * @property {string} payment_link_id - Unique id of payment link
809
741
  */
810
742
 
811
743
  /**
812
- * @typedef renderHTMLRequest
813
- * @property {string} base64_html - Base64 encoded html string
814
- * @property {string} [returntype] - Return Type of API
744
+ * @typedef ResendPaymentLinkResponse
745
+ * @property {number} status_code - HTTP status code
746
+ * @property {number} [polling_timeout] - Polling request timeout
747
+ * @property {boolean} success - Successful or failure
748
+ * @property {string} message - Message
815
749
  */
816
750
 
817
751
  /**
818
- * @typedef renderHTMLResponse
819
- * @property {string} html - HTML string
752
+ * @typedef CancelPaymentLinkResponse
753
+ * @property {number} status_code - HTTP status code
754
+ * @property {boolean} success - Successful or failure
755
+ * @property {string} message - Message
820
756
  */
821
757
 
822
758
  /**
823
- * @typedef ResendOrCancelPaymentRequest
824
- * @property {string} [device_id] - EDC machine Unique Identifier
825
- * @property {string} order_id - Unique order id
826
- * @property {string} request_type - Either resend or cancel
759
+ * @typedef PollingPaymentLinkResponse
760
+ * @property {string} [status] - Status of payment link
761
+ * @property {number} [status_code] - HTTP status code
762
+ * @property {boolean} [success] - Successful or failure
763
+ * @property {number} [http_status] - HTTP status code
764
+ * @property {string} [message] - Message
765
+ * @property {string} [order_id] - Fynd order id
766
+ * @property {string} [redirect_url] - Url to redirect to
767
+ * @property {string} [payment_link_id] - Payment link id
768
+ * @property {string} [aggregator_name] - Aggregator name
769
+ * @property {number} [amount] - Amount
827
770
  */
828
771
 
829
772
  /**
830
- * @typedef ResendOrCancelPaymentResponse
831
- * @property {LinkStatus} data
832
- * @property {boolean} success - Response is successful or not.
773
+ * @typedef PaymentMethodsMeta
774
+ * @property {string} merchant_code - Merchant code
775
+ * @property {string} payment_gateway - Payment gateway name
776
+ * @property {string} payment_identifier - Payment identifier
833
777
  */
834
778
 
835
779
  /**
836
- * @typedef ResendPaymentLinkResponse
837
- * @property {string} message - Message
838
- * @property {number} [polling_timeout] - Polling request timeout
839
- * @property {number} status_code - HTTP status code
840
- * @property {boolean} success - Successful or failure
780
+ * @typedef CreateOrderUserPaymentMethods
781
+ * @property {string} name - Payment mode name
782
+ * @property {string} mode - Payment mode
783
+ * @property {PaymentMethodsMeta} meta
841
784
  */
842
785
 
843
786
  /**
844
- * @typedef RootPaymentMode
845
- * @property {boolean} [add_card_enabled] - Annonymous card flag
846
- * @property {string} [aggregator_name] - Dispaly Priority
847
- * @property {boolean} [anonymous_enable] - Annonymous card flag
848
- * @property {string} display_name - Payment mode display name
849
- * @property {number} display_priority - Dispaly Priority
850
- * @property {boolean} [is_pay_by_card_pl] - This flag will be true in case of
851
- * Payment link payment through card
852
- * @property {PaymentModeList[]} [list] - Payment mode
853
- * @property {string} name - Payment mode name
854
- * @property {boolean} [save_card] - Card save or not
787
+ * @typedef CreateOrderUserRequest
788
+ * @property {string} failure_callback_url - Failure page url
789
+ * @property {string} currency - Currency
790
+ * @property {string} payment_link_id - Unique id of payment link
791
+ * @property {CreateOrderUserPaymentMethods} payment_methods
792
+ * @property {string} success_callback_url - Success page url
793
+ * @property {Object} [meta] - Meta
855
794
  */
856
795
 
857
796
  /**
858
- * @typedef RupifiBannerData
859
- * @property {string} [kyc_url] - Rupifi KYC banner url.
860
- * @property {string} [status] - Rupifi KYC status
797
+ * @typedef CreateOrderUserData
798
+ * @property {string} [method] - Method
799
+ * @property {string} [aggregator] - Aggregator name
800
+ * @property {string} [customer_id] - Aggregator customer id
801
+ * @property {string} [contact] - Mobile number
802
+ * @property {string} [merchant_order_id] - Merchant order id
803
+ * @property {string} [order_id] - Aggregator order id
804
+ * @property {string} [currency] - Currency
805
+ * @property {string} [callback_url] - Callback url for aggregator
806
+ * @property {number} [amount] - Amount
807
+ * @property {string} [email] - Email
861
808
  */
862
809
 
863
810
  /**
864
- * @typedef RupifiBannerResponse
865
- * @property {RupifiBannerData} data
866
- * @property {boolean} success - Successful or not.
811
+ * @typedef CreateOrderUserResponse
812
+ * @property {number} status_code - HTTP status code
813
+ * @property {boolean} success - Successful or failure
814
+ * @property {CreateOrderUserData} [data]
815
+ * @property {string} message - Message
816
+ * @property {string} [order_id] - Merchant order id
817
+ * @property {string} [callback_url] - Callback url for aggregator
818
+ * @property {string} [payment_confirm_url] - Payment confirm url for aggregator
867
819
  */
868
820
 
869
821
  /**
870
- * @typedef SetDefaultBeneficiaryRequest
871
- * @property {string} beneficiary_id - Beneficiary Hash Id of the beneficiary added
872
- * @property {string} order_id - Merchant Order Id
822
+ * @typedef BalanceDetails
823
+ * @property {string} [formatted_value] - Formated Amount with currency symbol
824
+ * @property {string} [currency] - Currency Code
825
+ * @property {number} [value] - Payment amount
873
826
  */
874
827
 
875
828
  /**
876
- * @typedef SetDefaultBeneficiaryResponse
877
- * @property {boolean} is_beneficiary_set - Boolean Flag whether Beneficiary set or not
878
- * @property {boolean} [success] - Response is successful or not
829
+ * @typedef CreditSummary
830
+ * @property {BalanceDetails} [total_due_amount]
831
+ * @property {string} [status] - Customer Credit status
832
+ * @property {BalanceDetails} [limit]
833
+ * @property {string} [credit_line_id] - ID at Credit aggregator's end
834
+ * @property {BalanceDetails} [amount_available]
835
+ * @property {BalanceDetails} [due_amount]
836
+ * @property {string} [due_date] - Due date for repayment
837
+ * @property {BalanceDetails} [balance]
838
+ * @property {string} [status_message] - Message to customer
839
+ * @property {string} [repayment_url] - Url for repayment
840
+ * @property {string} [soa_url] - Statement of accounts. Show payment history.
841
+ * @property {boolean} [is_eligible_for_txn] - Eligiblity flag to complete transaction
842
+ * @property {string} [merchant_customer_ref_id] - Unique aggregator customer id
843
+ * @property {string} [buyer_status] - Status from Credit aggregator's end
844
+ * @property {string} [activation_url] - Url for activation
879
845
  */
880
846
 
881
847
  /**
882
- * @typedef SplitObject
883
- * @property {number} [amount_remaining] - Amount pending to be paid
884
- * @property {number} [splits_remaining] - Number of splits remaining
885
- * @property {number} [total_number_of_splits] - Maximum amount of splits allowed
848
+ * @typedef CustomerCreditSummaryResponse
849
+ * @property {CreditSummary} [data]
850
+ * @property {boolean} success - Payment confirmation updated or not.
886
851
  */
887
852
 
888
853
  /**
889
- * @typedef TransferItemsDetails
890
- * @property {string} [display_name] - Beneficiary Display Name
891
- * @property {number} id -
892
- * @property {string} logo_large - Beneficiary large Logo
893
- * @property {string} logo_small - Beneficiary small Logo
894
- * @property {string} name - Beneficiary Name
854
+ * @typedef RedirectURL
855
+ * @property {boolean} status - Aggregator's Operation is successful or not.
856
+ * @property {string} signup_url - URL to which the user may redirect.
895
857
  */
896
858
 
897
859
  /**
898
- * @typedef TransferModeDetails
899
- * @property {string} display_name - Beneficiary Mode Name
900
- * @property {TransferItemsDetails[]} [items] - Beneficiary Mode Items
860
+ * @typedef RedirectToAggregatorResponse
861
+ * @property {RedirectURL} data
862
+ * @property {boolean} success - Status updated or not.
901
863
  */
902
864
 
903
865
  /**
904
- * @typedef TransferModeResponse
905
- * @property {TransferModeDetails[]} data - Response Object
866
+ * @typedef CreditDetail
867
+ * @property {boolean} status - Operation is successful or not.
868
+ * @property {boolean} is_registered - User is registered with aggregator or not.
869
+ * @property {string} signup_url - URL to which the user may redirect.
906
870
  */
907
871
 
908
872
  /**
909
- * @typedef UpdateRefundTransferModeRequest
910
- * @property {boolean} enable - True for enabling the Transfer Mode
911
- * @property {string} transfer_mode - Transfer Mode of the Beneficiary to be added
873
+ * @typedef CheckCreditResponse
874
+ * @property {CreditDetail} data
875
+ * @property {boolean} success - Operation is successful or not.
912
876
  */
913
877
 
914
878
  /**
915
- * @typedef UpdateRefundTransferModeResponse
916
- * @property {boolean} [success] - Response is successful or not
879
+ * @typedef KYCAddress
880
+ * @property {string} city - City
881
+ * @property {string} [addressline2] - Address Line 2
882
+ * @property {string} state - State
883
+ * @property {string} [ownership_type] - Address Owner Type
884
+ * @property {string} pincode - Pincode
885
+ * @property {string} [land_mark] - Land Mark
886
+ * @property {string} addressline1 - Address Line 1
917
887
  */
918
888
 
919
889
  /**
920
890
  * @typedef UserPersonalInfoInDetails
921
- * @property {KYCAddress} address_as_per_id
922
- * @property {string} dob - DOB
923
- * @property {string} [driving_license] - Driver License
924
- * @property {string} [email] - Email
925
- * @property {boolean} email_verified - Is Email Verified or not
926
- * @property {string} [fathers_name] - Father's Name
927
891
  * @property {string} first_name - First Name
892
+ * @property {string} [voter_id] - Voter ID Number
928
893
  * @property {string} [gender] - Gender
929
- * @property {string} [last_name] - Last Name
930
- * @property {string} [middle_name] - Middle Name
931
- * @property {boolean} mobile_verified - Is Mobile Verified or not
894
+ * @property {string} dob - DOB
895
+ * @property {string} [passport] - Passport
896
+ * @property {string} [fathers_name] - Father's Name
932
897
  * @property {string} [mothers_name] - Mother's Name
898
+ * @property {string} [middle_name] - Middle Name
899
+ * @property {string} [last_name] - Last Name
933
900
  * @property {string} [pan] - Pan Number
934
- * @property {string} [passport] - Passport
901
+ * @property {string} [driving_license] - Driver License
902
+ * @property {boolean} email_verified - Is Email Verified or not
903
+ * @property {KYCAddress} address_as_per_id
904
+ * @property {boolean} mobile_verified - Is Mobile Verified or not
935
905
  * @property {string} phone - Email
936
- * @property {string} [voter_id] - Voter ID Number
937
- */
938
-
939
- /**
940
- * @typedef ValidateCustomerRequest
941
- * @property {string} aggregator - Payment gateway name in camel case i.e Simpl, Rupifi
942
- * @property {Object} [billing_address] - Extra meta fields.
943
- * @property {Object} [delivery_address] - Extra meta fields.
944
- * @property {Object} [merchant_params] - Extra meta fields.
945
- * @property {Object[]} [order_items] - Extra meta fields.
946
- * @property {string} [payload] - Hashed payload string.
947
- * @property {string} phone_number - User mobile number without country code.
948
- * @property {number} transaction_amount_in_paise - Payable amount in paise
949
- */
950
-
951
- /**
952
- * @typedef ValidateCustomerResponse
953
- * @property {Object} data - Payment gateway response data
954
- * @property {string} message - Error or success message.
955
- * @property {boolean} success - Response is successful or not
906
+ * @property {string} [email] - Email
956
907
  */
957
908
 
958
909
  /**
959
- * @typedef ValidateUPI
960
- * @property {string} customer_name - Customer Bank
961
- * @property {boolean} is_valid - Boolean is true or false.
962
- * @property {string} status - VALID or INVALID
963
- * @property {string} upi_vpa - UPI ID
910
+ * @typedef MarketplaceInfo
911
+ * @property {string} [date_of_joining] - Date of joining
912
+ * @property {string} name - Name of store
913
+ * @property {string} membership_id - Merchant id
964
914
  */
965
915
 
966
916
  /**
967
- * @typedef ValidateVPARequest
968
- * @property {string} upi_vpa - UPI ID
917
+ * @typedef BusinessDetails
918
+ * @property {string} [business_ownership_type] - Business Ownershipp type(e.g Rented)
919
+ * @property {string} [vintage] - Vintage
920
+ * @property {string} [gstin] - GSTIN Number
921
+ * @property {string} [pan] - Pan Number
922
+ * @property {string} [entity_type] - Busineess Entity Type
923
+ * @property {Object} [shop_and_establishment] - Shop Establishment
924
+ * @property {string} [fssai] - FDA License Number
925
+ * @property {string} [fda] - Driver License
926
+ * @property {string} [business_type] - Business Type
927
+ * @property {string} [name] - Business Name
928
+ * @property {KYCAddress} [address]
969
929
  */
970
930
 
971
931
  /**
972
- * @typedef ValidateVPAResponse
973
- * @property {ValidateUPI} data
974
- * @property {boolean} success - Response is successful or not.
932
+ * @typedef DeviceDetails
933
+ * @property {string} [identification_number] - IP
934
+ * @property {string} [identifier_type] - Static value = ip
935
+ * @property {string} [device_model] - Device Model
936
+ * @property {string} [device_make] - Device maker
937
+ * @property {string} [device_type] - Device Type(E.g. Mobile)
938
+ * @property {string} [os] - OS Name
939
+ * @property {string} [os_version] - OS Version
975
940
  */
976
941
 
977
942
  /**
978
- * @typedef WalletDelinkRequestSchema
943
+ * @typedef CustomerOnboardingRequest
944
+ * @property {UserPersonalInfoInDetails} [personal_info]
945
+ * @property {string} [mcc] - Mcc
979
946
  * @property {string} aggregator - Aggregator Name
980
- * @property {string} wallet_code - Wallet Code
947
+ * @property {MarketplaceInfo} [marketplace_info]
948
+ * @property {string} source - CallbackURL
949
+ * @property {BusinessDetails} [business_info]
950
+ * @property {DeviceDetails} [device]
981
951
  */
982
952
 
983
953
  /**
984
- * @typedef WalletLinkRequestSchema
985
- * @property {string} aggregator - Aggregator Name
986
- * @property {string} mobile - Mobile Number for Wallet
987
- * @property {string} wallet_code - Wallet Code
954
+ * @typedef OnboardSummary
955
+ * @property {string} [redirect_url] - URL to which the user may redirect.
956
+ * @property {Object} [session] - User Session
957
+ * @property {boolean} status - Transaction status
958
+ * @property {string} [status_remark] - Decription of status
959
+ * @property {boolean} [is_eligible_for_txn] - Whether is eligible for transaction
960
+ * @property {string} [merchant_customer_ref_id] - Rupifi customer ID
961
+ * @property {string} [activation_url] - Url for activation
988
962
  */
989
963
 
990
964
  /**
991
- * @typedef WalletOtpRequest
992
- * @property {string} country_code - Country Code of the Mobile Number
993
- * @property {string} mobile - Wallet Moblie Number of the User
965
+ * @typedef CustomerOnboardingResponse
966
+ * @property {OnboardSummary} data
967
+ * @property {boolean} success - Status updated or not.
994
968
  */
995
969
 
996
970
  /**
997
- * @typedef WalletOtpResponse
998
- * @property {string} is_verified_flag - Boolean Flag whether OTP Validation is
999
- * already done or not
1000
- * @property {string} request_id - Request id
1001
- * @property {boolean} [success] - Response is successful or not
971
+ * @typedef OutstandingOrderDetailsResponse
972
+ * @property {number} status_code - HTTP Status code
973
+ * @property {Object[]} [data] - Dict containing the outstanding order details
974
+ * @property {boolean} success - Response is successful or not.
975
+ * @property {string} [message] - Message
1002
976
  */
1003
977
 
1004
978
  /**
1005
- * @typedef WalletResponseSchema
1006
- * @property {Object} data - Response received from aggregator
1007
- * @property {boolean} success - Success/Failure of the API call
979
+ * @typedef PaidOrderDetailsResponse
980
+ * @property {number} status_code - HTTP Status code
981
+ * @property {Object[]} [data] - Dict containing the paid order details
982
+ * @property {boolean} success - Response is successful or not.
983
+ * @property {string} [message] - Message
1008
984
  */
1009
985
 
1010
986
  /**
1011
- * @typedef WalletVerifyRequestSchema
1012
- * @property {string} aggregator - Aggregator Name
1013
- * @property {string} link_token - Token for wallet linking
1014
- * @property {number} otp - OTP received for wallet linking
987
+ * @typedef PaymentMethodsMetaOrder
988
+ * @property {string} merchant_code - Merchant code
989
+ * @property {string} payment_gateway - Payment gateway name
990
+ * @property {string} payment_identifier - Payment identifier
1015
991
  */
1016
992
 
1017
993
  /**
1018
- * @typedef WrongOtpError
1019
- * @property {string} description - Wrong OTP Code
1020
- * @property {boolean} is_verified_flag - Vefified flag.
1021
- * @property {string} success - Response is successful or not
994
+ * @typedef PaymentOrderMethods
995
+ * @property {number} amount - Amount to be collected
996
+ * @property {string} [payment] - Payment type i.e. Required / Blocked
997
+ * @property {string} mode - Payment mode
998
+ * @property {PaymentMethodsMetaOrder} meta
999
+ * @property {string} name - Payment mode name
1022
1000
  */
1023
1001
 
1024
- class PaymentApplicationModel {
1025
- /** @returns {ActiveCardPaymentGatewayResponse} */
1026
- static ActiveCardPaymentGatewayResponse() {
1027
- return Joi.object({
1028
- cards: PaymentApplicationModel.CardPaymentGateway().required(),
1029
- message: Joi.string().allow("").required(),
1030
- success: Joi.boolean().required(),
1031
- });
1032
- }
1033
-
1034
- /** @returns {AddBeneficiaryDetailsOTPRequest} */
1035
- static AddBeneficiaryDetailsOTPRequest() {
1036
- return Joi.object({
1037
- details: PaymentApplicationModel.BankDetailsForOTP().required(),
1038
- order_id: Joi.string().allow("").required(),
1039
- });
1040
- }
1041
-
1042
- /** @returns {AddBeneficiaryDetailsRequest} */
1043
- static AddBeneficiaryDetailsRequest() {
1044
- return Joi.object({
1045
- delights: Joi.boolean().required(),
1046
- details: PaymentApplicationModel.BeneficiaryModeDetails().required(),
1047
- order_id: Joi.string().allow("").required(),
1048
- otp: Joi.string().allow(""),
1049
- request_id: Joi.string().allow(""),
1050
- shipment_id: Joi.string().allow("").required(),
1051
- transfer_mode: Joi.string().allow("").required(),
1052
- });
1053
- }
1054
-
1055
- /** @returns {AddBeneficiaryViaOtpVerificationRequest} */
1056
- static AddBeneficiaryViaOtpVerificationRequest() {
1057
- return Joi.object({
1058
- hash_key: Joi.string().allow("").required(),
1059
- otp: Joi.string().allow("").required(),
1060
- request_id: Joi.string().allow("").required(),
1061
- });
1062
- }
1063
-
1064
- /** @returns {AddBeneficiaryViaOtpVerificationResponse} */
1065
- static AddBeneficiaryViaOtpVerificationResponse() {
1066
- return Joi.object({
1067
- message: Joi.string().allow("").required(),
1068
- success: Joi.boolean(),
1069
- });
1070
- }
1002
+ /**
1003
+ * @typedef PaymentOrderRequest
1004
+ * @property {PaymentOrderMethods[]} [payment_methods]
1005
+ * @property {string} order_id - Order id
1006
+ * @property {string} [shipment_id] - Shipment_id
1007
+ */
1071
1008
 
1072
- /** @returns {AdvanceObject} */
1073
- static AdvanceObject() {
1074
- return Joi.object({
1075
- all_prepayment_type: Joi.array().items(
1076
- Joi.string().allow("").allow(null)
1077
- ),
1078
- allow_custom_advance_amount: Joi.boolean().allow(null),
1079
- amount: Joi.number(),
1080
- cancellation_type: Joi.string().allow("").allow(null),
1081
- description: Joi.string().allow("").allow(null),
1082
- display_name: Joi.string().allow("").allow(null),
1083
- is_active: Joi.boolean().allow(null),
1084
- prepayment_type: Joi.string().allow("").allow(null),
1085
- prepayment_value: Joi.number().allow(null),
1086
- refund_time_limit: Joi.number().allow(null),
1087
- time_unit: Joi.string().allow("").allow(null),
1088
- });
1089
- }
1009
+ /**
1010
+ * @typedef PaymentOrderData
1011
+ * @property {number} [amount] - Amount
1012
+ * @property {string} [aggregator] - Aggregator name
1013
+ * @property {string} [callback_url] - Callback url for aggregator
1014
+ * @property {string} [order_id] - Aggregator order id
1015
+ * @property {string} [customer_id] - Aggregator customer id
1016
+ * @property {string} [merchant_order_id] - Merchant order id
1017
+ * @property {string} [currency] - Currency
1018
+ * @property {string} [email] - Email
1019
+ * @property {string} [contact] - Mobile number
1020
+ * @property {string} [method] - Method
1021
+ */
1090
1022
 
1091
- /** @returns {AdvancePaymentObject} */
1092
- static AdvancePaymentObject() {
1093
- return Joi.object({
1094
- advance: PaymentApplicationModel.AdvanceObject(),
1095
- display_name: Joi.string().allow("").allow(null),
1096
- display_priority: Joi.number().allow(null),
1097
- list: Joi.array().items(PaymentApplicationModel.PaymentModeList()),
1098
- name: Joi.string().allow("").allow(null),
1099
- payment_mode_id: Joi.number().allow(null),
1100
- split: PaymentApplicationModel.SplitObject(),
1101
- });
1102
- }
1023
+ /**
1024
+ * @typedef PaymentOrderResponse
1025
+ * @property {string} [payment_confirm_url] - Payment confirm url for aggregator
1026
+ * @property {string} [callback_url] - Callback url for aggregator
1027
+ * @property {string} [order_id] - Merchant order id
1028
+ * @property {boolean} success - Successful or failure
1029
+ * @property {number} status_code - HTTP status code
1030
+ * @property {PaymentOrderData} [data]
1031
+ * @property {string} message - Message
1032
+ */
1103
1033
 
1034
+ class PaymentApplicationModel {
1104
1035
  /** @returns {AggregatorConfigDetail} */
1105
1036
  static AggregatorConfigDetail() {
1106
1037
  return Joi.object({
1038
+ sdk: Joi.boolean().allow(null),
1039
+ secret: Joi.string().allow("").required(),
1107
1040
  api: Joi.string().allow("").allow(null),
1041
+ pin: Joi.string().allow("").allow(null),
1108
1042
  config_type: Joi.string().allow("").required(),
1109
- key: Joi.string().allow("").required(),
1110
- merchant_id: Joi.string().allow("").allow(null),
1111
1043
  merchant_key: Joi.string().allow("").allow(null),
1112
- pin: Joi.string().allow("").allow(null),
1113
- sdk: Joi.boolean().allow(null),
1114
- secret: Joi.string().allow("").required(),
1115
- user_id: Joi.string().allow("").allow(null),
1116
1044
  verify_api: Joi.string().allow("").allow(null),
1117
- });
1118
- }
1119
-
1120
- /** @returns {AggregatorRoute} */
1121
- static AggregatorRoute() {
1122
- return Joi.object({
1123
- api_link: Joi.string().allow("").allow(null),
1124
- data: Joi.any().allow(null),
1125
- payment_flow: Joi.string().allow("").allow(null),
1126
- payment_flow_data: Joi.string().allow("").allow(null),
1045
+ key: Joi.string().allow("").required(),
1046
+ user_id: Joi.string().allow("").allow(null),
1047
+ merchant_id: Joi.string().allow("").allow(null),
1127
1048
  });
1128
1049
  }
1129
1050
 
1130
1051
  /** @returns {AggregatorsConfigDetailResponse} */
1131
1052
  static AggregatorsConfigDetailResponse() {
1132
1053
  return Joi.object({
1133
- ccavenue: PaymentApplicationModel.AggregatorConfigDetail(),
1134
- env: Joi.string().allow("").required(),
1054
+ success: Joi.boolean().required(),
1055
+ razorpay: PaymentApplicationModel.AggregatorConfigDetail(),
1135
1056
  juspay: PaymentApplicationModel.AggregatorConfigDetail(),
1136
- mswipe: PaymentApplicationModel.AggregatorConfigDetail(),
1057
+ simpl: PaymentApplicationModel.AggregatorConfigDetail(),
1137
1058
  payumoney: PaymentApplicationModel.AggregatorConfigDetail(),
1138
- razorpay: PaymentApplicationModel.AggregatorConfigDetail(),
1139
1059
  rupifi: PaymentApplicationModel.AggregatorConfigDetail(),
1140
- simpl: PaymentApplicationModel.AggregatorConfigDetail(),
1060
+ mswipe: PaymentApplicationModel.AggregatorConfigDetail(),
1141
1061
  stripe: PaymentApplicationModel.AggregatorConfigDetail(),
1062
+ ccavenue: PaymentApplicationModel.AggregatorConfigDetail(),
1063
+ env: Joi.string().allow("").required(),
1064
+ });
1065
+ }
1066
+
1067
+ /** @returns {ErrorCodeAndDescription} */
1068
+ static ErrorCodeAndDescription() {
1069
+ return Joi.object({
1070
+ code: Joi.string().allow("").required(),
1071
+ description: Joi.string().allow("").required(),
1072
+ });
1073
+ }
1074
+
1075
+ /** @returns {HttpErrorCodeAndResponse} */
1076
+ static HttpErrorCodeAndResponse() {
1077
+ return Joi.object({
1078
+ error: PaymentApplicationModel.ErrorCodeAndDescription(),
1142
1079
  success: Joi.boolean().required(),
1143
1080
  });
1144
1081
  }
@@ -1146,10 +1083,10 @@ class PaymentApplicationModel {
1146
1083
  /** @returns {AttachCardRequest} */
1147
1084
  static AttachCardRequest() {
1148
1085
  return Joi.object({
1149
- card_id: Joi.string().allow("").allow(null).required(),
1150
- name_on_card: Joi.string().allow(""),
1151
1086
  nickname: Joi.string().allow(""),
1152
1087
  refresh: Joi.boolean().allow(null),
1088
+ card_id: Joi.string().allow("").allow(null).required(),
1089
+ name_on_card: Joi.string().allow(""),
1153
1090
  });
1154
1091
  }
1155
1092
 
@@ -1157,352 +1094,435 @@ class PaymentApplicationModel {
1157
1094
  static AttachCardsResponse() {
1158
1095
  return Joi.object({
1159
1096
  data: Joi.any().required(),
1160
- message: Joi.string().allow(""),
1161
1097
  success: Joi.boolean().required(),
1098
+ message: Joi.string().allow(""),
1162
1099
  });
1163
1100
  }
1164
1101
 
1165
- /** @returns {BalanceDetails} */
1166
- static BalanceDetails() {
1102
+ /** @returns {CardPaymentGateway} */
1103
+ static CardPaymentGateway() {
1167
1104
  return Joi.object({
1168
- currency: Joi.string().allow("").allow(null),
1169
- formatted_value: Joi.string().allow("").allow(null),
1170
- value: Joi.number().allow(null),
1105
+ api: Joi.string().allow("").allow(null),
1106
+ aggregator: Joi.string().allow("").required(),
1107
+ customer_id: Joi.string().allow("").allow(null),
1171
1108
  });
1172
1109
  }
1173
1110
 
1174
- /** @returns {BankDetailsForOTP} */
1175
- static BankDetailsForOTP() {
1111
+ /** @returns {ActiveCardPaymentGatewayResponse} */
1112
+ static ActiveCardPaymentGatewayResponse() {
1176
1113
  return Joi.object({
1177
- account_holder: Joi.string().allow("").required(),
1178
- account_no: Joi.string().allow("").required(),
1179
- bank_name: Joi.string().allow("").required(),
1180
- branch_name: Joi.string().allow("").required(),
1181
- ifsc_code: Joi.string().allow("").required(),
1114
+ cards: PaymentApplicationModel.CardPaymentGateway().required(),
1115
+ success: Joi.boolean().required(),
1116
+ message: Joi.string().allow("").required(),
1182
1117
  });
1183
1118
  }
1184
1119
 
1185
- /** @returns {BeneficiaryModeDetails} */
1186
- static BeneficiaryModeDetails() {
1120
+ /** @returns {Card} */
1121
+ static Card() {
1187
1122
  return Joi.object({
1188
- account_holder: Joi.string().allow("").required(),
1189
- account_no: Joi.string().allow("").required(),
1190
- address: Joi.string().allow(""),
1191
- bank_name: Joi.string().allow("").required(),
1192
- branch_name: Joi.string().allow("").required(),
1193
- comment: Joi.string().allow(""),
1194
- email: Joi.string().allow("").required(),
1195
- ifsc_code: Joi.string().allow("").required(),
1196
- mobile: Joi.string().allow("").required(),
1197
- vpa: Joi.string().allow("").allow(null),
1198
- wallet: Joi.string().allow("").allow(null),
1123
+ card_number: Joi.string().allow("").allow(null),
1124
+ card_name: Joi.string().allow("").allow(null),
1125
+ card_type: Joi.string().allow("").allow(null),
1126
+ card_brand_image: Joi.string().allow("").allow(null),
1127
+ card_reference: Joi.string().allow("").allow(null),
1128
+ card_issuer: Joi.string().allow("").allow(null),
1129
+ card_brand: Joi.string().allow("").allow(null),
1130
+ expired: Joi.boolean().allow(null),
1131
+ compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
1132
+ card_isin: Joi.string().allow("").allow(null),
1133
+ exp_year: Joi.number().allow(null),
1134
+ nickname: Joi.string().allow("").allow(null),
1135
+ aggregator_name: Joi.string().allow("").required(),
1136
+ card_fingerprint: Joi.string().allow("").allow(null),
1137
+ card_token: Joi.string().allow("").allow(null),
1138
+ exp_month: Joi.number().allow(null),
1139
+ card_id: Joi.string().allow("").allow(null),
1199
1140
  });
1200
1141
  }
1201
1142
 
1202
- /** @returns {BusinessDetails} */
1203
- static BusinessDetails() {
1143
+ /** @returns {ListCardsResponse} */
1144
+ static ListCardsResponse() {
1204
1145
  return Joi.object({
1205
- address: PaymentApplicationModel.KYCAddress(),
1206
- business_ownership_type: Joi.string().allow("").allow(null),
1207
- business_type: Joi.string().allow("").allow(null),
1208
- entity_type: Joi.string().allow("").allow(null),
1209
- fda: Joi.string().allow("").allow(null),
1210
- fssai: Joi.string().allow("").allow(null),
1211
- gstin: Joi.string().allow("").allow(null),
1212
- name: Joi.string().allow("").allow(null),
1213
- pan: Joi.string().allow("").allow(null),
1214
- shop_and_establishment: Joi.any(),
1215
- vintage: Joi.string().allow("").allow(null),
1146
+ data: Joi.array().items(PaymentApplicationModel.Card()),
1147
+ success: Joi.boolean().required(),
1148
+ message: Joi.string().allow("").required(),
1216
1149
  });
1217
1150
  }
1218
1151
 
1219
- /** @returns {CancelOrResendPaymentLinkRequest} */
1220
- static CancelOrResendPaymentLinkRequest() {
1152
+ /** @returns {DeletehCardRequest} */
1153
+ static DeletehCardRequest() {
1221
1154
  return Joi.object({
1222
- payment_link_id: Joi.string().allow("").required(),
1155
+ card_id: Joi.string().allow("").allow(null).required(),
1223
1156
  });
1224
1157
  }
1225
1158
 
1226
- /** @returns {CancelPaymentLinkResponse} */
1227
- static CancelPaymentLinkResponse() {
1159
+ /** @returns {DeleteCardsResponse} */
1160
+ static DeleteCardsResponse() {
1228
1161
  return Joi.object({
1229
- message: Joi.string().allow("").required(),
1230
- status_code: Joi.number().required(),
1231
1162
  success: Joi.boolean().required(),
1163
+ message: Joi.string().allow("").allow(null),
1232
1164
  });
1233
1165
  }
1234
1166
 
1235
- /** @returns {Card} */
1236
- static Card() {
1167
+ /** @returns {ValidateCustomerRequest} */
1168
+ static ValidateCustomerRequest() {
1237
1169
  return Joi.object({
1238
- aggregator_name: Joi.string().allow("").required(),
1239
- card_brand: Joi.string().allow("").allow(null),
1240
- card_brand_image: Joi.string().allow("").allow(null),
1241
- card_fingerprint: Joi.string().allow("").allow(null),
1242
- card_id: Joi.string().allow("").allow(null),
1243
- card_isin: Joi.string().allow("").allow(null),
1244
- card_issuer: Joi.string().allow("").allow(null),
1245
- card_name: Joi.string().allow("").allow(null),
1246
- card_number: Joi.string().allow("").allow(null),
1247
- card_reference: Joi.string().allow("").allow(null),
1248
- card_token: Joi.string().allow("").allow(null),
1249
- card_type: Joi.string().allow("").allow(null),
1250
- compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
1251
- exp_month: Joi.number().allow(null),
1252
- exp_year: Joi.number().allow(null),
1253
- expired: Joi.boolean().allow(null),
1254
- nickname: Joi.string().allow("").allow(null),
1170
+ aggregator: Joi.string().allow("").required(),
1171
+ transaction_amount_in_paise: Joi.number().required(),
1172
+ phone_number: Joi.string().allow("").required(),
1173
+ billing_address: Joi.any(),
1174
+ order_items: Joi.array().items(Joi.any()),
1175
+ payload: Joi.string().allow("").allow(null),
1176
+ merchant_params: Joi.any(),
1177
+ delivery_address: Joi.any(),
1255
1178
  });
1256
1179
  }
1257
1180
 
1258
- /** @returns {CardDetails} */
1259
- static CardDetails() {
1181
+ /** @returns {ValidateCustomerResponse} */
1182
+ static ValidateCustomerResponse() {
1260
1183
  return Joi.object({
1261
- bank: Joi.string().allow("").required(),
1262
- bank_code: Joi.string().allow("").allow(null).required(),
1263
- card_brand: Joi.string().allow("").required(),
1264
- card_exp_month: Joi.string().allow(""),
1265
- card_exp_year: Joi.string().allow(""),
1266
- card_object: Joi.string().allow("").required(),
1267
- card_sub_type: Joi.string().allow("").allow(null).required(),
1268
- card_token: Joi.string().allow(""),
1269
- country: Joi.string().allow("").required(),
1270
- extended_card_type: Joi.string().allow("").required(),
1271
- id: Joi.string().allow("").required(),
1272
- is_domestic_card: Joi.boolean().required(),
1273
- name_on_card: Joi.string().allow(""),
1274
- status: Joi.boolean().required(),
1275
- type: Joi.string().allow("").required(),
1276
- user: Joi.string().allow(""),
1184
+ data: Joi.any().required(),
1185
+ success: Joi.boolean().required(),
1186
+ message: Joi.string().allow("").required(),
1187
+ });
1188
+ }
1189
+
1190
+ /** @returns {ChargeCustomerRequest} */
1191
+ static ChargeCustomerRequest() {
1192
+ return Joi.object({
1193
+ verified: Joi.boolean().allow(null),
1194
+ aggregator: Joi.string().allow("").required(),
1195
+ order_id: Joi.string().allow("").required(),
1196
+ transaction_token: Joi.string().allow("").allow(null),
1197
+ amount: Joi.number().allow(null).required(),
1277
1198
  });
1278
1199
  }
1279
1200
 
1280
- /** @returns {CardDetailsResponse} */
1281
- static CardDetailsResponse() {
1201
+ /** @returns {ChargeCustomerResponse} */
1202
+ static ChargeCustomerResponse() {
1282
1203
  return Joi.object({
1283
- data: PaymentApplicationModel.CardDetails().required(),
1204
+ status: Joi.string().allow("").required(),
1205
+ cart_id: Joi.string().allow("").allow(null),
1284
1206
  success: Joi.boolean().required(),
1207
+ aggregator: Joi.string().allow("").required(),
1208
+ message: Joi.string().allow("").required(),
1209
+ order_id: Joi.string().allow("").required(),
1210
+ delivery_address_id: Joi.string().allow("").allow(null),
1285
1211
  });
1286
1212
  }
1287
1213
 
1288
- /** @returns {CardPaymentGateway} */
1289
- static CardPaymentGateway() {
1214
+ /** @returns {PaymentInitializationRequest} */
1215
+ static PaymentInitializationRequest() {
1290
1216
  return Joi.object({
1217
+ razorpay_payment_id: Joi.string().allow("").allow(null),
1218
+ method: Joi.string().allow("").required(),
1219
+ device_id: Joi.string().allow("").allow(null),
1291
1220
  aggregator: Joi.string().allow("").required(),
1292
- api: Joi.string().allow("").allow(null),
1293
- customer_id: Joi.string().allow("").allow(null),
1221
+ customer_id: Joi.string().allow("").required(),
1222
+ contact: Joi.string().allow("").required(),
1223
+ merchant_order_id: Joi.string().allow("").required(),
1224
+ vpa: Joi.string().allow("").allow(null),
1225
+ order_id: Joi.string().allow("").required(),
1226
+ currency: Joi.string().allow("").required(),
1227
+ timeout: Joi.number().allow(null),
1228
+ amount: Joi.number().allow(null).required(),
1229
+ email: Joi.string().allow("").required(),
1294
1230
  });
1295
1231
  }
1296
1232
 
1297
- /** @returns {ChargeCustomerRequest} */
1298
- static ChargeCustomerRequest() {
1233
+ /** @returns {PaymentInitializationResponse} */
1234
+ static PaymentInitializationResponse() {
1299
1235
  return Joi.object({
1236
+ status: Joi.string().allow(""),
1237
+ razorpay_payment_id: Joi.string().allow("").allow(null),
1238
+ aggregator_order_id: Joi.string().allow(""),
1239
+ method: Joi.string().allow("").required(),
1240
+ success: Joi.boolean().required(),
1241
+ upi_poll_url: Joi.string().allow("").allow(null),
1242
+ virtual_id: Joi.string().allow("").allow(null),
1243
+ device_id: Joi.string().allow("").allow(null),
1244
+ polling_url: Joi.string().allow("").required(),
1300
1245
  aggregator: Joi.string().allow("").required(),
1301
- amount: Joi.number().allow(null).required(),
1302
- order_id: Joi.string().allow("").required(),
1303
- transaction_token: Joi.string().allow("").allow(null),
1304
- verified: Joi.boolean().allow(null),
1246
+ merchant_order_id: Joi.string().allow("").required(),
1247
+ customer_id: Joi.string().allow("").allow(null),
1248
+ vpa: Joi.string().allow("").allow(null),
1249
+ currency: Joi.string().allow("").allow(null),
1250
+ timeout: Joi.number().allow(null),
1251
+ amount: Joi.number().allow(null),
1252
+ bqr_image: Joi.string().allow("").allow(null),
1305
1253
  });
1306
1254
  }
1307
1255
 
1308
- /** @returns {ChargeCustomerResponse} */
1309
- static ChargeCustomerResponse() {
1256
+ /** @returns {PaymentStatusUpdateRequest} */
1257
+ static PaymentStatusUpdateRequest() {
1310
1258
  return Joi.object({
1259
+ status: Joi.string().allow("").required(),
1260
+ merchant_transaction_id: Joi.string().allow("").required(),
1261
+ method: Joi.string().allow("").required(),
1262
+ device_id: Joi.string().allow("").allow(null),
1311
1263
  aggregator: Joi.string().allow("").required(),
1312
- cart_id: Joi.string().allow("").allow(null),
1313
- delivery_address_id: Joi.string().allow("").allow(null),
1314
- message: Joi.string().allow("").required(),
1264
+ customer_id: Joi.string().allow("").required(),
1265
+ contact: Joi.string().allow("").required(),
1266
+ merchant_order_id: Joi.string().allow("").required(),
1267
+ vpa: Joi.string().allow(""),
1315
1268
  order_id: Joi.string().allow("").required(),
1269
+ currency: Joi.string().allow("").required(),
1270
+ amount: Joi.number().allow(null).required(),
1271
+ email: Joi.string().allow("").required(),
1272
+ });
1273
+ }
1274
+
1275
+ /** @returns {PaymentStatusUpdateResponse} */
1276
+ static PaymentStatusUpdateResponse() {
1277
+ return Joi.object({
1316
1278
  status: Joi.string().allow("").required(),
1317
- success: Joi.boolean().required(),
1279
+ success: Joi.boolean().allow(null),
1280
+ retry: Joi.boolean().required(),
1281
+ redirect_url: Joi.string().allow("").allow(null),
1282
+ aggregator_name: Joi.string().allow("").required(),
1318
1283
  });
1319
1284
  }
1320
1285
 
1321
- /** @returns {CheckCreditResponse} */
1322
- static CheckCreditResponse() {
1286
+ /** @returns {IntentAppErrorList} */
1287
+ static IntentAppErrorList() {
1323
1288
  return Joi.object({
1324
- data: PaymentApplicationModel.CreditDetail().required(),
1325
- success: Joi.boolean().required(),
1289
+ code: Joi.string().allow("").allow(null),
1290
+ package_name: Joi.string().allow("").allow(null),
1326
1291
  });
1327
1292
  }
1328
1293
 
1329
- /** @returns {CreateOrderUserData} */
1330
- static CreateOrderUserData() {
1294
+ /** @returns {PaymentModeLogo} */
1295
+ static PaymentModeLogo() {
1331
1296
  return Joi.object({
1332
- aggregator: Joi.string().allow("").allow(null),
1333
- amount: Joi.number().allow(null),
1334
- callback_url: Joi.string().allow("").allow(null),
1335
- contact: Joi.string().allow("").allow(null),
1336
- currency: Joi.string().allow("").allow(null),
1337
- customer_id: Joi.string().allow("").allow(null),
1338
- email: Joi.string().allow("").allow(null),
1339
- merchant_order_id: Joi.string().allow("").allow(null),
1340
- method: Joi.string().allow("").allow(null),
1341
- order_id: Joi.string().allow("").allow(null),
1297
+ large: Joi.string().allow("").required(),
1298
+ small: Joi.string().allow("").required(),
1342
1299
  });
1343
1300
  }
1344
1301
 
1345
- /** @returns {CreateOrderUserPaymentMethods} */
1346
- static CreateOrderUserPaymentMethods() {
1302
+ /** @returns {IntentApp} */
1303
+ static IntentApp() {
1347
1304
  return Joi.object({
1348
- meta: PaymentApplicationModel.PaymentMethodsMeta().required(),
1349
- mode: Joi.string().allow("").required(),
1350
- name: Joi.string().allow("").required(),
1305
+ code: Joi.string().allow("").allow(null),
1306
+ package_name: Joi.string().allow("").allow(null),
1307
+ logos: PaymentApplicationModel.PaymentModeLogo(),
1308
+ display_name: Joi.string().allow("").allow(null),
1351
1309
  });
1352
1310
  }
1353
1311
 
1354
- /** @returns {CreateOrderUserRequest} */
1355
- static CreateOrderUserRequest() {
1312
+ /** @returns {PaymentModeList} */
1313
+ static PaymentModeList() {
1356
1314
  return Joi.object({
1357
- currency: Joi.string().allow("").required(),
1358
- failure_callback_url: Joi.string().allow("").required(),
1315
+ card_number: Joi.string().allow("").allow(null),
1316
+ merchant_code: Joi.string().allow("").allow(null),
1317
+ card_reference: Joi.string().allow("").allow(null),
1318
+ card_issuer: Joi.string().allow("").allow(null),
1319
+ compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
1320
+ code: Joi.string().allow("").allow(null),
1321
+ cod_limit: Joi.number().allow(null),
1322
+ intent_flow: Joi.boolean().allow(null),
1323
+ fynd_vpa: Joi.string().allow("").allow(null),
1324
+ intent_app_error_dict_list: Joi.array().items(
1325
+ PaymentApplicationModel.IntentAppErrorList()
1326
+ ),
1327
+ aggregator_name: Joi.string().allow("").required(),
1328
+ card_fingerprint: Joi.string().allow("").allow(null),
1329
+ intent_app_error_list: Joi.array().items(Joi.string().allow("")),
1330
+ intent_app: Joi.array().items(PaymentApplicationModel.IntentApp()),
1331
+ expired: Joi.boolean().allow(null),
1332
+ retry_count: Joi.number().allow(null),
1333
+ exp_year: Joi.number().allow(null),
1334
+ exp_month: Joi.number().allow(null),
1335
+ card_id: Joi.string().allow("").allow(null),
1336
+ remaining_limit: Joi.number().allow(null),
1337
+ display_priority: Joi.number().allow(null),
1338
+ card_brand: Joi.string().allow("").allow(null),
1339
+ cod_limit_per_order: Joi.number().allow(null),
1340
+ logo_url: PaymentApplicationModel.PaymentModeLogo(),
1341
+ nickname: Joi.string().allow("").allow(null),
1342
+ card_name: Joi.string().allow("").allow(null),
1343
+ card_type: Joi.string().allow("").allow(null),
1344
+ card_brand_image: Joi.string().allow("").allow(null),
1345
+ display_name: Joi.string().allow("").allow(null),
1346
+ card_isin: Joi.string().allow("").allow(null),
1347
+ timeout: Joi.number().allow(null),
1348
+ card_token: Joi.string().allow("").allow(null),
1349
+ name: Joi.string().allow("").allow(null),
1359
1350
  meta: Joi.any().allow(null),
1360
- payment_link_id: Joi.string().allow("").required(),
1361
- payment_methods: PaymentApplicationModel.CreateOrderUserPaymentMethods().required(),
1362
- success_callback_url: Joi.string().allow("").required(),
1363
1351
  });
1364
1352
  }
1365
1353
 
1366
- /** @returns {CreateOrderUserResponse} */
1367
- static CreateOrderUserResponse() {
1354
+ /** @returns {RootPaymentMode} */
1355
+ static RootPaymentMode() {
1368
1356
  return Joi.object({
1369
- callback_url: Joi.string().allow("").allow(null),
1370
- data: PaymentApplicationModel.CreateOrderUserData(),
1371
- message: Joi.string().allow("").required(),
1372
- order_id: Joi.string().allow("").allow(null),
1373
- payment_confirm_url: Joi.string().allow("").allow(null),
1374
- status_code: Joi.number().required(),
1375
- success: Joi.boolean().required(),
1357
+ is_pay_by_card_pl: Joi.boolean().allow(null),
1358
+ add_card_enabled: Joi.boolean().allow(null),
1359
+ display_priority: Joi.number().required(),
1360
+ display_name: Joi.string().allow("").required(),
1361
+ list: Joi.array().items(PaymentApplicationModel.PaymentModeList()),
1362
+ save_card: Joi.boolean().allow(null),
1363
+ aggregator_name: Joi.string().allow("").allow(null),
1364
+ name: Joi.string().allow("").required(),
1365
+ anonymous_enable: Joi.boolean().allow(null),
1376
1366
  });
1377
1367
  }
1378
1368
 
1379
- /** @returns {CreatePaymentLinkMeta} */
1380
- static CreatePaymentLinkMeta() {
1369
+ /** @returns {AggregatorRoute} */
1370
+ static AggregatorRoute() {
1381
1371
  return Joi.object({
1382
- amount: Joi.string().allow("").required(),
1383
- assign_card_id: Joi.string().allow("").allow(null),
1384
- cart_id: Joi.string().allow("").required(),
1385
- checkout_mode: Joi.string().allow("").required(),
1372
+ data: Joi.any().allow(null),
1373
+ payment_flow_data: Joi.string().allow("").allow(null),
1374
+ payment_flow: Joi.string().allow("").allow(null),
1375
+ api_link: Joi.string().allow("").allow(null),
1386
1376
  });
1387
1377
  }
1388
1378
 
1389
- /** @returns {CreatePaymentLinkRequest} */
1390
- static CreatePaymentLinkRequest() {
1379
+ /** @returns {PaymentDefaultSelection} */
1380
+ static PaymentDefaultSelection() {
1391
1381
  return Joi.object({
1392
- amount: Joi.number().required(),
1393
- description: Joi.string().allow("").allow(null),
1394
- email: Joi.string().allow("").required(),
1395
- external_order_id: Joi.string().allow("").required(),
1396
- meta: PaymentApplicationModel.CreatePaymentLinkMeta().required(),
1397
- mobile_number: Joi.string().allow("").required(),
1382
+ mode: Joi.string().allow("").allow(null),
1383
+ identifier: Joi.string().allow("").allow(null),
1384
+ skip: Joi.boolean().allow(null),
1398
1385
  });
1399
1386
  }
1400
1387
 
1401
- /** @returns {CreatePaymentLinkResponse} */
1402
- static CreatePaymentLinkResponse() {
1388
+ /** @returns {PaymentFlow} */
1389
+ static PaymentFlow() {
1403
1390
  return Joi.object({
1404
- message: Joi.string().allow("").required(),
1405
- payment_link_id: Joi.string().allow("").allow(null),
1406
- payment_link_url: Joi.string().allow("").allow(null),
1407
- polling_timeout: Joi.number().allow(null),
1408
- status_code: Joi.number().required(),
1409
- success: Joi.boolean().required(),
1391
+ bqr_razorpay: PaymentApplicationModel.AggregatorRoute(),
1392
+ fynd: PaymentApplicationModel.AggregatorRoute(),
1393
+ epaylater: PaymentApplicationModel.AggregatorRoute(),
1394
+ razorpay: PaymentApplicationModel.AggregatorRoute(),
1395
+ juspay: PaymentApplicationModel.AggregatorRoute(),
1396
+ ajiodhan: PaymentApplicationModel.AggregatorRoute(),
1397
+ simpl: PaymentApplicationModel.AggregatorRoute(),
1398
+ rupifi: PaymentApplicationModel.AggregatorRoute(),
1399
+ mswipe: PaymentApplicationModel.AggregatorRoute(),
1400
+ stripe: PaymentApplicationModel.AggregatorRoute(),
1401
+ ccavenue: PaymentApplicationModel.AggregatorRoute(),
1402
+ payubiz: PaymentApplicationModel.AggregatorRoute(),
1403
+ jiopay: PaymentApplicationModel.AggregatorRoute(),
1404
+ upi_razorpay: PaymentApplicationModel.AggregatorRoute(),
1405
+ });
1406
+ }
1407
+
1408
+ /** @returns {PaymentOptionAndFlow} */
1409
+ static PaymentOptionAndFlow() {
1410
+ return Joi.object({
1411
+ payment_option: PaymentApplicationModel.RootPaymentMode().required(),
1412
+ payment_flows: PaymentApplicationModel.PaymentFlow().required(),
1413
+ payment_default_selection: PaymentApplicationModel.PaymentDefaultSelection(),
1414
+ });
1415
+ }
1416
+
1417
+ /** @returns {AdvanceObject} */
1418
+ static AdvanceObject() {
1419
+ return Joi.object({
1420
+ is_active: Joi.boolean().allow(null),
1421
+ amount: Joi.number(),
1422
+ time_unit: Joi.string().allow("").allow(null),
1423
+ description: Joi.string().allow("").allow(null),
1424
+ display_name: Joi.string().allow("").allow(null),
1425
+ prepayment_type: Joi.string().allow("").allow(null),
1426
+ prepayment_value: Joi.number().allow(null),
1427
+ cancellation_type: Joi.string().allow("").allow(null),
1428
+ refund_time_limit: Joi.number().allow(null),
1429
+ all_prepayment_type: Joi.array().items(
1430
+ Joi.string().allow("").allow(null)
1431
+ ),
1432
+ allow_custom_advance_amount: Joi.boolean().allow(null),
1433
+ });
1434
+ }
1435
+
1436
+ /** @returns {SplitObject} */
1437
+ static SplitObject() {
1438
+ return Joi.object({
1439
+ total_number_of_splits: Joi.number().allow(null),
1440
+ splits_remaining: Joi.number().allow(null),
1441
+ amount_remaining: Joi.number().allow(null),
1410
1442
  });
1411
1443
  }
1412
1444
 
1413
- /** @returns {CreditDetail} */
1414
- static CreditDetail() {
1445
+ /** @returns {AdvancePaymentObject} */
1446
+ static AdvancePaymentObject() {
1415
1447
  return Joi.object({
1416
- is_registered: Joi.boolean().required(),
1417
- signup_url: Joi.string().allow("").required(),
1418
- status: Joi.boolean().required(),
1448
+ name: Joi.string().allow("").allow(null),
1449
+ display_priority: Joi.number().allow(null),
1450
+ payment_mode_id: Joi.number().allow(null),
1451
+ display_name: Joi.string().allow("").allow(null),
1452
+ list: Joi.array().items(PaymentApplicationModel.PaymentModeList()),
1453
+ split: PaymentApplicationModel.SplitObject(),
1454
+ advance: PaymentApplicationModel.AdvanceObject(),
1419
1455
  });
1420
1456
  }
1421
1457
 
1422
- /** @returns {CreditSummary} */
1423
- static CreditSummary() {
1458
+ /** @returns {PaymentModeRouteResponse} */
1459
+ static PaymentModeRouteResponse() {
1424
1460
  return Joi.object({
1425
- activation_url: Joi.string().allow("").allow(null),
1426
- amount_available: PaymentApplicationModel.BalanceDetails(),
1427
- balance: PaymentApplicationModel.BalanceDetails(),
1428
- buyer_status: Joi.string().allow("").allow(null),
1429
- credit_line_id: Joi.string().allow("").allow(null),
1430
- due_amount: PaymentApplicationModel.BalanceDetails(),
1431
- due_date: Joi.string().allow("").allow(null),
1432
- is_eligible_for_txn: Joi.boolean().allow(null),
1433
- limit: PaymentApplicationModel.BalanceDetails(),
1434
- merchant_customer_ref_id: Joi.string().allow("").allow(null),
1435
- repayment_url: Joi.string().allow("").allow(null),
1436
- soa_url: Joi.string().allow("").allow(null),
1437
- status: Joi.string().allow("").allow(null),
1438
- status_message: Joi.string().allow("").allow(null),
1439
- total_due_amount: PaymentApplicationModel.BalanceDetails(),
1461
+ payment_options: PaymentApplicationModel.PaymentOptionAndFlow().required(),
1462
+ success: Joi.boolean().required(),
1463
+ payment_breakup: Joi.any(),
1464
+ advance_payment: Joi.array().items(
1465
+ PaymentApplicationModel.AdvancePaymentObject()
1466
+ ),
1440
1467
  });
1441
1468
  }
1442
1469
 
1443
- /** @returns {CustomerCreditSummaryResponse} */
1444
- static CustomerCreditSummaryResponse() {
1470
+ /** @returns {WalletLinkRequestSchema} */
1471
+ static WalletLinkRequestSchema() {
1445
1472
  return Joi.object({
1446
- data: PaymentApplicationModel.CreditSummary(),
1447
- success: Joi.boolean().required(),
1473
+ aggregator: Joi.string().allow("").required(),
1474
+ mobile: Joi.string().allow("").required(),
1475
+ wallet_code: Joi.string().allow("").required(),
1448
1476
  });
1449
1477
  }
1450
1478
 
1451
- /** @returns {CustomerOnboardingRequest} */
1452
- static CustomerOnboardingRequest() {
1479
+ /** @returns {WalletVerifyRequestSchema} */
1480
+ static WalletVerifyRequestSchema() {
1453
1481
  return Joi.object({
1454
1482
  aggregator: Joi.string().allow("").required(),
1455
- business_info: PaymentApplicationModel.BusinessDetails(),
1456
- device: PaymentApplicationModel.DeviceDetails(),
1457
- marketplace_info: PaymentApplicationModel.MarketplaceInfo(),
1458
- mcc: Joi.string().allow("").allow(null),
1459
- personal_info: PaymentApplicationModel.UserPersonalInfoInDetails(),
1460
- source: Joi.string().allow("").required(),
1483
+ link_token: Joi.string().allow("").required(),
1484
+ otp: Joi.number().required(),
1461
1485
  });
1462
1486
  }
1463
1487
 
1464
- /** @returns {CustomerOnboardingResponse} */
1465
- static CustomerOnboardingResponse() {
1488
+ /** @returns {WalletDelinkRequestSchema} */
1489
+ static WalletDelinkRequestSchema() {
1466
1490
  return Joi.object({
1467
- data: PaymentApplicationModel.OnboardSummary().required(),
1468
- success: Joi.boolean().required(),
1491
+ aggregator: Joi.string().allow("").required(),
1492
+ wallet_code: Joi.string().allow("").required(),
1469
1493
  });
1470
1494
  }
1471
1495
 
1472
- /** @returns {DeleteCardsResponse} */
1473
- static DeleteCardsResponse() {
1496
+ /** @returns {WalletResponseSchema} */
1497
+ static WalletResponseSchema() {
1474
1498
  return Joi.object({
1475
- message: Joi.string().allow("").allow(null),
1499
+ data: Joi.any().required(),
1476
1500
  success: Joi.boolean().required(),
1477
1501
  });
1478
1502
  }
1479
1503
 
1480
- /** @returns {DeletehCardRequest} */
1481
- static DeletehCardRequest() {
1504
+ /** @returns {RupifiBannerData} */
1505
+ static RupifiBannerData() {
1482
1506
  return Joi.object({
1483
- card_id: Joi.string().allow("").allow(null).required(),
1507
+ status: Joi.string().allow(""),
1508
+ kyc_url: Joi.string().allow(""),
1484
1509
  });
1485
1510
  }
1486
1511
 
1487
- /** @returns {DeviceDetails} */
1488
- static DeviceDetails() {
1512
+ /** @returns {RupifiBannerResponse} */
1513
+ static RupifiBannerResponse() {
1489
1514
  return Joi.object({
1490
- device_make: Joi.string().allow("").allow(null),
1491
- device_model: Joi.string().allow("").allow(null),
1492
- device_type: Joi.string().allow("").allow(null),
1493
- identification_number: Joi.string().allow("").allow(null),
1494
- identifier_type: Joi.string().allow("").allow(null),
1495
- os: Joi.string().allow("").allow(null),
1496
- os_version: Joi.string().allow("").allow(null),
1515
+ data: PaymentApplicationModel.RupifiBannerData().required(),
1516
+ success: Joi.boolean().required(),
1497
1517
  });
1498
1518
  }
1499
1519
 
1500
1520
  /** @returns {EpaylaterBannerData} */
1501
1521
  static EpaylaterBannerData() {
1502
1522
  return Joi.object({
1503
- display: Joi.boolean().required(),
1504
- message: Joi.string().allow(""),
1505
1523
  status: Joi.string().allow(""),
1524
+ message: Joi.string().allow(""),
1525
+ display: Joi.boolean().required(),
1506
1526
  });
1507
1527
  }
1508
1528
 
@@ -1514,754 +1534,755 @@ class PaymentApplicationModel {
1514
1534
  });
1515
1535
  }
1516
1536
 
1517
- /** @returns {ErrorCodeAndDescription} */
1518
- static ErrorCodeAndDescription() {
1537
+ /** @returns {ResendOrCancelPaymentRequest} */
1538
+ static ResendOrCancelPaymentRequest() {
1519
1539
  return Joi.object({
1520
- code: Joi.string().allow("").required(),
1521
- description: Joi.string().allow("").required(),
1540
+ order_id: Joi.string().allow("").required(),
1541
+ device_id: Joi.string().allow("").allow(null),
1542
+ request_type: Joi.string().allow("").required(),
1522
1543
  });
1523
1544
  }
1524
1545
 
1525
- /** @returns {ErrorCodeDescription} */
1526
- static ErrorCodeDescription() {
1546
+ /** @returns {LinkStatus} */
1547
+ static LinkStatus() {
1527
1548
  return Joi.object({
1528
- code: Joi.string().allow("").required(),
1529
- description: Joi.string().allow("").required(),
1530
- success: Joi.boolean().required(),
1549
+ status: Joi.boolean().required(),
1550
+ message: Joi.string().allow("").required(),
1531
1551
  });
1532
1552
  }
1533
1553
 
1534
- /** @returns {ErrorDescription} */
1535
- static ErrorDescription() {
1554
+ /** @returns {ResendOrCancelPaymentResponse} */
1555
+ static ResendOrCancelPaymentResponse() {
1536
1556
  return Joi.object({
1537
- amount: Joi.number().allow(null),
1538
- cancelled: Joi.boolean().allow(null),
1539
- expired: Joi.boolean().allow(null),
1540
- invalid_id: Joi.boolean().allow(null),
1541
- merchant_name: Joi.string().allow("").allow(null),
1542
- merchant_order_id: Joi.string().allow("").allow(null),
1543
- msg: Joi.string().allow("").allow(null),
1544
- payment_transaction_id: Joi.string().allow("").allow(null),
1557
+ data: PaymentApplicationModel.LinkStatus().required(),
1558
+ success: Joi.boolean().required(),
1545
1559
  });
1546
1560
  }
1547
1561
 
1548
- /** @returns {ErrorResponse} */
1549
- static ErrorResponse() {
1562
+ /** @returns {renderHTMLRequest} */
1563
+ static renderHTMLRequest() {
1550
1564
  return Joi.object({
1551
- error: PaymentApplicationModel.ErrorDescription(),
1552
- message: Joi.string().allow("").required(),
1553
- status_code: Joi.number().required(),
1554
- success: Joi.boolean().required(),
1565
+ returntype: Joi.string().allow("").allow(null),
1566
+ base64_html: Joi.string().allow("").required(),
1555
1567
  });
1556
1568
  }
1557
1569
 
1558
- /** @returns {GetPaymentLinkResponse} */
1559
- static GetPaymentLinkResponse() {
1570
+ /** @returns {renderHTMLResponse} */
1571
+ static renderHTMLResponse() {
1560
1572
  return Joi.object({
1561
- amount: Joi.number().allow(null),
1562
- external_order_id: Joi.string().allow("").allow(null),
1563
- merchant_name: Joi.string().allow("").allow(null),
1564
- message: Joi.string().allow("").required(),
1565
- payment_link_current_status: Joi.string().allow("").allow(null),
1566
- payment_link_url: Joi.string().allow("").allow(null),
1567
- polling_timeout: Joi.number().allow(null),
1568
- status_code: Joi.number().required(),
1569
- success: Joi.boolean().required(),
1573
+ html: Joi.string().allow("").required(),
1570
1574
  });
1571
1575
  }
1572
1576
 
1573
- /** @returns {HttpErrorCodeAndResponse} */
1574
- static HttpErrorCodeAndResponse() {
1577
+ /** @returns {ValidateVPARequest} */
1578
+ static ValidateVPARequest() {
1575
1579
  return Joi.object({
1576
- error: PaymentApplicationModel.ErrorCodeAndDescription(),
1577
- success: Joi.boolean().required(),
1580
+ upi_vpa: Joi.string().allow("").required(),
1581
+ aggregator: Joi.string().allow(""),
1578
1582
  });
1579
1583
  }
1580
1584
 
1581
- /** @returns {IfscCodeResponse} */
1582
- static IfscCodeResponse() {
1585
+ /** @returns {ValidateUPI} */
1586
+ static ValidateUPI() {
1583
1587
  return Joi.object({
1584
- bank_name: Joi.string().allow("").required(),
1585
- branch_name: Joi.string().allow("").required(),
1586
- success: Joi.boolean(),
1588
+ status: Joi.string().allow("").required(),
1589
+ customer_name: Joi.string().allow("").required(),
1590
+ is_valid: Joi.boolean().required(),
1591
+ upi_vpa: Joi.string().allow("").required(),
1587
1592
  });
1588
1593
  }
1589
1594
 
1590
- /** @returns {IntentApp} */
1591
- static IntentApp() {
1595
+ /** @returns {ValidateVPAResponse} */
1596
+ static ValidateVPAResponse() {
1592
1597
  return Joi.object({
1593
- code: Joi.string().allow("").allow(null),
1594
- display_name: Joi.string().allow("").allow(null),
1595
- logos: PaymentApplicationModel.PaymentModeLogo(),
1596
- package_name: Joi.string().allow("").allow(null),
1598
+ data: PaymentApplicationModel.ValidateUPI().required(),
1599
+ success: Joi.boolean().required(),
1597
1600
  });
1598
1601
  }
1599
1602
 
1600
- /** @returns {IntentAppErrorList} */
1601
- static IntentAppErrorList() {
1603
+ /** @returns {CardDetails} */
1604
+ static CardDetails() {
1602
1605
  return Joi.object({
1603
- code: Joi.string().allow("").allow(null),
1604
- package_name: Joi.string().allow("").allow(null),
1606
+ status: Joi.boolean().required(),
1607
+ country: Joi.string().allow("").required(),
1608
+ bank_code: Joi.string().allow("").allow(null).required(),
1609
+ id: Joi.string().allow("").required(),
1610
+ card_exp_year: Joi.string().allow(""),
1611
+ card_brand: Joi.string().allow("").required(),
1612
+ type: Joi.string().allow("").required(),
1613
+ card_sub_type: Joi.string().allow("").allow(null).required(),
1614
+ is_domestic_card: Joi.boolean().required(),
1615
+ name_on_card: Joi.string().allow(""),
1616
+ card_exp_month: Joi.string().allow(""),
1617
+ extended_card_type: Joi.string().allow("").required(),
1618
+ card_object: Joi.string().allow("").required(),
1619
+ card_token: Joi.string().allow(""),
1620
+ user: Joi.string().allow(""),
1621
+ bank: Joi.string().allow("").required(),
1605
1622
  });
1606
1623
  }
1607
1624
 
1608
- /** @returns {KYCAddress} */
1609
- static KYCAddress() {
1625
+ /** @returns {CardDetailsResponse} */
1626
+ static CardDetailsResponse() {
1610
1627
  return Joi.object({
1611
- addressline1: Joi.string().allow("").required(),
1612
- addressline2: Joi.string().allow("").allow(null),
1613
- city: Joi.string().allow("").required(),
1614
- land_mark: Joi.string().allow("").allow(null),
1615
- ownership_type: Joi.string().allow("").allow(null),
1616
- pincode: Joi.string().allow("").required(),
1617
- state: Joi.string().allow("").required(),
1628
+ data: PaymentApplicationModel.CardDetails().required(),
1629
+ success: Joi.boolean().required(),
1618
1630
  });
1619
1631
  }
1620
1632
 
1621
- /** @returns {LinkStatus} */
1622
- static LinkStatus() {
1633
+ /** @returns {TransferItemsDetails} */
1634
+ static TransferItemsDetails() {
1623
1635
  return Joi.object({
1624
- message: Joi.string().allow("").required(),
1625
- status: Joi.boolean().required(),
1636
+ id: Joi.number().required(),
1637
+ display_name: Joi.string().allow(""),
1638
+ logo_large: Joi.string().allow("").required(),
1639
+ logo_small: Joi.string().allow("").required(),
1640
+ name: Joi.string().allow("").required(),
1626
1641
  });
1627
1642
  }
1628
1643
 
1629
- /** @returns {ListCardsResponse} */
1630
- static ListCardsResponse() {
1644
+ /** @returns {TransferModeDetails} */
1645
+ static TransferModeDetails() {
1631
1646
  return Joi.object({
1632
- data: Joi.array().items(PaymentApplicationModel.Card()),
1633
- message: Joi.string().allow("").required(),
1634
- success: Joi.boolean().required(),
1647
+ items: Joi.array().items(PaymentApplicationModel.TransferItemsDetails()),
1648
+ display_name: Joi.string().allow("").required(),
1635
1649
  });
1636
1650
  }
1637
1651
 
1638
- /** @returns {MarketplaceInfo} */
1639
- static MarketplaceInfo() {
1652
+ /** @returns {TransferModeResponse} */
1653
+ static TransferModeResponse() {
1640
1654
  return Joi.object({
1641
- date_of_joining: Joi.string().allow("").allow(null),
1642
- membership_id: Joi.string().allow("").required(),
1643
- name: Joi.string().allow("").required(),
1655
+ data: Joi.array()
1656
+ .items(PaymentApplicationModel.TransferModeDetails())
1657
+ .required(),
1644
1658
  });
1645
1659
  }
1646
1660
 
1647
- /** @returns {NotFoundResourceError} */
1648
- static NotFoundResourceError() {
1661
+ /** @returns {UpdateRefundTransferModeRequest} */
1662
+ static UpdateRefundTransferModeRequest() {
1649
1663
  return Joi.object({
1650
- code: Joi.string().allow("").required(),
1651
- description: Joi.string().allow("").required(),
1652
- success: Joi.boolean().required(),
1664
+ enable: Joi.boolean().required(),
1665
+ transfer_mode: Joi.string().allow("").required(),
1653
1666
  });
1654
1667
  }
1655
1668
 
1656
- /** @returns {OnboardSummary} */
1657
- static OnboardSummary() {
1669
+ /** @returns {UpdateRefundTransferModeResponse} */
1670
+ static UpdateRefundTransferModeResponse() {
1658
1671
  return Joi.object({
1659
- activation_url: Joi.string().allow(""),
1660
- is_eligible_for_txn: Joi.boolean(),
1661
- merchant_customer_ref_id: Joi.string().allow(""),
1662
- redirect_url: Joi.string().allow(""),
1663
- session: Joi.any(),
1664
- status: Joi.boolean().required(),
1665
- status_remark: Joi.string().allow(""),
1672
+ success: Joi.boolean(),
1666
1673
  });
1667
1674
  }
1668
1675
 
1669
1676
  /** @returns {OrderBeneficiaryDetails} */
1670
1677
  static OrderBeneficiaryDetails() {
1671
1678
  return Joi.object({
1672
- account_holder: Joi.string().allow("").required(),
1679
+ modified_on: Joi.string().allow("").required(),
1673
1680
  account_no: Joi.string().allow("").required(),
1674
- address: Joi.string().allow("").required(),
1681
+ mobile: Joi.string().allow(""),
1675
1682
  bank_name: Joi.string().allow("").required(),
1683
+ ifsc_code: Joi.string().allow("").required(),
1684
+ is_active: Joi.boolean().required(),
1676
1685
  beneficiary_id: Joi.string().allow("").required(),
1677
- branch_name: Joi.string().allow(""),
1678
- comment: Joi.string().allow(""),
1679
- created_on: Joi.string().allow("").required(),
1680
- delights_user_name: Joi.string().allow("").allow(null),
1681
- display_name: Joi.string().allow("").required(),
1686
+ account_holder: Joi.string().allow("").required(),
1682
1687
  email: Joi.string().allow("").required(),
1688
+ delights_user_name: Joi.string().allow("").allow(null),
1683
1689
  id: Joi.number().required(),
1684
- ifsc_code: Joi.string().allow("").required(),
1685
- is_active: Joi.boolean().required(),
1686
- mobile: Joi.string().allow(""),
1687
- modified_on: Joi.string().allow("").required(),
1690
+ transfer_mode: Joi.string().allow("").required(),
1691
+ branch_name: Joi.string().allow(""),
1692
+ created_on: Joi.string().allow("").required(),
1688
1693
  subtitle: Joi.string().allow("").required(),
1694
+ comment: Joi.string().allow(""),
1695
+ address: Joi.string().allow("").required(),
1689
1696
  title: Joi.string().allow("").required(),
1690
- transfer_mode: Joi.string().allow("").required(),
1697
+ display_name: Joi.string().allow("").required(),
1691
1698
  });
1692
1699
  }
1693
1700
 
1694
1701
  /** @returns {OrderBeneficiaryResponse} */
1695
1702
  static OrderBeneficiaryResponse() {
1696
1703
  return Joi.object({
1704
+ show_beneficiary_details: Joi.boolean(),
1697
1705
  beneficiaries: Joi.array().items(
1698
1706
  PaymentApplicationModel.OrderBeneficiaryDetails()
1699
1707
  ),
1700
- show_beneficiary_details: Joi.boolean(),
1701
- });
1702
- }
1703
-
1704
- /** @returns {OutstandingOrderDetailsResponse} */
1705
- static OutstandingOrderDetailsResponse() {
1706
- return Joi.object({
1707
- data: Joi.array().items(Joi.any()),
1708
- message: Joi.string().allow("").allow(null),
1709
- status_code: Joi.number().required(),
1710
- success: Joi.boolean().required(),
1711
1708
  });
1712
1709
  }
1713
1710
 
1714
- /** @returns {PaidOrderDetailsResponse} */
1715
- static PaidOrderDetailsResponse() {
1711
+ /** @returns {NotFoundResourceError} */
1712
+ static NotFoundResourceError() {
1716
1713
  return Joi.object({
1717
- data: Joi.array().items(Joi.any()),
1718
- message: Joi.string().allow("").allow(null),
1719
- status_code: Joi.number().required(),
1714
+ code: Joi.string().allow("").required(),
1715
+ description: Joi.string().allow("").required(),
1720
1716
  success: Joi.boolean().required(),
1721
1717
  });
1722
1718
  }
1723
1719
 
1724
- /** @returns {PaymentFlow} */
1725
- static PaymentFlow() {
1726
- return Joi.object({
1727
- ajiodhan: PaymentApplicationModel.AggregatorRoute(),
1728
- bqr_razorpay: PaymentApplicationModel.AggregatorRoute(),
1729
- ccavenue: PaymentApplicationModel.AggregatorRoute(),
1730
- epaylater: PaymentApplicationModel.AggregatorRoute(),
1731
- fynd: PaymentApplicationModel.AggregatorRoute(),
1732
- jiopay: PaymentApplicationModel.AggregatorRoute(),
1733
- juspay: PaymentApplicationModel.AggregatorRoute(),
1734
- mswipe: PaymentApplicationModel.AggregatorRoute(),
1735
- payubiz: PaymentApplicationModel.AggregatorRoute(),
1736
- razorpay: PaymentApplicationModel.AggregatorRoute(),
1737
- rupifi: PaymentApplicationModel.AggregatorRoute(),
1738
- simpl: PaymentApplicationModel.AggregatorRoute(),
1739
- stripe: PaymentApplicationModel.AggregatorRoute(),
1740
- upi_razorpay: PaymentApplicationModel.AggregatorRoute(),
1741
- });
1742
- }
1743
-
1744
- /** @returns {PaymentInitializationRequest} */
1745
- static PaymentInitializationRequest() {
1720
+ /** @returns {IfscCodeResponse} */
1721
+ static IfscCodeResponse() {
1746
1722
  return Joi.object({
1747
- aggregator: Joi.string().allow("").required(),
1748
- amount: Joi.number().allow(null).required(),
1749
- contact: Joi.string().allow("").required(),
1750
- currency: Joi.string().allow("").required(),
1751
- customer_id: Joi.string().allow("").required(),
1752
- device_id: Joi.string().allow("").allow(null),
1753
- email: Joi.string().allow("").required(),
1754
- merchant_order_id: Joi.string().allow("").required(),
1755
- method: Joi.string().allow("").required(),
1756
- order_id: Joi.string().allow("").required(),
1757
- razorpay_payment_id: Joi.string().allow("").allow(null),
1758
- timeout: Joi.number().allow(null),
1759
- vpa: Joi.string().allow("").allow(null),
1723
+ branch_name: Joi.string().allow("").required(),
1724
+ success: Joi.boolean(),
1725
+ bank_name: Joi.string().allow("").required(),
1760
1726
  });
1761
1727
  }
1762
1728
 
1763
- /** @returns {PaymentInitializationResponse} */
1764
- static PaymentInitializationResponse() {
1729
+ /** @returns {ErrorCodeDescription} */
1730
+ static ErrorCodeDescription() {
1765
1731
  return Joi.object({
1766
- aggregator: Joi.string().allow("").required(),
1767
- aggregator_order_id: Joi.string().allow(""),
1768
- amount: Joi.number().allow(null),
1769
- bqr_image: Joi.string().allow("").allow(null),
1770
- currency: Joi.string().allow("").allow(null),
1771
- customer_id: Joi.string().allow("").allow(null),
1772
- device_id: Joi.string().allow("").allow(null),
1773
- merchant_order_id: Joi.string().allow("").required(),
1774
- method: Joi.string().allow("").required(),
1775
- polling_url: Joi.string().allow("").required(),
1776
- razorpay_payment_id: Joi.string().allow("").allow(null),
1777
- status: Joi.string().allow(""),
1732
+ code: Joi.string().allow("").required(),
1733
+ description: Joi.string().allow("").required(),
1778
1734
  success: Joi.boolean().required(),
1779
- timeout: Joi.number().allow(null),
1780
- upi_poll_url: Joi.string().allow("").allow(null),
1781
- virtual_id: Joi.string().allow("").allow(null),
1782
- vpa: Joi.string().allow("").allow(null),
1783
- });
1784
- }
1785
-
1786
- /** @returns {PaymentMethodsMeta} */
1787
- static PaymentMethodsMeta() {
1788
- return Joi.object({
1789
- merchant_code: Joi.string().allow("").required(),
1790
- payment_gateway: Joi.string().allow("").required(),
1791
- payment_identifier: Joi.string().allow("").required(),
1792
1735
  });
1793
1736
  }
1794
1737
 
1795
- /** @returns {PaymentMethodsMetaOrder} */
1796
- static PaymentMethodsMetaOrder() {
1738
+ /** @returns {AddBeneficiaryViaOtpVerificationRequest} */
1739
+ static AddBeneficiaryViaOtpVerificationRequest() {
1797
1740
  return Joi.object({
1798
- merchant_code: Joi.string().allow("").required(),
1799
- payment_gateway: Joi.string().allow("").required(),
1800
- payment_identifier: Joi.string().allow("").required(),
1741
+ request_id: Joi.string().allow("").required(),
1742
+ hash_key: Joi.string().allow("").required(),
1743
+ otp: Joi.string().allow("").required(),
1801
1744
  });
1802
1745
  }
1803
1746
 
1804
- /** @returns {PaymentModeList} */
1805
- static PaymentModeList() {
1747
+ /** @returns {AddBeneficiaryViaOtpVerificationResponse} */
1748
+ static AddBeneficiaryViaOtpVerificationResponse() {
1806
1749
  return Joi.object({
1807
- aggregator_name: Joi.string().allow("").required(),
1808
- card_brand: Joi.string().allow("").allow(null),
1809
- card_brand_image: Joi.string().allow("").allow(null),
1810
- card_fingerprint: Joi.string().allow("").allow(null),
1811
- card_id: Joi.string().allow("").allow(null),
1812
- card_isin: Joi.string().allow("").allow(null),
1813
- card_issuer: Joi.string().allow("").allow(null),
1814
- card_name: Joi.string().allow("").allow(null),
1815
- card_number: Joi.string().allow("").allow(null),
1816
- card_reference: Joi.string().allow("").allow(null),
1817
- card_token: Joi.string().allow("").allow(null),
1818
- card_type: Joi.string().allow("").allow(null),
1819
- cod_limit: Joi.number().allow(null),
1820
- cod_limit_per_order: Joi.number().allow(null),
1821
- code: Joi.string().allow("").allow(null),
1822
- compliant_with_tokenisation_guidelines: Joi.boolean().allow(null),
1823
- display_name: Joi.string().allow("").allow(null),
1824
- display_priority: Joi.number().allow(null),
1825
- exp_month: Joi.number().allow(null),
1826
- exp_year: Joi.number().allow(null),
1827
- expired: Joi.boolean().allow(null),
1828
- fynd_vpa: Joi.string().allow("").allow(null),
1829
- intent_app: Joi.array().items(PaymentApplicationModel.IntentApp()),
1830
- intent_app_error_dict_list: Joi.array().items(
1831
- PaymentApplicationModel.IntentAppErrorList()
1832
- ),
1833
- intent_app_error_list: Joi.array().items(Joi.string().allow("")),
1834
- intent_flow: Joi.boolean().allow(null),
1835
- logo_url: PaymentApplicationModel.PaymentModeLogo(),
1836
- merchant_code: Joi.string().allow("").allow(null),
1837
- meta: Joi.any().allow(null),
1838
- name: Joi.string().allow("").allow(null),
1839
- nickname: Joi.string().allow("").allow(null),
1840
- remaining_limit: Joi.number().allow(null),
1841
- retry_count: Joi.number().allow(null),
1842
- timeout: Joi.number().allow(null),
1750
+ success: Joi.boolean(),
1751
+ message: Joi.string().allow("").required(),
1843
1752
  });
1844
1753
  }
1845
1754
 
1846
- /** @returns {PaymentModeLogo} */
1847
- static PaymentModeLogo() {
1755
+ /** @returns {WrongOtpError} */
1756
+ static WrongOtpError() {
1848
1757
  return Joi.object({
1849
- large: Joi.string().allow("").required(),
1850
- small: Joi.string().allow("").required(),
1758
+ is_verified_flag: Joi.boolean().required(),
1759
+ description: Joi.string().allow("").required(),
1760
+ success: Joi.string().allow("").required(),
1851
1761
  });
1852
1762
  }
1853
1763
 
1854
- /** @returns {PaymentModeRouteResponse} */
1855
- static PaymentModeRouteResponse() {
1764
+ /** @returns {BeneficiaryModeDetails} */
1765
+ static BeneficiaryModeDetails() {
1856
1766
  return Joi.object({
1857
- advance_payment: Joi.array().items(
1858
- PaymentApplicationModel.AdvancePaymentObject()
1859
- ),
1860
- payment_breakup: Joi.any(),
1861
- payment_options: PaymentApplicationModel.PaymentOptionAndFlow().required(),
1862
- success: Joi.boolean().required(),
1767
+ account_no: Joi.string().allow("").required(),
1768
+ address: Joi.string().allow(""),
1769
+ mobile: Joi.string().allow("").required(),
1770
+ bank_name: Joi.string().allow("").required(),
1771
+ comment: Joi.string().allow(""),
1772
+ ifsc_code: Joi.string().allow("").required(),
1773
+ vpa: Joi.string().allow("").allow(null),
1774
+ branch_name: Joi.string().allow("").required(),
1775
+ account_holder: Joi.string().allow("").required(),
1776
+ wallet: Joi.string().allow("").allow(null),
1777
+ email: Joi.string().allow("").required(),
1863
1778
  });
1864
1779
  }
1865
1780
 
1866
- /** @returns {PaymentOptionAndFlow} */
1867
- static PaymentOptionAndFlow() {
1781
+ /** @returns {AddBeneficiaryDetailsRequest} */
1782
+ static AddBeneficiaryDetailsRequest() {
1868
1783
  return Joi.object({
1869
- payment_flows: PaymentApplicationModel.PaymentFlow().required(),
1870
- payment_option: PaymentApplicationModel.RootPaymentMode().required(),
1784
+ delights: Joi.boolean().required(),
1785
+ shipment_id: Joi.string().allow("").required(),
1786
+ details: PaymentApplicationModel.BeneficiaryModeDetails().required(),
1787
+ otp: Joi.string().allow(""),
1788
+ order_id: Joi.string().allow("").required(),
1789
+ transfer_mode: Joi.string().allow("").required(),
1790
+ request_id: Joi.string().allow(""),
1871
1791
  });
1872
1792
  }
1873
1793
 
1874
- /** @returns {PaymentOrderData} */
1875
- static PaymentOrderData() {
1794
+ /** @returns {RefundAccountResponse} */
1795
+ static RefundAccountResponse() {
1876
1796
  return Joi.object({
1877
- aggregator: Joi.string().allow("").allow(null),
1878
- amount: Joi.number().allow(null),
1879
- callback_url: Joi.string().allow("").allow(null),
1880
- contact: Joi.string().allow("").allow(null),
1881
- currency: Joi.string().allow("").allow(null),
1882
- customer_id: Joi.string().allow("").allow(null),
1883
- email: Joi.string().allow("").allow(null),
1884
- merchant_order_id: Joi.string().allow("").allow(null),
1885
- method: Joi.string().allow("").allow(null),
1886
- order_id: Joi.string().allow("").allow(null),
1797
+ is_verified_flag: Joi.boolean(),
1798
+ data: Joi.any(),
1799
+ success: Joi.boolean().required(),
1800
+ message: Joi.string().allow("").required(),
1887
1801
  });
1888
1802
  }
1889
1803
 
1890
- /** @returns {PaymentOrderMethods} */
1891
- static PaymentOrderMethods() {
1892
- return Joi.object({
1893
- amount: Joi.number().required(),
1894
- meta: PaymentApplicationModel.PaymentMethodsMetaOrder().required(),
1895
- mode: Joi.string().allow("").required(),
1896
- name: Joi.string().allow("").required(),
1897
- payment: Joi.string().allow(""),
1804
+ /** @returns {BankDetailsForOTP} */
1805
+ static BankDetailsForOTP() {
1806
+ return Joi.object({
1807
+ account_no: Joi.string().allow("").required(),
1808
+ bank_name: Joi.string().allow("").required(),
1809
+ ifsc_code: Joi.string().allow("").required(),
1810
+ branch_name: Joi.string().allow("").required(),
1811
+ account_holder: Joi.string().allow("").required(),
1898
1812
  });
1899
1813
  }
1900
1814
 
1901
- /** @returns {PaymentOrderRequest} */
1902
- static PaymentOrderRequest() {
1815
+ /** @returns {AddBeneficiaryDetailsOTPRequest} */
1816
+ static AddBeneficiaryDetailsOTPRequest() {
1903
1817
  return Joi.object({
1904
1818
  order_id: Joi.string().allow("").required(),
1905
- payment_methods: Joi.array().items(
1906
- PaymentApplicationModel.PaymentOrderMethods()
1907
- ),
1908
- shipment_id: Joi.string().allow(""),
1819
+ details: PaymentApplicationModel.BankDetailsForOTP().required(),
1909
1820
  });
1910
1821
  }
1911
1822
 
1912
- /** @returns {PaymentOrderResponse} */
1913
- static PaymentOrderResponse() {
1823
+ /** @returns {WalletOtpRequest} */
1824
+ static WalletOtpRequest() {
1914
1825
  return Joi.object({
1915
- callback_url: Joi.string().allow("").allow(null),
1916
- data: PaymentApplicationModel.PaymentOrderData(),
1917
- message: Joi.string().allow("").required(),
1918
- order_id: Joi.string().allow("").allow(null),
1919
- payment_confirm_url: Joi.string().allow("").allow(null),
1920
- status_code: Joi.number().required(),
1921
- success: Joi.boolean().required(),
1826
+ country_code: Joi.string().allow("").required(),
1827
+ mobile: Joi.string().allow("").required(),
1922
1828
  });
1923
1829
  }
1924
1830
 
1925
- /** @returns {PaymentStatusUpdateRequest} */
1926
- static PaymentStatusUpdateRequest() {
1831
+ /** @returns {WalletOtpResponse} */
1832
+ static WalletOtpResponse() {
1927
1833
  return Joi.object({
1928
- aggregator: Joi.string().allow("").required(),
1929
- amount: Joi.number().allow(null).required(),
1930
- contact: Joi.string().allow("").required(),
1931
- currency: Joi.string().allow("").required(),
1932
- customer_id: Joi.string().allow("").required(),
1933
- device_id: Joi.string().allow("").allow(null),
1934
- email: Joi.string().allow("").required(),
1935
- merchant_order_id: Joi.string().allow("").required(),
1936
- merchant_transaction_id: Joi.string().allow("").required(),
1937
- method: Joi.string().allow("").required(),
1938
- order_id: Joi.string().allow("").required(),
1939
- status: Joi.string().allow("").required(),
1940
- vpa: Joi.string().allow(""),
1834
+ request_id: Joi.string().allow("").required(),
1835
+ is_verified_flag: Joi.string().allow("").required(),
1836
+ success: Joi.boolean(),
1941
1837
  });
1942
1838
  }
1943
1839
 
1944
- /** @returns {PaymentStatusUpdateResponse} */
1945
- static PaymentStatusUpdateResponse() {
1840
+ /** @returns {SetDefaultBeneficiaryRequest} */
1841
+ static SetDefaultBeneficiaryRequest() {
1946
1842
  return Joi.object({
1947
- aggregator_name: Joi.string().allow("").required(),
1948
- redirect_url: Joi.string().allow("").allow(null),
1949
- retry: Joi.boolean().required(),
1950
- status: Joi.string().allow("").required(),
1951
- success: Joi.boolean().allow(null),
1843
+ order_id: Joi.string().allow("").required(),
1844
+ beneficiary_id: Joi.string().allow("").required(),
1952
1845
  });
1953
1846
  }
1954
1847
 
1955
- /** @returns {PollingPaymentLinkResponse} */
1956
- static PollingPaymentLinkResponse() {
1848
+ /** @returns {SetDefaultBeneficiaryResponse} */
1849
+ static SetDefaultBeneficiaryResponse() {
1957
1850
  return Joi.object({
1958
- aggregator_name: Joi.string().allow("").allow(null),
1959
- amount: Joi.number().allow(null),
1960
- http_status: Joi.number().allow(null),
1961
- message: Joi.string().allow("").allow(null),
1962
- order_id: Joi.string().allow("").allow(null),
1963
- payment_link_id: Joi.string().allow("").allow(null),
1964
- redirect_url: Joi.string().allow("").allow(null),
1965
- status: Joi.string().allow("").allow(null),
1966
- status_code: Joi.number().allow(null),
1967
- success: Joi.boolean().allow(null),
1851
+ is_beneficiary_set: Joi.boolean().required(),
1852
+ success: Joi.boolean(),
1968
1853
  });
1969
1854
  }
1970
1855
 
1971
- /** @returns {RedirectToAggregatorResponse} */
1972
- static RedirectToAggregatorResponse() {
1856
+ /** @returns {GetPaymentLinkResponse} */
1857
+ static GetPaymentLinkResponse() {
1973
1858
  return Joi.object({
1974
- data: PaymentApplicationModel.RedirectURL().required(),
1859
+ status_code: Joi.number().required(),
1860
+ payment_link_current_status: Joi.string().allow("").allow(null),
1975
1861
  success: Joi.boolean().required(),
1862
+ polling_timeout: Joi.number().allow(null),
1863
+ payment_link_url: Joi.string().allow("").allow(null),
1864
+ external_order_id: Joi.string().allow("").allow(null),
1865
+ message: Joi.string().allow("").required(),
1866
+ merchant_name: Joi.string().allow("").allow(null),
1867
+ amount: Joi.number().allow(null),
1976
1868
  });
1977
1869
  }
1978
1870
 
1979
- /** @returns {RedirectURL} */
1980
- static RedirectURL() {
1871
+ /** @returns {ErrorDescription} */
1872
+ static ErrorDescription() {
1981
1873
  return Joi.object({
1982
- signup_url: Joi.string().allow("").required(),
1983
- status: Joi.boolean().required(),
1874
+ payment_transaction_id: Joi.string().allow("").allow(null),
1875
+ expired: Joi.boolean().allow(null),
1876
+ merchant_order_id: Joi.string().allow("").allow(null),
1877
+ merchant_name: Joi.string().allow("").allow(null),
1878
+ msg: Joi.string().allow("").allow(null),
1879
+ cancelled: Joi.boolean().allow(null),
1880
+ amount: Joi.number().allow(null),
1881
+ invalid_id: Joi.boolean().allow(null),
1984
1882
  });
1985
1883
  }
1986
1884
 
1987
- /** @returns {RefundAccountResponse} */
1988
- static RefundAccountResponse() {
1885
+ /** @returns {ErrorResponse} */
1886
+ static ErrorResponse() {
1989
1887
  return Joi.object({
1990
- data: Joi.any(),
1991
- is_verified_flag: Joi.boolean(),
1888
+ status_code: Joi.number().required(),
1889
+ error: PaymentApplicationModel.ErrorDescription(),
1992
1890
  message: Joi.string().allow("").required(),
1993
1891
  success: Joi.boolean().required(),
1994
1892
  });
1995
1893
  }
1996
1894
 
1997
- /** @returns {renderHTMLRequest} */
1998
- static renderHTMLRequest() {
1895
+ /** @returns {CreatePaymentLinkMeta} */
1896
+ static CreatePaymentLinkMeta() {
1999
1897
  return Joi.object({
2000
- base64_html: Joi.string().allow("").required(),
2001
- returntype: Joi.string().allow("").allow(null),
1898
+ cart_id: Joi.string().allow("").required(),
1899
+ checkout_mode: Joi.string().allow("").required(),
1900
+ assign_card_id: Joi.string().allow("").allow(null),
1901
+ amount: Joi.string().allow("").required(),
2002
1902
  });
2003
1903
  }
2004
1904
 
2005
- /** @returns {renderHTMLResponse} */
2006
- static renderHTMLResponse() {
1905
+ /** @returns {CreatePaymentLinkRequest} */
1906
+ static CreatePaymentLinkRequest() {
2007
1907
  return Joi.object({
2008
- html: Joi.string().allow("").required(),
1908
+ description: Joi.string().allow("").allow(null),
1909
+ external_order_id: Joi.string().allow("").required(),
1910
+ mobile_number: Joi.string().allow("").required(),
1911
+ amount: Joi.number().required(),
1912
+ meta: PaymentApplicationModel.CreatePaymentLinkMeta().required(),
1913
+ email: Joi.string().allow("").required(),
2009
1914
  });
2010
1915
  }
2011
1916
 
2012
- /** @returns {ResendOrCancelPaymentRequest} */
2013
- static ResendOrCancelPaymentRequest() {
1917
+ /** @returns {CreatePaymentLinkResponse} */
1918
+ static CreatePaymentLinkResponse() {
2014
1919
  return Joi.object({
2015
- device_id: Joi.string().allow("").allow(null),
2016
- order_id: Joi.string().allow("").required(),
2017
- request_type: Joi.string().allow("").required(),
1920
+ status_code: Joi.number().required(),
1921
+ success: Joi.boolean().required(),
1922
+ polling_timeout: Joi.number().allow(null),
1923
+ payment_link_url: Joi.string().allow("").allow(null),
1924
+ message: Joi.string().allow("").required(),
1925
+ payment_link_id: Joi.string().allow("").allow(null),
2018
1926
  });
2019
1927
  }
2020
1928
 
2021
- /** @returns {ResendOrCancelPaymentResponse} */
2022
- static ResendOrCancelPaymentResponse() {
1929
+ /** @returns {CancelOrResendPaymentLinkRequest} */
1930
+ static CancelOrResendPaymentLinkRequest() {
2023
1931
  return Joi.object({
2024
- data: PaymentApplicationModel.LinkStatus().required(),
2025
- success: Joi.boolean().required(),
1932
+ payment_link_id: Joi.string().allow("").required(),
2026
1933
  });
2027
1934
  }
2028
1935
 
2029
1936
  /** @returns {ResendPaymentLinkResponse} */
2030
1937
  static ResendPaymentLinkResponse() {
2031
1938
  return Joi.object({
2032
- message: Joi.string().allow("").required(),
1939
+ status_code: Joi.number().required(),
2033
1940
  polling_timeout: Joi.number().allow(null),
1941
+ success: Joi.boolean().required(),
1942
+ message: Joi.string().allow("").required(),
1943
+ });
1944
+ }
1945
+
1946
+ /** @returns {CancelPaymentLinkResponse} */
1947
+ static CancelPaymentLinkResponse() {
1948
+ return Joi.object({
2034
1949
  status_code: Joi.number().required(),
2035
1950
  success: Joi.boolean().required(),
1951
+ message: Joi.string().allow("").required(),
2036
1952
  });
2037
1953
  }
2038
1954
 
2039
- /** @returns {RootPaymentMode} */
2040
- static RootPaymentMode() {
1955
+ /** @returns {PollingPaymentLinkResponse} */
1956
+ static PollingPaymentLinkResponse() {
2041
1957
  return Joi.object({
2042
- add_card_enabled: Joi.boolean().allow(null),
1958
+ status: Joi.string().allow("").allow(null),
1959
+ status_code: Joi.number().allow(null),
1960
+ success: Joi.boolean().allow(null),
1961
+ http_status: Joi.number().allow(null),
1962
+ message: Joi.string().allow("").allow(null),
1963
+ order_id: Joi.string().allow("").allow(null),
1964
+ redirect_url: Joi.string().allow("").allow(null),
1965
+ payment_link_id: Joi.string().allow("").allow(null),
2043
1966
  aggregator_name: Joi.string().allow("").allow(null),
2044
- anonymous_enable: Joi.boolean().allow(null),
2045
- display_name: Joi.string().allow("").required(),
2046
- display_priority: Joi.number().required(),
2047
- is_pay_by_card_pl: Joi.boolean().allow(null),
2048
- list: Joi.array().items(PaymentApplicationModel.PaymentModeList()),
1967
+ amount: Joi.number().allow(null),
1968
+ });
1969
+ }
1970
+
1971
+ /** @returns {PaymentMethodsMeta} */
1972
+ static PaymentMethodsMeta() {
1973
+ return Joi.object({
1974
+ merchant_code: Joi.string().allow("").required(),
1975
+ payment_gateway: Joi.string().allow("").required(),
1976
+ payment_identifier: Joi.string().allow("").required(),
1977
+ });
1978
+ }
1979
+
1980
+ /** @returns {CreateOrderUserPaymentMethods} */
1981
+ static CreateOrderUserPaymentMethods() {
1982
+ return Joi.object({
2049
1983
  name: Joi.string().allow("").required(),
2050
- save_card: Joi.boolean().allow(null),
1984
+ mode: Joi.string().allow("").required(),
1985
+ meta: PaymentApplicationModel.PaymentMethodsMeta().required(),
2051
1986
  });
2052
1987
  }
2053
1988
 
2054
- /** @returns {RupifiBannerData} */
2055
- static RupifiBannerData() {
1989
+ /** @returns {CreateOrderUserRequest} */
1990
+ static CreateOrderUserRequest() {
2056
1991
  return Joi.object({
2057
- kyc_url: Joi.string().allow(""),
2058
- status: Joi.string().allow(""),
1992
+ failure_callback_url: Joi.string().allow("").required(),
1993
+ currency: Joi.string().allow("").required(),
1994
+ payment_link_id: Joi.string().allow("").required(),
1995
+ payment_methods: PaymentApplicationModel.CreateOrderUserPaymentMethods().required(),
1996
+ success_callback_url: Joi.string().allow("").required(),
1997
+ meta: Joi.any().allow(null),
2059
1998
  });
2060
1999
  }
2061
2000
 
2062
- /** @returns {RupifiBannerResponse} */
2063
- static RupifiBannerResponse() {
2001
+ /** @returns {CreateOrderUserData} */
2002
+ static CreateOrderUserData() {
2064
2003
  return Joi.object({
2065
- data: PaymentApplicationModel.RupifiBannerData().required(),
2004
+ method: Joi.string().allow("").allow(null),
2005
+ aggregator: Joi.string().allow("").allow(null),
2006
+ customer_id: Joi.string().allow("").allow(null),
2007
+ contact: Joi.string().allow("").allow(null),
2008
+ merchant_order_id: Joi.string().allow("").allow(null),
2009
+ order_id: Joi.string().allow("").allow(null),
2010
+ currency: Joi.string().allow("").allow(null),
2011
+ callback_url: Joi.string().allow("").allow(null),
2012
+ amount: Joi.number().allow(null),
2013
+ email: Joi.string().allow("").allow(null),
2014
+ });
2015
+ }
2016
+
2017
+ /** @returns {CreateOrderUserResponse} */
2018
+ static CreateOrderUserResponse() {
2019
+ return Joi.object({
2020
+ status_code: Joi.number().required(),
2066
2021
  success: Joi.boolean().required(),
2022
+ data: PaymentApplicationModel.CreateOrderUserData(),
2023
+ message: Joi.string().allow("").required(),
2024
+ order_id: Joi.string().allow("").allow(null),
2025
+ callback_url: Joi.string().allow("").allow(null),
2026
+ payment_confirm_url: Joi.string().allow("").allow(null),
2067
2027
  });
2068
2028
  }
2069
2029
 
2070
- /** @returns {SetDefaultBeneficiaryRequest} */
2071
- static SetDefaultBeneficiaryRequest() {
2030
+ /** @returns {BalanceDetails} */
2031
+ static BalanceDetails() {
2072
2032
  return Joi.object({
2073
- beneficiary_id: Joi.string().allow("").required(),
2074
- order_id: Joi.string().allow("").required(),
2033
+ formatted_value: Joi.string().allow("").allow(null),
2034
+ currency: Joi.string().allow("").allow(null),
2035
+ value: Joi.number().allow(null),
2075
2036
  });
2076
2037
  }
2077
2038
 
2078
- /** @returns {SetDefaultBeneficiaryResponse} */
2079
- static SetDefaultBeneficiaryResponse() {
2039
+ /** @returns {CreditSummary} */
2040
+ static CreditSummary() {
2080
2041
  return Joi.object({
2081
- is_beneficiary_set: Joi.boolean().required(),
2082
- success: Joi.boolean(),
2042
+ total_due_amount: PaymentApplicationModel.BalanceDetails(),
2043
+ status: Joi.string().allow("").allow(null),
2044
+ limit: PaymentApplicationModel.BalanceDetails(),
2045
+ credit_line_id: Joi.string().allow("").allow(null),
2046
+ amount_available: PaymentApplicationModel.BalanceDetails(),
2047
+ due_amount: PaymentApplicationModel.BalanceDetails(),
2048
+ due_date: Joi.string().allow("").allow(null),
2049
+ balance: PaymentApplicationModel.BalanceDetails(),
2050
+ status_message: Joi.string().allow("").allow(null),
2051
+ repayment_url: Joi.string().allow("").allow(null),
2052
+ soa_url: Joi.string().allow("").allow(null),
2053
+ is_eligible_for_txn: Joi.boolean().allow(null),
2054
+ merchant_customer_ref_id: Joi.string().allow("").allow(null),
2055
+ buyer_status: Joi.string().allow("").allow(null),
2056
+ activation_url: Joi.string().allow("").allow(null),
2083
2057
  });
2084
2058
  }
2085
2059
 
2086
- /** @returns {SplitObject} */
2087
- static SplitObject() {
2060
+ /** @returns {CustomerCreditSummaryResponse} */
2061
+ static CustomerCreditSummaryResponse() {
2088
2062
  return Joi.object({
2089
- amount_remaining: Joi.number().allow(null),
2090
- splits_remaining: Joi.number().allow(null),
2091
- total_number_of_splits: Joi.number().allow(null),
2063
+ data: PaymentApplicationModel.CreditSummary(),
2064
+ success: Joi.boolean().required(),
2092
2065
  });
2093
2066
  }
2094
2067
 
2095
- /** @returns {TransferItemsDetails} */
2096
- static TransferItemsDetails() {
2068
+ /** @returns {RedirectURL} */
2069
+ static RedirectURL() {
2097
2070
  return Joi.object({
2098
- display_name: Joi.string().allow(""),
2099
- id: Joi.number().required(),
2100
- logo_large: Joi.string().allow("").required(),
2101
- logo_small: Joi.string().allow("").required(),
2102
- name: Joi.string().allow("").required(),
2071
+ status: Joi.boolean().required(),
2072
+ signup_url: Joi.string().allow("").required(),
2103
2073
  });
2104
2074
  }
2105
2075
 
2106
- /** @returns {TransferModeDetails} */
2107
- static TransferModeDetails() {
2076
+ /** @returns {RedirectToAggregatorResponse} */
2077
+ static RedirectToAggregatorResponse() {
2108
2078
  return Joi.object({
2109
- display_name: Joi.string().allow("").required(),
2110
- items: Joi.array().items(PaymentApplicationModel.TransferItemsDetails()),
2079
+ data: PaymentApplicationModel.RedirectURL().required(),
2080
+ success: Joi.boolean().required(),
2111
2081
  });
2112
2082
  }
2113
2083
 
2114
- /** @returns {TransferModeResponse} */
2115
- static TransferModeResponse() {
2084
+ /** @returns {CreditDetail} */
2085
+ static CreditDetail() {
2116
2086
  return Joi.object({
2117
- data: Joi.array()
2118
- .items(PaymentApplicationModel.TransferModeDetails())
2119
- .required(),
2087
+ status: Joi.boolean().required(),
2088
+ is_registered: Joi.boolean().required(),
2089
+ signup_url: Joi.string().allow("").required(),
2120
2090
  });
2121
2091
  }
2122
2092
 
2123
- /** @returns {UpdateRefundTransferModeRequest} */
2124
- static UpdateRefundTransferModeRequest() {
2093
+ /** @returns {CheckCreditResponse} */
2094
+ static CheckCreditResponse() {
2125
2095
  return Joi.object({
2126
- enable: Joi.boolean().required(),
2127
- transfer_mode: Joi.string().allow("").required(),
2096
+ data: PaymentApplicationModel.CreditDetail().required(),
2097
+ success: Joi.boolean().required(),
2128
2098
  });
2129
2099
  }
2130
2100
 
2131
- /** @returns {UpdateRefundTransferModeResponse} */
2132
- static UpdateRefundTransferModeResponse() {
2101
+ /** @returns {KYCAddress} */
2102
+ static KYCAddress() {
2133
2103
  return Joi.object({
2134
- success: Joi.boolean(),
2104
+ city: Joi.string().allow("").required(),
2105
+ addressline2: Joi.string().allow("").allow(null),
2106
+ state: Joi.string().allow("").required(),
2107
+ ownership_type: Joi.string().allow("").allow(null),
2108
+ pincode: Joi.string().allow("").required(),
2109
+ land_mark: Joi.string().allow("").allow(null),
2110
+ addressline1: Joi.string().allow("").required(),
2135
2111
  });
2136
2112
  }
2137
2113
 
2138
2114
  /** @returns {UserPersonalInfoInDetails} */
2139
2115
  static UserPersonalInfoInDetails() {
2140
2116
  return Joi.object({
2141
- address_as_per_id: PaymentApplicationModel.KYCAddress().required(),
2142
- dob: Joi.string().allow("").allow(null).required(),
2143
- driving_license: Joi.string().allow("").allow(null),
2144
- email: Joi.string().allow("").allow(null),
2145
- email_verified: Joi.boolean().required(),
2146
- fathers_name: Joi.string().allow("").allow(null),
2147
2117
  first_name: Joi.string().allow("").required(),
2118
+ voter_id: Joi.string().allow("").allow(null),
2148
2119
  gender: Joi.string().allow("").allow(null),
2149
- last_name: Joi.string().allow("").allow(null),
2150
- middle_name: Joi.string().allow("").allow(null),
2151
- mobile_verified: Joi.boolean().required(),
2120
+ dob: Joi.string().allow("").allow(null).required(),
2121
+ passport: Joi.string().allow("").allow(null),
2122
+ fathers_name: Joi.string().allow("").allow(null),
2152
2123
  mothers_name: Joi.string().allow("").allow(null),
2124
+ middle_name: Joi.string().allow("").allow(null),
2125
+ last_name: Joi.string().allow("").allow(null),
2153
2126
  pan: Joi.string().allow("").allow(null),
2154
- passport: Joi.string().allow("").allow(null),
2127
+ driving_license: Joi.string().allow("").allow(null),
2128
+ email_verified: Joi.boolean().required(),
2129
+ address_as_per_id: PaymentApplicationModel.KYCAddress().required(),
2130
+ mobile_verified: Joi.boolean().required(),
2155
2131
  phone: Joi.string().allow("").required(),
2156
- voter_id: Joi.string().allow("").allow(null),
2132
+ email: Joi.string().allow("").allow(null),
2157
2133
  });
2158
2134
  }
2159
2135
 
2160
- /** @returns {ValidateCustomerRequest} */
2161
- static ValidateCustomerRequest() {
2136
+ /** @returns {MarketplaceInfo} */
2137
+ static MarketplaceInfo() {
2162
2138
  return Joi.object({
2163
- aggregator: Joi.string().allow("").required(),
2164
- billing_address: Joi.any(),
2165
- delivery_address: Joi.any(),
2166
- merchant_params: Joi.any(),
2167
- order_items: Joi.array().items(Joi.any()),
2168
- payload: Joi.string().allow("").allow(null),
2169
- phone_number: Joi.string().allow("").required(),
2170
- transaction_amount_in_paise: Joi.number().required(),
2139
+ date_of_joining: Joi.string().allow("").allow(null),
2140
+ name: Joi.string().allow("").required(),
2141
+ membership_id: Joi.string().allow("").required(),
2171
2142
  });
2172
2143
  }
2173
2144
 
2174
- /** @returns {ValidateCustomerResponse} */
2175
- static ValidateCustomerResponse() {
2145
+ /** @returns {BusinessDetails} */
2146
+ static BusinessDetails() {
2176
2147
  return Joi.object({
2177
- data: Joi.any().required(),
2178
- message: Joi.string().allow("").required(),
2179
- success: Joi.boolean().required(),
2148
+ business_ownership_type: Joi.string().allow("").allow(null),
2149
+ vintage: Joi.string().allow("").allow(null),
2150
+ gstin: Joi.string().allow("").allow(null),
2151
+ pan: Joi.string().allow("").allow(null),
2152
+ entity_type: Joi.string().allow("").allow(null),
2153
+ shop_and_establishment: Joi.any(),
2154
+ fssai: Joi.string().allow("").allow(null),
2155
+ fda: Joi.string().allow("").allow(null),
2156
+ business_type: Joi.string().allow("").allow(null),
2157
+ name: Joi.string().allow("").allow(null),
2158
+ address: PaymentApplicationModel.KYCAddress(),
2180
2159
  });
2181
2160
  }
2182
2161
 
2183
- /** @returns {ValidateUPI} */
2184
- static ValidateUPI() {
2162
+ /** @returns {DeviceDetails} */
2163
+ static DeviceDetails() {
2185
2164
  return Joi.object({
2186
- customer_name: Joi.string().allow("").required(),
2187
- is_valid: Joi.boolean().required(),
2188
- status: Joi.string().allow("").required(),
2189
- upi_vpa: Joi.string().allow("").required(),
2165
+ identification_number: Joi.string().allow("").allow(null),
2166
+ identifier_type: Joi.string().allow("").allow(null),
2167
+ device_model: Joi.string().allow("").allow(null),
2168
+ device_make: Joi.string().allow("").allow(null),
2169
+ device_type: Joi.string().allow("").allow(null),
2170
+ os: Joi.string().allow("").allow(null),
2171
+ os_version: Joi.string().allow("").allow(null),
2190
2172
  });
2191
2173
  }
2192
2174
 
2193
- /** @returns {ValidateVPARequest} */
2194
- static ValidateVPARequest() {
2175
+ /** @returns {CustomerOnboardingRequest} */
2176
+ static CustomerOnboardingRequest() {
2195
2177
  return Joi.object({
2196
- upi_vpa: Joi.string().allow("").required(),
2178
+ personal_info: PaymentApplicationModel.UserPersonalInfoInDetails(),
2179
+ mcc: Joi.string().allow("").allow(null),
2180
+ aggregator: Joi.string().allow("").required(),
2181
+ marketplace_info: PaymentApplicationModel.MarketplaceInfo(),
2182
+ source: Joi.string().allow("").required(),
2183
+ business_info: PaymentApplicationModel.BusinessDetails(),
2184
+ device: PaymentApplicationModel.DeviceDetails(),
2197
2185
  });
2198
2186
  }
2199
2187
 
2200
- /** @returns {ValidateVPAResponse} */
2201
- static ValidateVPAResponse() {
2188
+ /** @returns {OnboardSummary} */
2189
+ static OnboardSummary() {
2202
2190
  return Joi.object({
2203
- data: PaymentApplicationModel.ValidateUPI().required(),
2191
+ redirect_url: Joi.string().allow(""),
2192
+ session: Joi.any(),
2193
+ status: Joi.boolean().required(),
2194
+ status_remark: Joi.string().allow(""),
2195
+ is_eligible_for_txn: Joi.boolean(),
2196
+ merchant_customer_ref_id: Joi.string().allow(""),
2197
+ activation_url: Joi.string().allow(""),
2198
+ });
2199
+ }
2200
+
2201
+ /** @returns {CustomerOnboardingResponse} */
2202
+ static CustomerOnboardingResponse() {
2203
+ return Joi.object({
2204
+ data: PaymentApplicationModel.OnboardSummary().required(),
2204
2205
  success: Joi.boolean().required(),
2205
2206
  });
2206
2207
  }
2207
2208
 
2208
- /** @returns {WalletDelinkRequestSchema} */
2209
- static WalletDelinkRequestSchema() {
2209
+ /** @returns {OutstandingOrderDetailsResponse} */
2210
+ static OutstandingOrderDetailsResponse() {
2210
2211
  return Joi.object({
2211
- aggregator: Joi.string().allow("").required(),
2212
- wallet_code: Joi.string().allow("").required(),
2212
+ status_code: Joi.number().required(),
2213
+ data: Joi.array().items(Joi.any()),
2214
+ success: Joi.boolean().required(),
2215
+ message: Joi.string().allow("").allow(null),
2213
2216
  });
2214
2217
  }
2215
2218
 
2216
- /** @returns {WalletLinkRequestSchema} */
2217
- static WalletLinkRequestSchema() {
2219
+ /** @returns {PaidOrderDetailsResponse} */
2220
+ static PaidOrderDetailsResponse() {
2218
2221
  return Joi.object({
2219
- aggregator: Joi.string().allow("").required(),
2220
- mobile: Joi.string().allow("").required(),
2221
- wallet_code: Joi.string().allow("").required(),
2222
+ status_code: Joi.number().required(),
2223
+ data: Joi.array().items(Joi.any()),
2224
+ success: Joi.boolean().required(),
2225
+ message: Joi.string().allow("").allow(null),
2222
2226
  });
2223
2227
  }
2224
2228
 
2225
- /** @returns {WalletOtpRequest} */
2226
- static WalletOtpRequest() {
2229
+ /** @returns {PaymentMethodsMetaOrder} */
2230
+ static PaymentMethodsMetaOrder() {
2227
2231
  return Joi.object({
2228
- country_code: Joi.string().allow("").required(),
2229
- mobile: Joi.string().allow("").required(),
2232
+ merchant_code: Joi.string().allow("").required(),
2233
+ payment_gateway: Joi.string().allow("").required(),
2234
+ payment_identifier: Joi.string().allow("").required(),
2230
2235
  });
2231
2236
  }
2232
2237
 
2233
- /** @returns {WalletOtpResponse} */
2234
- static WalletOtpResponse() {
2238
+ /** @returns {PaymentOrderMethods} */
2239
+ static PaymentOrderMethods() {
2235
2240
  return Joi.object({
2236
- is_verified_flag: Joi.string().allow("").required(),
2237
- request_id: Joi.string().allow("").required(),
2238
- success: Joi.boolean(),
2241
+ amount: Joi.number().required(),
2242
+ payment: Joi.string().allow(""),
2243
+ mode: Joi.string().allow("").required(),
2244
+ meta: PaymentApplicationModel.PaymentMethodsMetaOrder().required(),
2245
+ name: Joi.string().allow("").required(),
2239
2246
  });
2240
2247
  }
2241
2248
 
2242
- /** @returns {WalletResponseSchema} */
2243
- static WalletResponseSchema() {
2249
+ /** @returns {PaymentOrderRequest} */
2250
+ static PaymentOrderRequest() {
2244
2251
  return Joi.object({
2245
- data: Joi.any().required(),
2246
- success: Joi.boolean().required(),
2252
+ payment_methods: Joi.array().items(
2253
+ PaymentApplicationModel.PaymentOrderMethods()
2254
+ ),
2255
+ order_id: Joi.string().allow("").required(),
2256
+ shipment_id: Joi.string().allow(""),
2247
2257
  });
2248
2258
  }
2249
2259
 
2250
- /** @returns {WalletVerifyRequestSchema} */
2251
- static WalletVerifyRequestSchema() {
2260
+ /** @returns {PaymentOrderData} */
2261
+ static PaymentOrderData() {
2252
2262
  return Joi.object({
2253
- aggregator: Joi.string().allow("").required(),
2254
- link_token: Joi.string().allow("").required(),
2255
- otp: Joi.number().required(),
2263
+ amount: Joi.number().allow(null),
2264
+ aggregator: Joi.string().allow("").allow(null),
2265
+ callback_url: Joi.string().allow("").allow(null),
2266
+ order_id: Joi.string().allow("").allow(null),
2267
+ customer_id: Joi.string().allow("").allow(null),
2268
+ merchant_order_id: Joi.string().allow("").allow(null),
2269
+ currency: Joi.string().allow("").allow(null),
2270
+ email: Joi.string().allow("").allow(null),
2271
+ contact: Joi.string().allow("").allow(null),
2272
+ method: Joi.string().allow("").allow(null),
2256
2273
  });
2257
2274
  }
2258
2275
 
2259
- /** @returns {WrongOtpError} */
2260
- static WrongOtpError() {
2276
+ /** @returns {PaymentOrderResponse} */
2277
+ static PaymentOrderResponse() {
2261
2278
  return Joi.object({
2262
- description: Joi.string().allow("").required(),
2263
- is_verified_flag: Joi.boolean().required(),
2264
- success: Joi.string().allow("").required(),
2279
+ payment_confirm_url: Joi.string().allow("").allow(null),
2280
+ callback_url: Joi.string().allow("").allow(null),
2281
+ order_id: Joi.string().allow("").allow(null),
2282
+ success: Joi.boolean().required(),
2283
+ status_code: Joi.number().required(),
2284
+ data: PaymentApplicationModel.PaymentOrderData(),
2285
+ message: Joi.string().allow("").required(),
2265
2286
  });
2266
2287
  }
2267
2288
  }