@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.3

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