cashfree-pg 3.0.0
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.
- package/.github/workflows/publish-dev-channel.yml +26 -0
- package/.github/workflows/publish.yml +25 -0
- package/.openapi-generator/FILES +13 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/LICENSE.md +201 -0
- package/README.md +1 -0
- package/SECURITY.md +11 -0
- package/api.ts +9319 -0
- package/base.ts +72 -0
- package/common.ts +170 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +4967 -0
- package/dist/api.js +4585 -0
- package/dist/base.d.ts +54 -0
- package/dist/base.js +59 -0
- package/dist/common.d.ts +64 -0
- package/dist/common.js +179 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +51 -0
- package/dist/esm/api.d.ts +4967 -0
- package/dist/esm/api.js +4581 -0
- package/dist/esm/base.d.ts +54 -0
- package/dist/esm/base.js +54 -0
- package/dist/esm/common.d.ts +64 -0
- package/dist/esm/common.js +167 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +47 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +34 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +19 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,4585 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Cashfree Payment Gateway APIs
|
|
6
|
+
* Cashfree\'s Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2022-09-01
|
|
9
|
+
* Contact: developers@cashfree.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Cashfree = exports.PGCustomerFetchInstrumentsInstrumentTypeEnum = exports.UpiChannelEnum = exports.RefundEntityRefundModeEnum = exports.RefundEntityRefundTypeEnum = exports.RefundEntityRefundStatusEnum = exports.RefundEntityEntityEnum = exports.RateLimitErrorTypeEnum = exports.PaymentEntityPaymentStatusEnum = exports.PaylaterProviderEnum = exports.PayOrderEntityActionEnum = exports.PayOrderEntityChannelEnum = exports.PayOrderEntityPaymentMethodEnum = exports.OrderCreateRefundRequestRefundSpeedEnum = exports.OrderAuthenticatePaymentRequestActionEnum = exports.OrderAuthenticateEntityAuthenticateStatusEnum = exports.OrderAuthenticateEntityActionEnum = exports.OfferType = exports.OfferTncOfferTncTypeEnum = exports.OfferDetailsOfferTypeEnum = exports.InstrumentEntityInstrumentStatusEnum = exports.InstrumentEntityInstrumentTypeEnum = exports.IdempotencyErrorTypeEnum = exports.DiscountDetailsDiscountTypeEnum = exports.CashbackDetailsCashbackTypeEnum = exports.CardlessEMIProviderEnum = exports.CardEMICardBankNameEnum = exports.CardCardBankNameEnum = exports.CardTokenTypeEnum = exports.CardChannelEnum = exports.BadRequestErrorTypeEnum = exports.AuthorizeOrderRequestActionEnum = exports.AuthorizationInPaymentsEntityStatusEnum = exports.AuthorizationInPaymentsEntityActionEnum = exports.AppProviderEnum = exports.ApiError502TypeEnum = exports.ApiError409TypeEnum = exports.ApiError404TypeEnum = exports.ApiErrorTypeEnum = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
const configuration_1 = require("./configuration");
|
|
31
|
+
const Sentry = require("@sentry/node");
|
|
32
|
+
exports.ApiErrorTypeEnum = {
|
|
33
|
+
API_ERROR: 'api_error',
|
|
34
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
35
|
+
};
|
|
36
|
+
exports.ApiError404TypeEnum = {
|
|
37
|
+
INVALID_REQUEST_ERROR: 'invalid_request_error',
|
|
38
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
39
|
+
};
|
|
40
|
+
exports.ApiError409TypeEnum = {
|
|
41
|
+
INVALID_REQUEST_ERROR: 'invalid_request_error',
|
|
42
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
43
|
+
};
|
|
44
|
+
exports.ApiError502TypeEnum = {
|
|
45
|
+
API_ERROR: 'api_error',
|
|
46
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
47
|
+
};
|
|
48
|
+
exports.AppProviderEnum = {
|
|
49
|
+
GPAY: 'gpay',
|
|
50
|
+
PHONEPE: 'phonepe',
|
|
51
|
+
OLA: 'ola',
|
|
52
|
+
PAYTM: 'paytm',
|
|
53
|
+
AMAZON: 'amazon',
|
|
54
|
+
AIRTEL: 'airtel',
|
|
55
|
+
FREECHARGE: 'freecharge',
|
|
56
|
+
MOBIKWIK: 'mobikwik',
|
|
57
|
+
JIO: 'jio',
|
|
58
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
59
|
+
};
|
|
60
|
+
exports.AuthorizationInPaymentsEntityActionEnum = {
|
|
61
|
+
CAPTURE: 'CAPTURE',
|
|
62
|
+
VOID: 'VOID',
|
|
63
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
64
|
+
};
|
|
65
|
+
exports.AuthorizationInPaymentsEntityStatusEnum = {
|
|
66
|
+
SUCCESS: 'SUCCESS',
|
|
67
|
+
PENDING: 'PENDING',
|
|
68
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
69
|
+
};
|
|
70
|
+
exports.AuthorizeOrderRequestActionEnum = {
|
|
71
|
+
CAPTURE: 'CAPTURE',
|
|
72
|
+
VOID: 'VOID',
|
|
73
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
74
|
+
};
|
|
75
|
+
exports.BadRequestErrorTypeEnum = {
|
|
76
|
+
INVALID_REQUEST_ERROR: 'invalid_request_error',
|
|
77
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
78
|
+
};
|
|
79
|
+
exports.CardChannelEnum = {
|
|
80
|
+
LINK: 'link',
|
|
81
|
+
POST: 'post',
|
|
82
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
83
|
+
};
|
|
84
|
+
exports.CardTokenTypeEnum = {
|
|
85
|
+
ISSUER_TOKEN: 'ISSUER_TOKEN',
|
|
86
|
+
NETWORK_GC_TOKEN: 'NETWORK_GC_TOKEN',
|
|
87
|
+
ISSUER_GC_TOKEN: 'ISSUER_GC_TOKEN',
|
|
88
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
89
|
+
};
|
|
90
|
+
exports.CardCardBankNameEnum = {
|
|
91
|
+
KOTAK: 'Kotak',
|
|
92
|
+
ICICI: 'ICICI',
|
|
93
|
+
RBL: 'RBL',
|
|
94
|
+
BOB: 'BOB',
|
|
95
|
+
STANDARD_CHARTERED: 'Standard Chartered',
|
|
96
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
97
|
+
};
|
|
98
|
+
exports.CardEMICardBankNameEnum = {
|
|
99
|
+
HDFC: 'hdfc',
|
|
100
|
+
KOTAK: 'kotak',
|
|
101
|
+
ICICI: 'icici',
|
|
102
|
+
RBL: 'rbl',
|
|
103
|
+
BOB: 'bob',
|
|
104
|
+
STANDARD_CHARTERED: 'standard chartered',
|
|
105
|
+
AXIS: 'axis',
|
|
106
|
+
AU: 'au',
|
|
107
|
+
YES: 'yes',
|
|
108
|
+
SBI: 'sbi',
|
|
109
|
+
FED: 'fed',
|
|
110
|
+
HSBC: 'hsbc',
|
|
111
|
+
CITI: 'citi',
|
|
112
|
+
AMEX: 'amex',
|
|
113
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
114
|
+
};
|
|
115
|
+
exports.CardlessEMIProviderEnum = {
|
|
116
|
+
FLEXMONEY: 'flexmoney',
|
|
117
|
+
ZESTMONEY: 'zestmoney',
|
|
118
|
+
HDFC: 'hdfc',
|
|
119
|
+
ICICI: 'icici',
|
|
120
|
+
CASHE: 'cashe',
|
|
121
|
+
IDFC: 'idfc',
|
|
122
|
+
KOTAK: 'kotak',
|
|
123
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
124
|
+
};
|
|
125
|
+
exports.CashbackDetailsCashbackTypeEnum = {
|
|
126
|
+
FLAT: 'flat',
|
|
127
|
+
PERCENTAGE: 'percentage',
|
|
128
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
129
|
+
};
|
|
130
|
+
exports.DiscountDetailsDiscountTypeEnum = {
|
|
131
|
+
FLAT: 'flat',
|
|
132
|
+
PERCENTAGE: 'percentage',
|
|
133
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
134
|
+
};
|
|
135
|
+
exports.IdempotencyErrorTypeEnum = {
|
|
136
|
+
IDEMPOTENCY_ERROR: 'idempotency_error',
|
|
137
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
138
|
+
};
|
|
139
|
+
exports.InstrumentEntityInstrumentTypeEnum = {
|
|
140
|
+
CARD: 'card',
|
|
141
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
142
|
+
};
|
|
143
|
+
exports.InstrumentEntityInstrumentStatusEnum = {
|
|
144
|
+
ACTIVE: 'ACTIVE',
|
|
145
|
+
INACTIVE: 'INACTIVE',
|
|
146
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
147
|
+
};
|
|
148
|
+
exports.OfferDetailsOfferTypeEnum = {
|
|
149
|
+
DISCOUNT: 'DISCOUNT',
|
|
150
|
+
CASHBACK: 'CASHBACK',
|
|
151
|
+
DISCOUNT_AND_CASHBACK: 'DISCOUNT_AND_CASHBACK',
|
|
152
|
+
NO_COST_EMI: 'NO_COST_EMI',
|
|
153
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
154
|
+
};
|
|
155
|
+
exports.OfferTncOfferTncTypeEnum = {
|
|
156
|
+
TEXT: 'text',
|
|
157
|
+
LINK: 'link',
|
|
158
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Offer Type Object
|
|
162
|
+
* @export
|
|
163
|
+
* @enum {string}
|
|
164
|
+
*/
|
|
165
|
+
exports.OfferType = {
|
|
166
|
+
DISCOUNT: 'DISCOUNT',
|
|
167
|
+
CASHBACK: 'CASHBACK',
|
|
168
|
+
DISCOUNT_AND_CASHBACK: 'DISCOUNT_AND_CASHBACK',
|
|
169
|
+
NO_COST_EMI: 'NO_COST_EMI',
|
|
170
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
171
|
+
};
|
|
172
|
+
exports.OrderAuthenticateEntityActionEnum = {
|
|
173
|
+
SUBMIT_OTP: 'SUBMIT_OTP',
|
|
174
|
+
RESEND_OTP: 'RESEND_OTP',
|
|
175
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
176
|
+
};
|
|
177
|
+
exports.OrderAuthenticateEntityAuthenticateStatusEnum = {
|
|
178
|
+
FAILED: 'FAILED',
|
|
179
|
+
SUCCESS: 'SUCCESS',
|
|
180
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
181
|
+
};
|
|
182
|
+
exports.OrderAuthenticatePaymentRequestActionEnum = {
|
|
183
|
+
SUBMIT_OTP: 'SUBMIT_OTP',
|
|
184
|
+
RESEND_OTP: 'RESEND_OTP',
|
|
185
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
186
|
+
};
|
|
187
|
+
exports.OrderCreateRefundRequestRefundSpeedEnum = {
|
|
188
|
+
STANDARD: 'STANDARD',
|
|
189
|
+
INSTANT: 'INSTANT',
|
|
190
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
191
|
+
};
|
|
192
|
+
exports.PayOrderEntityPaymentMethodEnum = {
|
|
193
|
+
NETBANKING: 'netbanking',
|
|
194
|
+
CARD: 'card',
|
|
195
|
+
UPI: 'upi',
|
|
196
|
+
APP: 'app',
|
|
197
|
+
CARDLESS_EMI: 'cardless_emi',
|
|
198
|
+
PAYLATER: 'paylater',
|
|
199
|
+
BANKTRANSFER: 'banktransfer',
|
|
200
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
201
|
+
};
|
|
202
|
+
exports.PayOrderEntityChannelEnum = {
|
|
203
|
+
LINK: 'link',
|
|
204
|
+
COLLECT: 'collect',
|
|
205
|
+
QRCODE: 'qrcode',
|
|
206
|
+
POST: 'post',
|
|
207
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
208
|
+
};
|
|
209
|
+
exports.PayOrderEntityActionEnum = {
|
|
210
|
+
LINK: 'link',
|
|
211
|
+
CUSTOM: 'custom',
|
|
212
|
+
FORM: 'form',
|
|
213
|
+
POST: 'post',
|
|
214
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
215
|
+
};
|
|
216
|
+
exports.PaylaterProviderEnum = {
|
|
217
|
+
KOTAK: 'kotak',
|
|
218
|
+
FLEXIPAY: 'flexipay',
|
|
219
|
+
ZESTMONEY: 'zestmoney',
|
|
220
|
+
LAZYPAY: 'lazypay',
|
|
221
|
+
OLAPOSTPAID: 'olapostpaid',
|
|
222
|
+
SIMPL: 'simpl',
|
|
223
|
+
FREECHARGEPAYLATER: 'freechargepaylater',
|
|
224
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
225
|
+
};
|
|
226
|
+
exports.PaymentEntityPaymentStatusEnum = {
|
|
227
|
+
SUCCESS: 'SUCCESS',
|
|
228
|
+
NOT_ATTEMPTED: 'NOT_ATTEMPTED',
|
|
229
|
+
FAILED: 'FAILED',
|
|
230
|
+
USER_DROPPED: 'USER_DROPPED',
|
|
231
|
+
VOID: 'VOID',
|
|
232
|
+
CANCELLED: 'CANCELLED',
|
|
233
|
+
PENDING: 'PENDING',
|
|
234
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
235
|
+
};
|
|
236
|
+
exports.RateLimitErrorTypeEnum = {
|
|
237
|
+
RATE_LIMIT_ERROR: 'rate_limit_error',
|
|
238
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
239
|
+
};
|
|
240
|
+
exports.RefundEntityEntityEnum = {
|
|
241
|
+
REFUND: 'refund',
|
|
242
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
243
|
+
};
|
|
244
|
+
exports.RefundEntityRefundStatusEnum = {
|
|
245
|
+
SUCCESS: 'SUCCESS',
|
|
246
|
+
PENDING: 'PENDING',
|
|
247
|
+
CANCELLED: 'CANCELLED',
|
|
248
|
+
ONHOLD: 'ONHOLD',
|
|
249
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
250
|
+
};
|
|
251
|
+
exports.RefundEntityRefundTypeEnum = {
|
|
252
|
+
PAYMENT_AUTO_REFUND: 'PAYMENT_AUTO_REFUND',
|
|
253
|
+
MERCHANT_INITIATED: 'MERCHANT_INITIATED',
|
|
254
|
+
UNRECONCILED_AUTO_REFUND: 'UNRECONCILED_AUTO_REFUND',
|
|
255
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
256
|
+
};
|
|
257
|
+
exports.RefundEntityRefundModeEnum = {
|
|
258
|
+
STANDARD: 'STANDARD',
|
|
259
|
+
INSTANT: 'INSTANT',
|
|
260
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
261
|
+
};
|
|
262
|
+
exports.UpiChannelEnum = {
|
|
263
|
+
LINK: 'link',
|
|
264
|
+
COLLECT: 'collect',
|
|
265
|
+
QRCODE: 'qrcode',
|
|
266
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* EligibilityApi - axios parameter creator
|
|
270
|
+
* @export
|
|
271
|
+
*/
|
|
272
|
+
const EligibilityApiAxiosParamCreator = function (configuration) {
|
|
273
|
+
return {
|
|
274
|
+
/**
|
|
275
|
+
* Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
|
|
276
|
+
* @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
|
|
277
|
+
|
|
278
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
279
|
+
* @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
|
|
280
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
281
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
* x_idempotency_key?: string,
|
|
285
|
+
*/
|
|
286
|
+
pGEligibilityFetchCardlessEMI: (x_api_version, EligibilityFetchCardlessEMIRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
287
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
288
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchCardlessEMI', 'x_api_version', x_api_version);
|
|
289
|
+
// verify required parameter 'EligibilityFetchCardlessEMIRequest' is not null or undefined
|
|
290
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchCardlessEMI', 'EligibilityFetchCardlessEMIRequest', EligibilityFetchCardlessEMIRequest);
|
|
291
|
+
const localVarPath = `/eligibility/cardlessemi`;
|
|
292
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
293
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
294
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
295
|
+
url = "https://api.cashfree.com/pg";
|
|
296
|
+
}
|
|
297
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
298
|
+
let baseOptions;
|
|
299
|
+
if (configuration) {
|
|
300
|
+
baseOptions = configuration.baseOptions;
|
|
301
|
+
}
|
|
302
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
303
|
+
const localVarHeaderParameter = {};
|
|
304
|
+
const localVarQueryParameter = {};
|
|
305
|
+
// authentication XPartnerAPIKey required
|
|
306
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
307
|
+
// authentication XClientSecret required
|
|
308
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
309
|
+
// authentication XPartnerMerchantID required
|
|
310
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
311
|
+
// authentication XClientID required
|
|
312
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
313
|
+
// authentication XClientSignatureHeader required
|
|
314
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
315
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
316
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
317
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
318
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
319
|
+
}
|
|
320
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
321
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
322
|
+
}
|
|
323
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
324
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
325
|
+
}
|
|
326
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
327
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
328
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
329
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(EligibilityFetchCardlessEMIRequest, localVarRequestOptions, configuration);
|
|
330
|
+
return {
|
|
331
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
332
|
+
options: localVarRequestOptions,
|
|
333
|
+
};
|
|
334
|
+
}),
|
|
335
|
+
/**
|
|
336
|
+
* Use this API to get eligible offers for an order_id or order amount.
|
|
337
|
+
* @summary Get Eligible Offers for an Order
|
|
338
|
+
|
|
339
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
340
|
+
* @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
|
|
341
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
342
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
343
|
+
* @param {*} [options] Override http request option.
|
|
344
|
+
* @throws {RequiredError}
|
|
345
|
+
* x_idempotency_key?: string,
|
|
346
|
+
*/
|
|
347
|
+
pGEligibilityFetchOffers: (x_api_version, EligibilityFetchOffersRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
349
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchOffers', 'x_api_version', x_api_version);
|
|
350
|
+
// verify required parameter 'EligibilityFetchOffersRequest' is not null or undefined
|
|
351
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchOffers', 'EligibilityFetchOffersRequest', EligibilityFetchOffersRequest);
|
|
352
|
+
const localVarPath = `/eligibility/offers`;
|
|
353
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
354
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
355
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
356
|
+
url = "https://api.cashfree.com/pg";
|
|
357
|
+
}
|
|
358
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
359
|
+
let baseOptions;
|
|
360
|
+
if (configuration) {
|
|
361
|
+
baseOptions = configuration.baseOptions;
|
|
362
|
+
}
|
|
363
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
364
|
+
const localVarHeaderParameter = {};
|
|
365
|
+
const localVarQueryParameter = {};
|
|
366
|
+
// authentication XPartnerAPIKey required
|
|
367
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
368
|
+
// authentication XClientSecret required
|
|
369
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
370
|
+
// authentication XPartnerMerchantID required
|
|
371
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
372
|
+
// authentication XClientID required
|
|
373
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
374
|
+
// authentication XClientSignatureHeader required
|
|
375
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
376
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
377
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
378
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
379
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
380
|
+
}
|
|
381
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
382
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
383
|
+
}
|
|
384
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
385
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
386
|
+
}
|
|
387
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
388
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
389
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
390
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(EligibilityFetchOffersRequest, localVarRequestOptions, configuration);
|
|
391
|
+
return {
|
|
392
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
393
|
+
options: localVarRequestOptions,
|
|
394
|
+
};
|
|
395
|
+
}),
|
|
396
|
+
/**
|
|
397
|
+
* Use this API to get eligible Paylater Payment Methods for a customer on an order.
|
|
398
|
+
* @summary Get Eligible Paylater for a customer on an order
|
|
399
|
+
|
|
400
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
401
|
+
* @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
|
|
402
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
403
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
* x_idempotency_key?: string,
|
|
407
|
+
*/
|
|
408
|
+
pGEligibilityFetchPaylater: (x_api_version, EligibilityFetchPaylaterRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
410
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchPaylater', 'x_api_version', x_api_version);
|
|
411
|
+
// verify required parameter 'EligibilityFetchPaylaterRequest' is not null or undefined
|
|
412
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchPaylater', 'EligibilityFetchPaylaterRequest', EligibilityFetchPaylaterRequest);
|
|
413
|
+
const localVarPath = `/eligibility/paylater`;
|
|
414
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
415
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
416
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
417
|
+
url = "https://api.cashfree.com/pg";
|
|
418
|
+
}
|
|
419
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
420
|
+
let baseOptions;
|
|
421
|
+
if (configuration) {
|
|
422
|
+
baseOptions = configuration.baseOptions;
|
|
423
|
+
}
|
|
424
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
425
|
+
const localVarHeaderParameter = {};
|
|
426
|
+
const localVarQueryParameter = {};
|
|
427
|
+
// authentication XPartnerAPIKey required
|
|
428
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
429
|
+
// authentication XClientSecret required
|
|
430
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
431
|
+
// authentication XPartnerMerchantID required
|
|
432
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
433
|
+
// authentication XClientID required
|
|
434
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
435
|
+
// authentication XClientSignatureHeader required
|
|
436
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
437
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
438
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
439
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
440
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
441
|
+
}
|
|
442
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
443
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
444
|
+
}
|
|
445
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
446
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
447
|
+
}
|
|
448
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
449
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
450
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
451
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(EligibilityFetchPaylaterRequest, localVarRequestOptions, configuration);
|
|
452
|
+
return {
|
|
453
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
454
|
+
options: localVarRequestOptions,
|
|
455
|
+
};
|
|
456
|
+
}),
|
|
457
|
+
/**
|
|
458
|
+
* Use this API to get eligible Payment Methods
|
|
459
|
+
* @summary Get eligible Payment Methods
|
|
460
|
+
|
|
461
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
462
|
+
* @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
|
|
463
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
464
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
465
|
+
* @param {*} [options] Override http request option.
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
* x_idempotency_key?: string,
|
|
468
|
+
*/
|
|
469
|
+
pGEligibilityFetchPaymentMethods: (x_api_version, EligibilityFetchPaymentMethodsRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
471
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchPaymentMethods', 'x_api_version', x_api_version);
|
|
472
|
+
// verify required parameter 'EligibilityFetchPaymentMethodsRequest' is not null or undefined
|
|
473
|
+
(0, common_1.assertParamExists)('pGEligibilityFetchPaymentMethods', 'EligibilityFetchPaymentMethodsRequest', EligibilityFetchPaymentMethodsRequest);
|
|
474
|
+
const localVarPath = `/eligibility/payment_methods`;
|
|
475
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
476
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
477
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
478
|
+
url = "https://api.cashfree.com/pg";
|
|
479
|
+
}
|
|
480
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
481
|
+
let baseOptions;
|
|
482
|
+
if (configuration) {
|
|
483
|
+
baseOptions = configuration.baseOptions;
|
|
484
|
+
}
|
|
485
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
486
|
+
const localVarHeaderParameter = {};
|
|
487
|
+
const localVarQueryParameter = {};
|
|
488
|
+
// authentication XPartnerAPIKey required
|
|
489
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
490
|
+
// authentication XClientSecret required
|
|
491
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
492
|
+
// authentication XPartnerMerchantID required
|
|
493
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
494
|
+
// authentication XClientID required
|
|
495
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
496
|
+
// authentication XClientSignatureHeader required
|
|
497
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
498
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
499
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
500
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
501
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
502
|
+
}
|
|
503
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
504
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
505
|
+
}
|
|
506
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
507
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
508
|
+
}
|
|
509
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
510
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
511
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
512
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(EligibilityFetchPaymentMethodsRequest, localVarRequestOptions, configuration);
|
|
513
|
+
return {
|
|
514
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
515
|
+
options: localVarRequestOptions,
|
|
516
|
+
};
|
|
517
|
+
}),
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* EligibilityApi - functional programming interface
|
|
522
|
+
* @export
|
|
523
|
+
*/
|
|
524
|
+
const EligibilityApiFp = function (configuration) {
|
|
525
|
+
const localVarAxiosParamCreator = EligibilityApiAxiosParamCreator(configuration);
|
|
526
|
+
return {
|
|
527
|
+
/**
|
|
528
|
+
* Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
|
|
529
|
+
* @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
|
|
530
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
531
|
+
* @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
|
|
532
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
533
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
534
|
+
* @param {*} [options] Override http request option.
|
|
535
|
+
* @throws {RequiredError}
|
|
536
|
+
*/
|
|
537
|
+
pGEligibilityFetchCardlessEMI(x_api_version, EligibilityFetchCardlessEMIRequest, x_request_id, x_idempotency_key, options) {
|
|
538
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
539
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGEligibilityFetchCardlessEMI(x_api_version, EligibilityFetchCardlessEMIRequest, x_request_id, x_idempotency_key, options);
|
|
540
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
541
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
542
|
+
url = "https://api.cashfree.com/pg";
|
|
543
|
+
}
|
|
544
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
545
|
+
});
|
|
546
|
+
},
|
|
547
|
+
/**
|
|
548
|
+
* Use this API to get eligible offers for an order_id or order amount.
|
|
549
|
+
* @summary Get Eligible Offers for an Order
|
|
550
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
551
|
+
* @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
|
|
552
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
553
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
554
|
+
* @param {*} [options] Override http request option.
|
|
555
|
+
* @throws {RequiredError}
|
|
556
|
+
*/
|
|
557
|
+
pGEligibilityFetchOffers(x_api_version, EligibilityFetchOffersRequest, x_request_id, x_idempotency_key, options) {
|
|
558
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
559
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGEligibilityFetchOffers(x_api_version, EligibilityFetchOffersRequest, x_request_id, x_idempotency_key, options);
|
|
560
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
561
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
562
|
+
url = "https://api.cashfree.com/pg";
|
|
563
|
+
}
|
|
564
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
565
|
+
});
|
|
566
|
+
},
|
|
567
|
+
/**
|
|
568
|
+
* Use this API to get eligible Paylater Payment Methods for a customer on an order.
|
|
569
|
+
* @summary Get Eligible Paylater for a customer on an order
|
|
570
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
571
|
+
* @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
|
|
572
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
573
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
574
|
+
* @param {*} [options] Override http request option.
|
|
575
|
+
* @throws {RequiredError}
|
|
576
|
+
*/
|
|
577
|
+
pGEligibilityFetchPaylater(x_api_version, EligibilityFetchPaylaterRequest, x_request_id, x_idempotency_key, options) {
|
|
578
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
579
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGEligibilityFetchPaylater(x_api_version, EligibilityFetchPaylaterRequest, x_request_id, x_idempotency_key, options);
|
|
580
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
581
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
582
|
+
url = "https://api.cashfree.com/pg";
|
|
583
|
+
}
|
|
584
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
585
|
+
});
|
|
586
|
+
},
|
|
587
|
+
/**
|
|
588
|
+
* Use this API to get eligible Payment Methods
|
|
589
|
+
* @summary Get eligible Payment Methods
|
|
590
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
591
|
+
* @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
|
|
592
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
593
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
594
|
+
* @param {*} [options] Override http request option.
|
|
595
|
+
* @throws {RequiredError}
|
|
596
|
+
*/
|
|
597
|
+
pGEligibilityFetchPaymentMethods(x_api_version, EligibilityFetchPaymentMethodsRequest, x_request_id, x_idempotency_key, options) {
|
|
598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
599
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGEligibilityFetchPaymentMethods(x_api_version, EligibilityFetchPaymentMethodsRequest, x_request_id, x_idempotency_key, options);
|
|
600
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
601
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
602
|
+
url = "https://api.cashfree.com/pg";
|
|
603
|
+
}
|
|
604
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
605
|
+
});
|
|
606
|
+
},
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* EligibilityApi - object-oriented interface
|
|
611
|
+
* @export
|
|
612
|
+
* @class EligibilityApi
|
|
613
|
+
* @extends {BaseAPI}
|
|
614
|
+
*/
|
|
615
|
+
/**
|
|
616
|
+
* OffersApi - axios parameter creator
|
|
617
|
+
* @export
|
|
618
|
+
*/
|
|
619
|
+
const OffersApiAxiosParamCreator = function (configuration) {
|
|
620
|
+
return {
|
|
621
|
+
/**
|
|
622
|
+
* Use this API to create offers with Cashfree from your backend
|
|
623
|
+
* @summary Create Offer
|
|
624
|
+
|
|
625
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
626
|
+
* @param {CreateOfferRequest} CreateOfferRequest Request body to create an offer at Cashfree
|
|
627
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
628
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
629
|
+
* @param {*} [options] Override http request option.
|
|
630
|
+
* @throws {RequiredError}
|
|
631
|
+
* x_idempotency_key?: string,
|
|
632
|
+
*/
|
|
633
|
+
pGCreateOffer: (x_api_version, CreateOfferRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
634
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
635
|
+
(0, common_1.assertParamExists)('pGCreateOffer', 'x_api_version', x_api_version);
|
|
636
|
+
// verify required parameter 'CreateOfferRequest' is not null or undefined
|
|
637
|
+
(0, common_1.assertParamExists)('pGCreateOffer', 'CreateOfferRequest', CreateOfferRequest);
|
|
638
|
+
const localVarPath = `/offers`;
|
|
639
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
640
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
641
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
642
|
+
url = "https://api.cashfree.com/pg";
|
|
643
|
+
}
|
|
644
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
645
|
+
let baseOptions;
|
|
646
|
+
if (configuration) {
|
|
647
|
+
baseOptions = configuration.baseOptions;
|
|
648
|
+
}
|
|
649
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
650
|
+
const localVarHeaderParameter = {};
|
|
651
|
+
const localVarQueryParameter = {};
|
|
652
|
+
// authentication XPartnerAPIKey required
|
|
653
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
654
|
+
// authentication XClientSecret required
|
|
655
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
656
|
+
// authentication XPartnerMerchantID required
|
|
657
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
658
|
+
// authentication XClientID required
|
|
659
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
660
|
+
// authentication XClientSignatureHeader required
|
|
661
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
662
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
663
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
664
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
665
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
666
|
+
}
|
|
667
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
668
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
669
|
+
}
|
|
670
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
671
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
672
|
+
}
|
|
673
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
674
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
675
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
676
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateOfferRequest, localVarRequestOptions, configuration);
|
|
677
|
+
return {
|
|
678
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
679
|
+
options: localVarRequestOptions,
|
|
680
|
+
};
|
|
681
|
+
}),
|
|
682
|
+
/**
|
|
683
|
+
* Use this API to get offer by offer_id
|
|
684
|
+
* @summary Get Offer by ID
|
|
685
|
+
|
|
686
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
687
|
+
* @param {string} offer_id The offer ID for which you want to view the offer details.
|
|
688
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
689
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
690
|
+
* @param {*} [options] Override http request option.
|
|
691
|
+
* @throws {RequiredError}
|
|
692
|
+
* x_idempotency_key?: string,
|
|
693
|
+
*/
|
|
694
|
+
pGFetchOffer: (x_api_version, offer_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
695
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
696
|
+
(0, common_1.assertParamExists)('pGFetchOffer', 'x_api_version', x_api_version);
|
|
697
|
+
// verify required parameter 'offer_id' is not null or undefined
|
|
698
|
+
(0, common_1.assertParamExists)('pGFetchOffer', 'offer_id', offer_id);
|
|
699
|
+
const localVarPath = `/offers/{offer_id}`
|
|
700
|
+
.replace(`{${"offer_id"}}`, encodeURIComponent(String(offer_id)));
|
|
701
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
702
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
703
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
704
|
+
url = "https://api.cashfree.com/pg";
|
|
705
|
+
}
|
|
706
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
707
|
+
let baseOptions;
|
|
708
|
+
if (configuration) {
|
|
709
|
+
baseOptions = configuration.baseOptions;
|
|
710
|
+
}
|
|
711
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
712
|
+
const localVarHeaderParameter = {};
|
|
713
|
+
const localVarQueryParameter = {};
|
|
714
|
+
// authentication XPartnerAPIKey required
|
|
715
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
716
|
+
// authentication XClientSecret required
|
|
717
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
718
|
+
// authentication XPartnerMerchantID required
|
|
719
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
720
|
+
// authentication XClientID required
|
|
721
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
722
|
+
// authentication XClientSignatureHeader required
|
|
723
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
724
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
725
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
726
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
727
|
+
}
|
|
728
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
729
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
730
|
+
}
|
|
731
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
732
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
733
|
+
}
|
|
734
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
735
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
736
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
737
|
+
return {
|
|
738
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
739
|
+
options: localVarRequestOptions,
|
|
740
|
+
};
|
|
741
|
+
}),
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* OffersApi - functional programming interface
|
|
746
|
+
* @export
|
|
747
|
+
*/
|
|
748
|
+
const OffersApiFp = function (configuration) {
|
|
749
|
+
const localVarAxiosParamCreator = OffersApiAxiosParamCreator(configuration);
|
|
750
|
+
return {
|
|
751
|
+
/**
|
|
752
|
+
* Use this API to create offers with Cashfree from your backend
|
|
753
|
+
* @summary Create Offer
|
|
754
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
755
|
+
* @param {CreateOfferRequest} CreateOfferRequest Request body to create an offer at Cashfree
|
|
756
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
757
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
758
|
+
* @param {*} [options] Override http request option.
|
|
759
|
+
* @throws {RequiredError}
|
|
760
|
+
*/
|
|
761
|
+
pGCreateOffer(x_api_version, CreateOfferRequest, x_request_id, x_idempotency_key, options) {
|
|
762
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
763
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCreateOffer(x_api_version, CreateOfferRequest, x_request_id, x_idempotency_key, options);
|
|
764
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
765
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
766
|
+
url = "https://api.cashfree.com/pg";
|
|
767
|
+
}
|
|
768
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
769
|
+
});
|
|
770
|
+
},
|
|
771
|
+
/**
|
|
772
|
+
* Use this API to get offer by offer_id
|
|
773
|
+
* @summary Get Offer by ID
|
|
774
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
775
|
+
* @param {string} offer_id The offer ID for which you want to view the offer details.
|
|
776
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
777
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
778
|
+
* @param {*} [options] Override http request option.
|
|
779
|
+
* @throws {RequiredError}
|
|
780
|
+
*/
|
|
781
|
+
pGFetchOffer(x_api_version, offer_id, x_request_id, x_idempotency_key, options) {
|
|
782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
783
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGFetchOffer(x_api_version, offer_id, x_request_id, x_idempotency_key, options);
|
|
784
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
785
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
786
|
+
url = "https://api.cashfree.com/pg";
|
|
787
|
+
}
|
|
788
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
789
|
+
});
|
|
790
|
+
},
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
/**
|
|
794
|
+
* OffersApi - object-oriented interface
|
|
795
|
+
* @export
|
|
796
|
+
* @class OffersApi
|
|
797
|
+
* @extends {BaseAPI}
|
|
798
|
+
*/
|
|
799
|
+
/**
|
|
800
|
+
* OrdersApi - axios parameter creator
|
|
801
|
+
* @export
|
|
802
|
+
*/
|
|
803
|
+
const OrdersApiAxiosParamCreator = function (configuration) {
|
|
804
|
+
return {
|
|
805
|
+
/**
|
|
806
|
+
* ### Order An order is an entity which has a amount and currency associated with it. It is something for which you want to collect payment for. Use this API to create orders with Cashfree from your backend to get a `payment_sessions_id`. You can use the `payment_sessions_id` to create a transaction for the order.
|
|
807
|
+
* @summary Create Order
|
|
808
|
+
|
|
809
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
810
|
+
* @param {CreateOrderRequest} CreateOrderRequest Request body to create an order at cashfree
|
|
811
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
812
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
813
|
+
* @param {*} [options] Override http request option.
|
|
814
|
+
* @throws {RequiredError}
|
|
815
|
+
* x_idempotency_key?: string,
|
|
816
|
+
*/
|
|
817
|
+
pGCreateOrder: (x_api_version, CreateOrderRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
818
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
819
|
+
(0, common_1.assertParamExists)('pGCreateOrder', 'x_api_version', x_api_version);
|
|
820
|
+
// verify required parameter 'CreateOrderRequest' is not null or undefined
|
|
821
|
+
(0, common_1.assertParamExists)('pGCreateOrder', 'CreateOrderRequest', CreateOrderRequest);
|
|
822
|
+
const localVarPath = `/orders`;
|
|
823
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
824
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
825
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
826
|
+
url = "https://api.cashfree.com/pg";
|
|
827
|
+
}
|
|
828
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
829
|
+
let baseOptions;
|
|
830
|
+
if (configuration) {
|
|
831
|
+
baseOptions = configuration.baseOptions;
|
|
832
|
+
}
|
|
833
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
834
|
+
const localVarHeaderParameter = {};
|
|
835
|
+
const localVarQueryParameter = {};
|
|
836
|
+
// authentication XPartnerAPIKey required
|
|
837
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
838
|
+
// authentication XClientSecret required
|
|
839
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
840
|
+
// authentication XPartnerMerchantID required
|
|
841
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
842
|
+
// authentication XClientID required
|
|
843
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
844
|
+
// authentication XClientSignatureHeader required
|
|
845
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
846
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
847
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
848
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
849
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
850
|
+
}
|
|
851
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
852
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
853
|
+
}
|
|
854
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
855
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
856
|
+
}
|
|
857
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
858
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
859
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
860
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateOrderRequest, localVarRequestOptions, configuration);
|
|
861
|
+
return {
|
|
862
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
863
|
+
options: localVarRequestOptions,
|
|
864
|
+
};
|
|
865
|
+
}),
|
|
866
|
+
/**
|
|
867
|
+
* Use this API to fetch the order that was created at Cashfree\'s using the `order_id`. ## When to use this API - To check the status of your order - Once the order is PAID - Once your customer returns to `return_url`
|
|
868
|
+
* @summary Get Order
|
|
869
|
+
|
|
870
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
871
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
872
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
873
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
874
|
+
* @param {*} [options] Override http request option.
|
|
875
|
+
* @throws {RequiredError}
|
|
876
|
+
* x_idempotency_key?: string,
|
|
877
|
+
*/
|
|
878
|
+
pGFetchOrder: (x_api_version, order_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
879
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
880
|
+
(0, common_1.assertParamExists)('pGFetchOrder', 'x_api_version', x_api_version);
|
|
881
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
882
|
+
(0, common_1.assertParamExists)('pGFetchOrder', 'order_id', order_id);
|
|
883
|
+
const localVarPath = `/orders/{order_id}`
|
|
884
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
885
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
886
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
887
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
888
|
+
url = "https://api.cashfree.com/pg";
|
|
889
|
+
}
|
|
890
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
891
|
+
let baseOptions;
|
|
892
|
+
if (configuration) {
|
|
893
|
+
baseOptions = configuration.baseOptions;
|
|
894
|
+
}
|
|
895
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
896
|
+
const localVarHeaderParameter = {};
|
|
897
|
+
const localVarQueryParameter = {};
|
|
898
|
+
// authentication XPartnerAPIKey required
|
|
899
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
900
|
+
// authentication XClientSecret required
|
|
901
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
902
|
+
// authentication XPartnerMerchantID required
|
|
903
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
904
|
+
// authentication XClientID required
|
|
905
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
906
|
+
// authentication XClientSignatureHeader required
|
|
907
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
908
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
909
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
910
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
911
|
+
}
|
|
912
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
913
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
914
|
+
}
|
|
915
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
916
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
917
|
+
}
|
|
918
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
919
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
920
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
921
|
+
return {
|
|
922
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
923
|
+
options: localVarRequestOptions,
|
|
924
|
+
};
|
|
925
|
+
}),
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* OrdersApi - functional programming interface
|
|
930
|
+
* @export
|
|
931
|
+
*/
|
|
932
|
+
const OrdersApiFp = function (configuration) {
|
|
933
|
+
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
|
|
934
|
+
return {
|
|
935
|
+
/**
|
|
936
|
+
* ### Order An order is an entity which has a amount and currency associated with it. It is something for which you want to collect payment for. Use this API to create orders with Cashfree from your backend to get a `payment_sessions_id`. You can use the `payment_sessions_id` to create a transaction for the order.
|
|
937
|
+
* @summary Create Order
|
|
938
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
939
|
+
* @param {CreateOrderRequest} CreateOrderRequest Request body to create an order at cashfree
|
|
940
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
941
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
942
|
+
* @param {*} [options] Override http request option.
|
|
943
|
+
* @throws {RequiredError}
|
|
944
|
+
*/
|
|
945
|
+
pGCreateOrder(x_api_version, CreateOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
946
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
947
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCreateOrder(x_api_version, CreateOrderRequest, x_request_id, x_idempotency_key, options);
|
|
948
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
949
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
950
|
+
url = "https://api.cashfree.com/pg";
|
|
951
|
+
}
|
|
952
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
953
|
+
});
|
|
954
|
+
},
|
|
955
|
+
/**
|
|
956
|
+
* Use this API to fetch the order that was created at Cashfree\'s using the `order_id`. ## When to use this API - To check the status of your order - Once the order is PAID - Once your customer returns to `return_url`
|
|
957
|
+
* @summary Get Order
|
|
958
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
959
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
960
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
961
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
962
|
+
* @param {*} [options] Override http request option.
|
|
963
|
+
* @throws {RequiredError}
|
|
964
|
+
*/
|
|
965
|
+
pGFetchOrder(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
966
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
967
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGFetchOrder(x_api_version, order_id, x_request_id, x_idempotency_key, options);
|
|
968
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
969
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
970
|
+
url = "https://api.cashfree.com/pg";
|
|
971
|
+
}
|
|
972
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
973
|
+
});
|
|
974
|
+
},
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
/**
|
|
978
|
+
* OrdersApi - object-oriented interface
|
|
979
|
+
* @export
|
|
980
|
+
* @class OrdersApi
|
|
981
|
+
* @extends {BaseAPI}
|
|
982
|
+
*/
|
|
983
|
+
/**
|
|
984
|
+
* PGReconciliationApi - axios parameter creator
|
|
985
|
+
* @export
|
|
986
|
+
*/
|
|
987
|
+
const PGReconciliationApiAxiosParamCreator = function (configuration) {
|
|
988
|
+
return {
|
|
989
|
+
/**
|
|
990
|
+
* - Use this API to get the payment gateway reconciliation details with date range. - It will have events for your payment account
|
|
991
|
+
* @summary PG Reconciliation
|
|
992
|
+
|
|
993
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
994
|
+
* @param {FetchReconRequest} FetchReconRequest Request Body for the reconciliation
|
|
995
|
+
* @param {string} [Content_Type] application/json
|
|
996
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
997
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
998
|
+
* @param {string} [Accept] application/json
|
|
999
|
+
* @param {*} [options] Override http request option.
|
|
1000
|
+
* @throws {RequiredError}
|
|
1001
|
+
* x_request_id?: string,
|
|
1002
|
+
*/
|
|
1003
|
+
pGFetchRecon: (x_api_version, FetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1004
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1005
|
+
(0, common_1.assertParamExists)('pGFetchRecon', 'x_api_version', x_api_version);
|
|
1006
|
+
// verify required parameter 'FetchReconRequest' is not null or undefined
|
|
1007
|
+
(0, common_1.assertParamExists)('pGFetchRecon', 'FetchReconRequest', FetchReconRequest);
|
|
1008
|
+
const localVarPath = `/recon`;
|
|
1009
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1010
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1011
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1012
|
+
url = "https://api.cashfree.com/pg";
|
|
1013
|
+
}
|
|
1014
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1015
|
+
let baseOptions;
|
|
1016
|
+
if (configuration) {
|
|
1017
|
+
baseOptions = configuration.baseOptions;
|
|
1018
|
+
}
|
|
1019
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1020
|
+
const localVarHeaderParameter = {};
|
|
1021
|
+
const localVarQueryParameter = {};
|
|
1022
|
+
// authentication XPartnerAPIKey required
|
|
1023
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1024
|
+
// authentication XClientSecret required
|
|
1025
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1026
|
+
// authentication XPartnerMerchantID required
|
|
1027
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1028
|
+
// authentication XClientID required
|
|
1029
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1030
|
+
// authentication XClientSignatureHeader required
|
|
1031
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1032
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1033
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1034
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1035
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1036
|
+
}
|
|
1037
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1038
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1039
|
+
}
|
|
1040
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1041
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1042
|
+
}
|
|
1043
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1044
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1045
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1046
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(FetchReconRequest, localVarRequestOptions, configuration);
|
|
1047
|
+
return {
|
|
1048
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1049
|
+
options: localVarRequestOptions,
|
|
1050
|
+
};
|
|
1051
|
+
}),
|
|
1052
|
+
};
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* PGReconciliationApi - functional programming interface
|
|
1056
|
+
* @export
|
|
1057
|
+
*/
|
|
1058
|
+
const PGReconciliationApiFp = function (configuration) {
|
|
1059
|
+
const localVarAxiosParamCreator = PGReconciliationApiAxiosParamCreator(configuration);
|
|
1060
|
+
return {
|
|
1061
|
+
/**
|
|
1062
|
+
* - Use this API to get the payment gateway reconciliation details with date range. - It will have events for your payment account
|
|
1063
|
+
* @summary PG Reconciliation
|
|
1064
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1065
|
+
* @param {FetchReconRequest} FetchReconRequest Request Body for the reconciliation
|
|
1066
|
+
* @param {string} [Content_Type] application/json
|
|
1067
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1068
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1069
|
+
* @param {string} [Accept] application/json
|
|
1070
|
+
* @param {*} [options] Override http request option.
|
|
1071
|
+
* @throws {RequiredError}
|
|
1072
|
+
*/
|
|
1073
|
+
pGFetchRecon(x_api_version, FetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
1074
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1075
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGFetchRecon(x_api_version, FetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options);
|
|
1076
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1077
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1078
|
+
url = "https://api.cashfree.com/pg";
|
|
1079
|
+
}
|
|
1080
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1081
|
+
});
|
|
1082
|
+
},
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
/**
|
|
1086
|
+
* PGReconciliationApi - object-oriented interface
|
|
1087
|
+
* @export
|
|
1088
|
+
* @class PGReconciliationApi
|
|
1089
|
+
* @extends {BaseAPI}
|
|
1090
|
+
*/
|
|
1091
|
+
/**
|
|
1092
|
+
* PaymentLinksApi - axios parameter creator
|
|
1093
|
+
* @export
|
|
1094
|
+
*/
|
|
1095
|
+
const PaymentLinksApiAxiosParamCreator = function (configuration) {
|
|
1096
|
+
return {
|
|
1097
|
+
/**
|
|
1098
|
+
* Use this API to cancel a payment link. No further payments can be done against a cancelled link. Only a link in ACTIVE status can be cancelled.
|
|
1099
|
+
* @summary Cancel Payment Link
|
|
1100
|
+
|
|
1101
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1102
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1103
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1104
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1105
|
+
* @param {*} [options] Override http request option.
|
|
1106
|
+
* @throws {RequiredError}
|
|
1107
|
+
* x_idempotency_key?: string,
|
|
1108
|
+
*/
|
|
1109
|
+
pGCancelLink: (x_api_version, link_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1110
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1111
|
+
(0, common_1.assertParamExists)('pGCancelLink', 'x_api_version', x_api_version);
|
|
1112
|
+
// verify required parameter 'link_id' is not null or undefined
|
|
1113
|
+
(0, common_1.assertParamExists)('pGCancelLink', 'link_id', link_id);
|
|
1114
|
+
const localVarPath = `/links/{link_id}/cancel`
|
|
1115
|
+
.replace(`{${"link_id"}}`, encodeURIComponent(String(link_id)));
|
|
1116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1117
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1118
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1119
|
+
url = "https://api.cashfree.com/pg";
|
|
1120
|
+
}
|
|
1121
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1122
|
+
let baseOptions;
|
|
1123
|
+
if (configuration) {
|
|
1124
|
+
baseOptions = configuration.baseOptions;
|
|
1125
|
+
}
|
|
1126
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1127
|
+
const localVarHeaderParameter = {};
|
|
1128
|
+
const localVarQueryParameter = {};
|
|
1129
|
+
// authentication XPartnerAPIKey required
|
|
1130
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1131
|
+
// authentication XClientSecret required
|
|
1132
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1133
|
+
// authentication XPartnerMerchantID required
|
|
1134
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1135
|
+
// authentication XClientID required
|
|
1136
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1137
|
+
// authentication XClientSignatureHeader required
|
|
1138
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1139
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1140
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1141
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1142
|
+
}
|
|
1143
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1144
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1145
|
+
}
|
|
1146
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1147
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1148
|
+
}
|
|
1149
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1150
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1151
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1152
|
+
return {
|
|
1153
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1154
|
+
options: localVarRequestOptions,
|
|
1155
|
+
};
|
|
1156
|
+
}),
|
|
1157
|
+
/**
|
|
1158
|
+
* Use this API to create a new payment link. The created payment link url will be available in the API response parameter link_url.
|
|
1159
|
+
* @summary Create Payment Link
|
|
1160
|
+
|
|
1161
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1162
|
+
* @param {CreateLinkRequest} CreateLinkRequest Request Body to Create Payment Links
|
|
1163
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1164
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1165
|
+
* @param {*} [options] Override http request option.
|
|
1166
|
+
* @throws {RequiredError}
|
|
1167
|
+
* x_idempotency_key?: string,
|
|
1168
|
+
*/
|
|
1169
|
+
pGCreateLink: (x_api_version, CreateLinkRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1170
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1171
|
+
(0, common_1.assertParamExists)('pGCreateLink', 'x_api_version', x_api_version);
|
|
1172
|
+
// verify required parameter 'CreateLinkRequest' is not null or undefined
|
|
1173
|
+
(0, common_1.assertParamExists)('pGCreateLink', 'CreateLinkRequest', CreateLinkRequest);
|
|
1174
|
+
const localVarPath = `/links`;
|
|
1175
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1176
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1177
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1178
|
+
url = "https://api.cashfree.com/pg";
|
|
1179
|
+
}
|
|
1180
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1181
|
+
let baseOptions;
|
|
1182
|
+
if (configuration) {
|
|
1183
|
+
baseOptions = configuration.baseOptions;
|
|
1184
|
+
}
|
|
1185
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1186
|
+
const localVarHeaderParameter = {};
|
|
1187
|
+
const localVarQueryParameter = {};
|
|
1188
|
+
// authentication XPartnerAPIKey required
|
|
1189
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1190
|
+
// authentication XClientSecret required
|
|
1191
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1192
|
+
// authentication XPartnerMerchantID required
|
|
1193
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1194
|
+
// authentication XClientID required
|
|
1195
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1196
|
+
// authentication XClientSignatureHeader required
|
|
1197
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1198
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1199
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1200
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1201
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1202
|
+
}
|
|
1203
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1204
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1205
|
+
}
|
|
1206
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1207
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1208
|
+
}
|
|
1209
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1210
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1211
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1212
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateLinkRequest, localVarRequestOptions, configuration);
|
|
1213
|
+
return {
|
|
1214
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1215
|
+
options: localVarRequestOptions,
|
|
1216
|
+
};
|
|
1217
|
+
}),
|
|
1218
|
+
/**
|
|
1219
|
+
* Use this API to view all details and status of a payment link.
|
|
1220
|
+
* @summary Fetch Payment Link Details
|
|
1221
|
+
|
|
1222
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1223
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1224
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1225
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1226
|
+
* @param {*} [options] Override http request option.
|
|
1227
|
+
* @throws {RequiredError}
|
|
1228
|
+
* x_idempotency_key?: string,
|
|
1229
|
+
*/
|
|
1230
|
+
pGFetchLink: (x_api_version, link_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1231
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1232
|
+
(0, common_1.assertParamExists)('pGFetchLink', 'x_api_version', x_api_version);
|
|
1233
|
+
// verify required parameter 'link_id' is not null or undefined
|
|
1234
|
+
(0, common_1.assertParamExists)('pGFetchLink', 'link_id', link_id);
|
|
1235
|
+
const localVarPath = `/links/{link_id}`
|
|
1236
|
+
.replace(`{${"link_id"}}`, encodeURIComponent(String(link_id)));
|
|
1237
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1238
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1239
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1240
|
+
url = "https://api.cashfree.com/pg";
|
|
1241
|
+
}
|
|
1242
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1243
|
+
let baseOptions;
|
|
1244
|
+
if (configuration) {
|
|
1245
|
+
baseOptions = configuration.baseOptions;
|
|
1246
|
+
}
|
|
1247
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1248
|
+
const localVarHeaderParameter = {};
|
|
1249
|
+
const localVarQueryParameter = {};
|
|
1250
|
+
// authentication XPartnerAPIKey required
|
|
1251
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1252
|
+
// authentication XClientSecret required
|
|
1253
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1254
|
+
// authentication XPartnerMerchantID required
|
|
1255
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1256
|
+
// authentication XClientID required
|
|
1257
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1258
|
+
// authentication XClientSignatureHeader required
|
|
1259
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1260
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1261
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1262
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1263
|
+
}
|
|
1264
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1265
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1266
|
+
}
|
|
1267
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1268
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1269
|
+
}
|
|
1270
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1271
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1272
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1273
|
+
return {
|
|
1274
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1275
|
+
options: localVarRequestOptions,
|
|
1276
|
+
};
|
|
1277
|
+
}),
|
|
1278
|
+
/**
|
|
1279
|
+
* Use this API to view all order details for a payment link.
|
|
1280
|
+
* @summary Get Orders for a Payment Link
|
|
1281
|
+
|
|
1282
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1283
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1284
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1285
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1286
|
+
* @param {*} [options] Override http request option.
|
|
1287
|
+
* @throws {RequiredError}
|
|
1288
|
+
* x_idempotency_key?: string,
|
|
1289
|
+
*/
|
|
1290
|
+
pGLinkFetchOrders: (x_api_version, link_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1291
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1292
|
+
(0, common_1.assertParamExists)('pGLinkFetchOrders', 'x_api_version', x_api_version);
|
|
1293
|
+
// verify required parameter 'link_id' is not null or undefined
|
|
1294
|
+
(0, common_1.assertParamExists)('pGLinkFetchOrders', 'link_id', link_id);
|
|
1295
|
+
const localVarPath = `/links/{link_id}/orders`
|
|
1296
|
+
.replace(`{${"link_id"}}`, encodeURIComponent(String(link_id)));
|
|
1297
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1298
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1299
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1300
|
+
url = "https://api.cashfree.com/pg";
|
|
1301
|
+
}
|
|
1302
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1303
|
+
let baseOptions;
|
|
1304
|
+
if (configuration) {
|
|
1305
|
+
baseOptions = configuration.baseOptions;
|
|
1306
|
+
}
|
|
1307
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1308
|
+
const localVarHeaderParameter = {};
|
|
1309
|
+
const localVarQueryParameter = {};
|
|
1310
|
+
// authentication XPartnerAPIKey required
|
|
1311
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1312
|
+
// authentication XClientSecret required
|
|
1313
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1314
|
+
// authentication XPartnerMerchantID required
|
|
1315
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1316
|
+
// authentication XClientID required
|
|
1317
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1318
|
+
// authentication XClientSignatureHeader required
|
|
1319
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1320
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1321
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1322
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1323
|
+
}
|
|
1324
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1325
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1326
|
+
}
|
|
1327
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1328
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1329
|
+
}
|
|
1330
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1331
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1332
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1333
|
+
return {
|
|
1334
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1335
|
+
options: localVarRequestOptions,
|
|
1336
|
+
};
|
|
1337
|
+
}),
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* PaymentLinksApi - functional programming interface
|
|
1342
|
+
* @export
|
|
1343
|
+
*/
|
|
1344
|
+
const PaymentLinksApiFp = function (configuration) {
|
|
1345
|
+
const localVarAxiosParamCreator = PaymentLinksApiAxiosParamCreator(configuration);
|
|
1346
|
+
return {
|
|
1347
|
+
/**
|
|
1348
|
+
* Use this API to cancel a payment link. No further payments can be done against a cancelled link. Only a link in ACTIVE status can be cancelled.
|
|
1349
|
+
* @summary Cancel Payment Link
|
|
1350
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1351
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1352
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1353
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1354
|
+
* @param {*} [options] Override http request option.
|
|
1355
|
+
* @throws {RequiredError}
|
|
1356
|
+
*/
|
|
1357
|
+
pGCancelLink(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
1358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1359
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCancelLink(x_api_version, link_id, x_request_id, x_idempotency_key, options);
|
|
1360
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1361
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1362
|
+
url = "https://api.cashfree.com/pg";
|
|
1363
|
+
}
|
|
1364
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1365
|
+
});
|
|
1366
|
+
},
|
|
1367
|
+
/**
|
|
1368
|
+
* Use this API to create a new payment link. The created payment link url will be available in the API response parameter link_url.
|
|
1369
|
+
* @summary Create Payment Link
|
|
1370
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1371
|
+
* @param {CreateLinkRequest} CreateLinkRequest Request Body to Create Payment Links
|
|
1372
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1373
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1374
|
+
* @param {*} [options] Override http request option.
|
|
1375
|
+
* @throws {RequiredError}
|
|
1376
|
+
*/
|
|
1377
|
+
pGCreateLink(x_api_version, CreateLinkRequest, x_request_id, x_idempotency_key, options) {
|
|
1378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1379
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCreateLink(x_api_version, CreateLinkRequest, x_request_id, x_idempotency_key, options);
|
|
1380
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1381
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1382
|
+
url = "https://api.cashfree.com/pg";
|
|
1383
|
+
}
|
|
1384
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1385
|
+
});
|
|
1386
|
+
},
|
|
1387
|
+
/**
|
|
1388
|
+
* Use this API to view all details and status of a payment link.
|
|
1389
|
+
* @summary Fetch Payment Link Details
|
|
1390
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1391
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1392
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1393
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1394
|
+
* @param {*} [options] Override http request option.
|
|
1395
|
+
* @throws {RequiredError}
|
|
1396
|
+
*/
|
|
1397
|
+
pGFetchLink(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
1398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1399
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGFetchLink(x_api_version, link_id, x_request_id, x_idempotency_key, options);
|
|
1400
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1401
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1402
|
+
url = "https://api.cashfree.com/pg";
|
|
1403
|
+
}
|
|
1404
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1405
|
+
});
|
|
1406
|
+
},
|
|
1407
|
+
/**
|
|
1408
|
+
* Use this API to view all order details for a payment link.
|
|
1409
|
+
* @summary Get Orders for a Payment Link
|
|
1410
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1411
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
1412
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1413
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1414
|
+
* @param {*} [options] Override http request option.
|
|
1415
|
+
* @throws {RequiredError}
|
|
1416
|
+
*/
|
|
1417
|
+
pGLinkFetchOrders(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
1418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1419
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGLinkFetchOrders(x_api_version, link_id, x_request_id, x_idempotency_key, options);
|
|
1420
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1421
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1422
|
+
url = "https://api.cashfree.com/pg";
|
|
1423
|
+
}
|
|
1424
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1425
|
+
});
|
|
1426
|
+
},
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
/**
|
|
1430
|
+
* PaymentLinksApi - object-oriented interface
|
|
1431
|
+
* @export
|
|
1432
|
+
* @class PaymentLinksApi
|
|
1433
|
+
* @extends {BaseAPI}
|
|
1434
|
+
*/
|
|
1435
|
+
/**
|
|
1436
|
+
* PaymentsApi - axios parameter creator
|
|
1437
|
+
* @export
|
|
1438
|
+
*/
|
|
1439
|
+
const PaymentsApiAxiosParamCreator = function (configuration) {
|
|
1440
|
+
return {
|
|
1441
|
+
/**
|
|
1442
|
+
* Use this API to capture or void a preauthorized payment
|
|
1443
|
+
* @summary Preauthorization
|
|
1444
|
+
|
|
1445
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1446
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1447
|
+
* @param {AuthorizeOrderRequest} AuthorizeOrderRequest Request to Capture or Void Transactions
|
|
1448
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1449
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1450
|
+
* @param {*} [options] Override http request option.
|
|
1451
|
+
* @throws {RequiredError}
|
|
1452
|
+
* x_request_id?: string,
|
|
1453
|
+
*/
|
|
1454
|
+
pGAuthorizeOrder: (x_api_version, order_id, AuthorizeOrderRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1455
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1456
|
+
(0, common_1.assertParamExists)('pGAuthorizeOrder', 'x_api_version', x_api_version);
|
|
1457
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
1458
|
+
(0, common_1.assertParamExists)('pGAuthorizeOrder', 'order_id', order_id);
|
|
1459
|
+
// verify required parameter 'AuthorizeOrderRequest' is not null or undefined
|
|
1460
|
+
(0, common_1.assertParamExists)('pGAuthorizeOrder', 'AuthorizeOrderRequest', AuthorizeOrderRequest);
|
|
1461
|
+
const localVarPath = `/orders/{order_id}/authorization`
|
|
1462
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
1463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1464
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1465
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1466
|
+
url = "https://api.cashfree.com/pg";
|
|
1467
|
+
}
|
|
1468
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1469
|
+
let baseOptions;
|
|
1470
|
+
if (configuration) {
|
|
1471
|
+
baseOptions = configuration.baseOptions;
|
|
1472
|
+
}
|
|
1473
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1474
|
+
const localVarHeaderParameter = {};
|
|
1475
|
+
const localVarQueryParameter = {};
|
|
1476
|
+
// authentication XPartnerAPIKey required
|
|
1477
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1478
|
+
// authentication XClientSecret required
|
|
1479
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1480
|
+
// authentication XPartnerMerchantID required
|
|
1481
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1482
|
+
// authentication XClientID required
|
|
1483
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1484
|
+
// authentication XClientSignatureHeader required
|
|
1485
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1486
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1487
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1488
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1489
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1490
|
+
}
|
|
1491
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1492
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1493
|
+
}
|
|
1494
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1495
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1496
|
+
}
|
|
1497
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1498
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1499
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1500
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AuthorizeOrderRequest, localVarRequestOptions, configuration);
|
|
1501
|
+
return {
|
|
1502
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1503
|
+
options: localVarRequestOptions,
|
|
1504
|
+
};
|
|
1505
|
+
}),
|
|
1506
|
+
/**
|
|
1507
|
+
* If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
|
|
1508
|
+
* @summary Submit or Resend OTP
|
|
1509
|
+
|
|
1510
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1511
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
1512
|
+
* @param {OrderAuthenticatePaymentRequest} OrderAuthenticatePaymentRequest Request body to submit/resend headless OTP. To use this API make sure you have headless OTP enabled for your account
|
|
1513
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1514
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1515
|
+
* @param {*} [options] Override http request option.
|
|
1516
|
+
* @throws {RequiredError}
|
|
1517
|
+
* x_request_id?: string,
|
|
1518
|
+
*/
|
|
1519
|
+
pGOrderAuthenticatePayment: (x_api_version, cf_payment_id, OrderAuthenticatePaymentRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1520
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1521
|
+
(0, common_1.assertParamExists)('pGOrderAuthenticatePayment', 'x_api_version', x_api_version);
|
|
1522
|
+
// verify required parameter 'cf_payment_id' is not null or undefined
|
|
1523
|
+
(0, common_1.assertParamExists)('pGOrderAuthenticatePayment', 'cf_payment_id', cf_payment_id);
|
|
1524
|
+
// verify required parameter 'OrderAuthenticatePaymentRequest' is not null or undefined
|
|
1525
|
+
(0, common_1.assertParamExists)('pGOrderAuthenticatePayment', 'OrderAuthenticatePaymentRequest', OrderAuthenticatePaymentRequest);
|
|
1526
|
+
const localVarPath = `/orders/pay/authenticate/{cf_payment_id}`
|
|
1527
|
+
.replace(`{${"cf_payment_id"}}`, encodeURIComponent(String(cf_payment_id)));
|
|
1528
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1529
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1530
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1531
|
+
url = "https://api.cashfree.com/pg";
|
|
1532
|
+
}
|
|
1533
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1534
|
+
let baseOptions;
|
|
1535
|
+
if (configuration) {
|
|
1536
|
+
baseOptions = configuration.baseOptions;
|
|
1537
|
+
}
|
|
1538
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1539
|
+
const localVarHeaderParameter = {};
|
|
1540
|
+
const localVarQueryParameter = {};
|
|
1541
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1542
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1543
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1544
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1545
|
+
}
|
|
1546
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1547
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1548
|
+
}
|
|
1549
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1550
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1551
|
+
}
|
|
1552
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1553
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1554
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1555
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(OrderAuthenticatePaymentRequest, localVarRequestOptions, configuration);
|
|
1556
|
+
return {
|
|
1557
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1558
|
+
options: localVarRequestOptions,
|
|
1559
|
+
};
|
|
1560
|
+
}),
|
|
1561
|
+
/**
|
|
1562
|
+
* Use this API to view payment details of an order for a payment ID.
|
|
1563
|
+
* @summary Get Payment by ID
|
|
1564
|
+
|
|
1565
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1566
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1567
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
1568
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1569
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1570
|
+
* @param {*} [options] Override http request option.
|
|
1571
|
+
* @throws {RequiredError}
|
|
1572
|
+
* x_request_id?: string,
|
|
1573
|
+
*/
|
|
1574
|
+
pGOrderFetchPayment: (x_api_version, order_id, cf_payment_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1575
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1576
|
+
(0, common_1.assertParamExists)('pGOrderFetchPayment', 'x_api_version', x_api_version);
|
|
1577
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
1578
|
+
(0, common_1.assertParamExists)('pGOrderFetchPayment', 'order_id', order_id);
|
|
1579
|
+
// verify required parameter 'cf_payment_id' is not null or undefined
|
|
1580
|
+
(0, common_1.assertParamExists)('pGOrderFetchPayment', 'cf_payment_id', cf_payment_id);
|
|
1581
|
+
const localVarPath = `/orders/{order_id}/payments/{cf_payment_id}`
|
|
1582
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)))
|
|
1583
|
+
.replace(`{${"cf_payment_id"}}`, encodeURIComponent(String(cf_payment_id)));
|
|
1584
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1585
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1586
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1587
|
+
url = "https://api.cashfree.com/pg";
|
|
1588
|
+
}
|
|
1589
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1590
|
+
let baseOptions;
|
|
1591
|
+
if (configuration) {
|
|
1592
|
+
baseOptions = configuration.baseOptions;
|
|
1593
|
+
}
|
|
1594
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1595
|
+
const localVarHeaderParameter = {};
|
|
1596
|
+
const localVarQueryParameter = {};
|
|
1597
|
+
// authentication XPartnerAPIKey required
|
|
1598
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1599
|
+
// authentication XClientSecret required
|
|
1600
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1601
|
+
// authentication XPartnerMerchantID required
|
|
1602
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1603
|
+
// authentication XClientID required
|
|
1604
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1605
|
+
// authentication XClientSignatureHeader required
|
|
1606
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1607
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1608
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1609
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1610
|
+
}
|
|
1611
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1612
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1613
|
+
}
|
|
1614
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1615
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1616
|
+
}
|
|
1617
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1618
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1619
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1620
|
+
return {
|
|
1621
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1622
|
+
options: localVarRequestOptions,
|
|
1623
|
+
};
|
|
1624
|
+
}),
|
|
1625
|
+
/**
|
|
1626
|
+
* Use this API to view all payment details for an order.
|
|
1627
|
+
* @summary Get Payments for an Order
|
|
1628
|
+
|
|
1629
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1630
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1631
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1632
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1633
|
+
* @param {*} [options] Override http request option.
|
|
1634
|
+
* @throws {RequiredError}
|
|
1635
|
+
* x_idempotency_key?: string,
|
|
1636
|
+
*/
|
|
1637
|
+
pGOrderFetchPayments: (x_api_version, order_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1638
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1639
|
+
(0, common_1.assertParamExists)('pGOrderFetchPayments', 'x_api_version', x_api_version);
|
|
1640
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
1641
|
+
(0, common_1.assertParamExists)('pGOrderFetchPayments', 'order_id', order_id);
|
|
1642
|
+
const localVarPath = `/orders/{order_id}/payments`
|
|
1643
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
1644
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1645
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1646
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1647
|
+
url = "https://api.cashfree.com/pg";
|
|
1648
|
+
}
|
|
1649
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1650
|
+
let baseOptions;
|
|
1651
|
+
if (configuration) {
|
|
1652
|
+
baseOptions = configuration.baseOptions;
|
|
1653
|
+
}
|
|
1654
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1655
|
+
const localVarHeaderParameter = {};
|
|
1656
|
+
const localVarQueryParameter = {};
|
|
1657
|
+
// authentication XPartnerAPIKey required
|
|
1658
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1659
|
+
// authentication XClientSecret required
|
|
1660
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1661
|
+
// authentication XPartnerMerchantID required
|
|
1662
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1663
|
+
// authentication XClientID required
|
|
1664
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1665
|
+
// authentication XClientSignatureHeader required
|
|
1666
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1667
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1668
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1669
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1670
|
+
}
|
|
1671
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1672
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1673
|
+
}
|
|
1674
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1675
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1676
|
+
}
|
|
1677
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1678
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1679
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1680
|
+
return {
|
|
1681
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1682
|
+
options: localVarRequestOptions,
|
|
1683
|
+
};
|
|
1684
|
+
}),
|
|
1685
|
+
/**
|
|
1686
|
+
* Use this API when you have already created the orders and want Cashfree to process the payment. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information send an email to \"care@cashfree.com\".
|
|
1687
|
+
* @summary Order Pay
|
|
1688
|
+
|
|
1689
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1690
|
+
* @param {PayOrderRequest} PayOrderRequest Request body to create a transaction at cashfree using `payment_session_id`
|
|
1691
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1692
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1693
|
+
* @param {*} [options] Override http request option.
|
|
1694
|
+
* @throws {RequiredError}
|
|
1695
|
+
* x_idempotency_key?: string,
|
|
1696
|
+
*/
|
|
1697
|
+
pGPayOrder: (x_api_version, PayOrderRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1698
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1699
|
+
(0, common_1.assertParamExists)('pGPayOrder', 'x_api_version', x_api_version);
|
|
1700
|
+
// verify required parameter 'PayOrderRequest' is not null or undefined
|
|
1701
|
+
(0, common_1.assertParamExists)('pGPayOrder', 'PayOrderRequest', PayOrderRequest);
|
|
1702
|
+
const localVarPath = `/orders/sessions`;
|
|
1703
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1704
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1705
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1706
|
+
url = "https://api.cashfree.com/pg";
|
|
1707
|
+
}
|
|
1708
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1709
|
+
let baseOptions;
|
|
1710
|
+
if (configuration) {
|
|
1711
|
+
baseOptions = configuration.baseOptions;
|
|
1712
|
+
}
|
|
1713
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1714
|
+
const localVarHeaderParameter = {};
|
|
1715
|
+
const localVarQueryParameter = {};
|
|
1716
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1717
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1718
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1719
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1720
|
+
}
|
|
1721
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1722
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1723
|
+
}
|
|
1724
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1725
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1726
|
+
}
|
|
1727
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1728
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1729
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1730
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(PayOrderRequest, localVarRequestOptions, configuration);
|
|
1731
|
+
return {
|
|
1732
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1733
|
+
options: localVarRequestOptions,
|
|
1734
|
+
};
|
|
1735
|
+
}),
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
/**
|
|
1739
|
+
* PaymentsApi - functional programming interface
|
|
1740
|
+
* @export
|
|
1741
|
+
*/
|
|
1742
|
+
const PaymentsApiFp = function (configuration) {
|
|
1743
|
+
const localVarAxiosParamCreator = PaymentsApiAxiosParamCreator(configuration);
|
|
1744
|
+
return {
|
|
1745
|
+
/**
|
|
1746
|
+
* Use this API to capture or void a preauthorized payment
|
|
1747
|
+
* @summary Preauthorization
|
|
1748
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1749
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1750
|
+
* @param {AuthorizeOrderRequest} AuthorizeOrderRequest Request to Capture or Void Transactions
|
|
1751
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1752
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1753
|
+
* @param {*} [options] Override http request option.
|
|
1754
|
+
* @throws {RequiredError}
|
|
1755
|
+
*/
|
|
1756
|
+
pGAuthorizeOrder(x_api_version, order_id, AuthorizeOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
1757
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1758
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGAuthorizeOrder(x_api_version, order_id, AuthorizeOrderRequest, x_request_id, x_idempotency_key, options);
|
|
1759
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1760
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1761
|
+
url = "https://api.cashfree.com/pg";
|
|
1762
|
+
}
|
|
1763
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1764
|
+
});
|
|
1765
|
+
},
|
|
1766
|
+
/**
|
|
1767
|
+
* If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
|
|
1768
|
+
* @summary Submit or Resend OTP
|
|
1769
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1770
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
1771
|
+
* @param {OrderAuthenticatePaymentRequest} OrderAuthenticatePaymentRequest Request body to submit/resend headless OTP. To use this API make sure you have headless OTP enabled for your account
|
|
1772
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1773
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1774
|
+
* @param {*} [options] Override http request option.
|
|
1775
|
+
* @throws {RequiredError}
|
|
1776
|
+
*/
|
|
1777
|
+
pGOrderAuthenticatePayment(x_api_version, cf_payment_id, OrderAuthenticatePaymentRequest, x_request_id, x_idempotency_key, options) {
|
|
1778
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1779
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderAuthenticatePayment(x_api_version, cf_payment_id, OrderAuthenticatePaymentRequest, x_request_id, x_idempotency_key, options);
|
|
1780
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1781
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1782
|
+
url = "https://api.cashfree.com/pg";
|
|
1783
|
+
}
|
|
1784
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1785
|
+
});
|
|
1786
|
+
},
|
|
1787
|
+
/**
|
|
1788
|
+
* Use this API to view payment details of an order for a payment ID.
|
|
1789
|
+
* @summary Get Payment by ID
|
|
1790
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1791
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1792
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
1793
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1794
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1795
|
+
* @param {*} [options] Override http request option.
|
|
1796
|
+
* @throws {RequiredError}
|
|
1797
|
+
*/
|
|
1798
|
+
pGOrderFetchPayment(x_api_version, order_id, cf_payment_id, x_request_id, x_idempotency_key, options) {
|
|
1799
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1800
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderFetchPayment(x_api_version, order_id, cf_payment_id, x_request_id, x_idempotency_key, options);
|
|
1801
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1802
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1803
|
+
url = "https://api.cashfree.com/pg";
|
|
1804
|
+
}
|
|
1805
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1806
|
+
});
|
|
1807
|
+
},
|
|
1808
|
+
/**
|
|
1809
|
+
* Use this API to view all payment details for an order.
|
|
1810
|
+
* @summary Get Payments for an Order
|
|
1811
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1812
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1813
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1814
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1815
|
+
* @param {*} [options] Override http request option.
|
|
1816
|
+
* @throws {RequiredError}
|
|
1817
|
+
*/
|
|
1818
|
+
pGOrderFetchPayments(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
1819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1820
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderFetchPayments(x_api_version, order_id, x_request_id, x_idempotency_key, options);
|
|
1821
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1822
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1823
|
+
url = "https://api.cashfree.com/pg";
|
|
1824
|
+
}
|
|
1825
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1826
|
+
});
|
|
1827
|
+
},
|
|
1828
|
+
/**
|
|
1829
|
+
* Use this API when you have already created the orders and want Cashfree to process the payment. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information send an email to \"care@cashfree.com\".
|
|
1830
|
+
* @summary Order Pay
|
|
1831
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1832
|
+
* @param {PayOrderRequest} PayOrderRequest Request body to create a transaction at cashfree using `payment_session_id`
|
|
1833
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1834
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1835
|
+
* @param {*} [options] Override http request option.
|
|
1836
|
+
* @throws {RequiredError}
|
|
1837
|
+
*/
|
|
1838
|
+
pGPayOrder(x_api_version, PayOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
1839
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1840
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGPayOrder(x_api_version, PayOrderRequest, x_request_id, x_idempotency_key, options);
|
|
1841
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1842
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1843
|
+
url = "https://api.cashfree.com/pg";
|
|
1844
|
+
}
|
|
1845
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
1846
|
+
});
|
|
1847
|
+
},
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
/**
|
|
1851
|
+
* PaymentsApi - object-oriented interface
|
|
1852
|
+
* @export
|
|
1853
|
+
* @class PaymentsApi
|
|
1854
|
+
* @extends {BaseAPI}
|
|
1855
|
+
*/
|
|
1856
|
+
/**
|
|
1857
|
+
* RefundsApi - axios parameter creator
|
|
1858
|
+
* @export
|
|
1859
|
+
*/
|
|
1860
|
+
const RefundsApiAxiosParamCreator = function (configuration) {
|
|
1861
|
+
return {
|
|
1862
|
+
/**
|
|
1863
|
+
* Use this API to initiate refunds.
|
|
1864
|
+
* @summary Create Refund
|
|
1865
|
+
|
|
1866
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1867
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1868
|
+
* @param {OrderCreateRefundRequest} OrderCreateRefundRequest Request Body to Create Refunds
|
|
1869
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1870
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1871
|
+
* @param {*} [options] Override http request option.
|
|
1872
|
+
* @throws {RequiredError}
|
|
1873
|
+
* x_request_id?: string,
|
|
1874
|
+
*/
|
|
1875
|
+
pGOrderCreateRefund: (x_api_version, order_id, OrderCreateRefundRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1876
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1877
|
+
(0, common_1.assertParamExists)('pGOrderCreateRefund', 'x_api_version', x_api_version);
|
|
1878
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
1879
|
+
(0, common_1.assertParamExists)('pGOrderCreateRefund', 'order_id', order_id);
|
|
1880
|
+
// verify required parameter 'OrderCreateRefundRequest' is not null or undefined
|
|
1881
|
+
(0, common_1.assertParamExists)('pGOrderCreateRefund', 'OrderCreateRefundRequest', OrderCreateRefundRequest);
|
|
1882
|
+
const localVarPath = `/orders/{order_id}/refunds`
|
|
1883
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
1884
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1885
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1886
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1887
|
+
url = "https://api.cashfree.com/pg";
|
|
1888
|
+
}
|
|
1889
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1890
|
+
let baseOptions;
|
|
1891
|
+
if (configuration) {
|
|
1892
|
+
baseOptions = configuration.baseOptions;
|
|
1893
|
+
}
|
|
1894
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1895
|
+
const localVarHeaderParameter = {};
|
|
1896
|
+
const localVarQueryParameter = {};
|
|
1897
|
+
// authentication XPartnerAPIKey required
|
|
1898
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1899
|
+
// authentication XClientSecret required
|
|
1900
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1901
|
+
// authentication XPartnerMerchantID required
|
|
1902
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1903
|
+
// authentication XClientID required
|
|
1904
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1905
|
+
// authentication XClientSignatureHeader required
|
|
1906
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1907
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1908
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1909
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1910
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1911
|
+
}
|
|
1912
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1913
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1914
|
+
}
|
|
1915
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1916
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1917
|
+
}
|
|
1918
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1919
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1920
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1921
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(OrderCreateRefundRequest, localVarRequestOptions, configuration);
|
|
1922
|
+
return {
|
|
1923
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1924
|
+
options: localVarRequestOptions,
|
|
1925
|
+
};
|
|
1926
|
+
}),
|
|
1927
|
+
/**
|
|
1928
|
+
* Use this API to fetch a specific refund processed on your Cashfree Account.
|
|
1929
|
+
* @summary Get Refund
|
|
1930
|
+
|
|
1931
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1932
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1933
|
+
* @param {string} refund_id Refund Id of the refund you want to fetch.
|
|
1934
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1935
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1936
|
+
* @param {*} [options] Override http request option.
|
|
1937
|
+
* @throws {RequiredError}
|
|
1938
|
+
* x_request_id?: string,
|
|
1939
|
+
*/
|
|
1940
|
+
pGOrderFetchRefund: (x_api_version, order_id, refund_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1941
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
1942
|
+
(0, common_1.assertParamExists)('pGOrderFetchRefund', 'x_api_version', x_api_version);
|
|
1943
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
1944
|
+
(0, common_1.assertParamExists)('pGOrderFetchRefund', 'order_id', order_id);
|
|
1945
|
+
// verify required parameter 'refund_id' is not null or undefined
|
|
1946
|
+
(0, common_1.assertParamExists)('pGOrderFetchRefund', 'refund_id', refund_id);
|
|
1947
|
+
const localVarPath = `/orders/{order_id}/refunds/{refund_id}`
|
|
1948
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)))
|
|
1949
|
+
.replace(`{${"refund_id"}}`, encodeURIComponent(String(refund_id)));
|
|
1950
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1951
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
1952
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
1953
|
+
url = "https://api.cashfree.com/pg";
|
|
1954
|
+
}
|
|
1955
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
1956
|
+
let baseOptions;
|
|
1957
|
+
if (configuration) {
|
|
1958
|
+
baseOptions = configuration.baseOptions;
|
|
1959
|
+
}
|
|
1960
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1961
|
+
const localVarHeaderParameter = {};
|
|
1962
|
+
const localVarQueryParameter = {};
|
|
1963
|
+
// authentication XPartnerAPIKey required
|
|
1964
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
1965
|
+
// authentication XClientSecret required
|
|
1966
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
1967
|
+
// authentication XPartnerMerchantID required
|
|
1968
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
1969
|
+
// authentication XClientID required
|
|
1970
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
1971
|
+
// authentication XClientSignatureHeader required
|
|
1972
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
1973
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
1974
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
1975
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
1976
|
+
}
|
|
1977
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
1978
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
1979
|
+
}
|
|
1980
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
1981
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
1982
|
+
}
|
|
1983
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1984
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1985
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1986
|
+
return {
|
|
1987
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1988
|
+
options: localVarRequestOptions,
|
|
1989
|
+
};
|
|
1990
|
+
}),
|
|
1991
|
+
/**
|
|
1992
|
+
* Use this API to fetch all refunds processed against an order.
|
|
1993
|
+
* @summary Get All Refunds for an Order
|
|
1994
|
+
|
|
1995
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
1996
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
1997
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
1998
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
1999
|
+
* @param {*} [options] Override http request option.
|
|
2000
|
+
* @throws {RequiredError}
|
|
2001
|
+
* x_idempotency_key?: string,
|
|
2002
|
+
*/
|
|
2003
|
+
pGOrderFetchRefunds: (x_api_version, order_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2004
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2005
|
+
(0, common_1.assertParamExists)('pGOrderFetchRefunds', 'x_api_version', x_api_version);
|
|
2006
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
2007
|
+
(0, common_1.assertParamExists)('pGOrderFetchRefunds', 'order_id', order_id);
|
|
2008
|
+
const localVarPath = `/orders/{order_id}/refunds`
|
|
2009
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
2010
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2011
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2012
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2013
|
+
url = "https://api.cashfree.com/pg";
|
|
2014
|
+
}
|
|
2015
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2016
|
+
let baseOptions;
|
|
2017
|
+
if (configuration) {
|
|
2018
|
+
baseOptions = configuration.baseOptions;
|
|
2019
|
+
}
|
|
2020
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2021
|
+
const localVarHeaderParameter = {};
|
|
2022
|
+
const localVarQueryParameter = {};
|
|
2023
|
+
// authentication XPartnerAPIKey required
|
|
2024
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2025
|
+
// authentication XClientSecret required
|
|
2026
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2027
|
+
// authentication XPartnerMerchantID required
|
|
2028
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2029
|
+
// authentication XClientID required
|
|
2030
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2031
|
+
// authentication XClientSignatureHeader required
|
|
2032
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2033
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2034
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2035
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2036
|
+
}
|
|
2037
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2038
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2039
|
+
}
|
|
2040
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2041
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2042
|
+
}
|
|
2043
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2044
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2045
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2046
|
+
return {
|
|
2047
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2048
|
+
options: localVarRequestOptions,
|
|
2049
|
+
};
|
|
2050
|
+
}),
|
|
2051
|
+
};
|
|
2052
|
+
};
|
|
2053
|
+
/**
|
|
2054
|
+
* RefundsApi - functional programming interface
|
|
2055
|
+
* @export
|
|
2056
|
+
*/
|
|
2057
|
+
const RefundsApiFp = function (configuration) {
|
|
2058
|
+
const localVarAxiosParamCreator = RefundsApiAxiosParamCreator(configuration);
|
|
2059
|
+
return {
|
|
2060
|
+
/**
|
|
2061
|
+
* Use this API to initiate refunds.
|
|
2062
|
+
* @summary Create Refund
|
|
2063
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2064
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
2065
|
+
* @param {OrderCreateRefundRequest} OrderCreateRefundRequest Request Body to Create Refunds
|
|
2066
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2067
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2068
|
+
* @param {*} [options] Override http request option.
|
|
2069
|
+
* @throws {RequiredError}
|
|
2070
|
+
*/
|
|
2071
|
+
pGOrderCreateRefund(x_api_version, order_id, OrderCreateRefundRequest, x_request_id, x_idempotency_key, options) {
|
|
2072
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2073
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderCreateRefund(x_api_version, order_id, OrderCreateRefundRequest, x_request_id, x_idempotency_key, options);
|
|
2074
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2075
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2076
|
+
url = "https://api.cashfree.com/pg";
|
|
2077
|
+
}
|
|
2078
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2079
|
+
});
|
|
2080
|
+
},
|
|
2081
|
+
/**
|
|
2082
|
+
* Use this API to fetch a specific refund processed on your Cashfree Account.
|
|
2083
|
+
* @summary Get Refund
|
|
2084
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2085
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
2086
|
+
* @param {string} refund_id Refund Id of the refund you want to fetch.
|
|
2087
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2088
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2089
|
+
* @param {*} [options] Override http request option.
|
|
2090
|
+
* @throws {RequiredError}
|
|
2091
|
+
*/
|
|
2092
|
+
pGOrderFetchRefund(x_api_version, order_id, refund_id, x_request_id, x_idempotency_key, options) {
|
|
2093
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2094
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderFetchRefund(x_api_version, order_id, refund_id, x_request_id, x_idempotency_key, options);
|
|
2095
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2096
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2097
|
+
url = "https://api.cashfree.com/pg";
|
|
2098
|
+
}
|
|
2099
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2100
|
+
});
|
|
2101
|
+
},
|
|
2102
|
+
/**
|
|
2103
|
+
* Use this API to fetch all refunds processed against an order.
|
|
2104
|
+
* @summary Get All Refunds for an Order
|
|
2105
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2106
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
2107
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2108
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2109
|
+
* @param {*} [options] Override http request option.
|
|
2110
|
+
* @throws {RequiredError}
|
|
2111
|
+
*/
|
|
2112
|
+
pGOrderFetchRefunds(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
2113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2114
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderFetchRefunds(x_api_version, order_id, x_request_id, x_idempotency_key, options);
|
|
2115
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2116
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2117
|
+
url = "https://api.cashfree.com/pg";
|
|
2118
|
+
}
|
|
2119
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2120
|
+
});
|
|
2121
|
+
},
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
/**
|
|
2125
|
+
* RefundsApi - object-oriented interface
|
|
2126
|
+
* @export
|
|
2127
|
+
* @class RefundsApi
|
|
2128
|
+
* @extends {BaseAPI}
|
|
2129
|
+
*/
|
|
2130
|
+
/**
|
|
2131
|
+
* SettlementReconciliationApi - axios parameter creator
|
|
2132
|
+
* @export
|
|
2133
|
+
*/
|
|
2134
|
+
const SettlementReconciliationApiAxiosParamCreator = function (configuration) {
|
|
2135
|
+
return {
|
|
2136
|
+
/**
|
|
2137
|
+
* Use this API to get all settlement details by specifying the settlement ID, settlement UTR or date range.
|
|
2138
|
+
* @summary Get All Settlements
|
|
2139
|
+
|
|
2140
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2141
|
+
* @param {FetchSettlementsRequest} FetchSettlementsRequest Request Body to get the settlements
|
|
2142
|
+
* @param {string} [Content_Type] application/json
|
|
2143
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2144
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2145
|
+
* @param {string} [Accept] application/json
|
|
2146
|
+
* @param {*} [options] Override http request option.
|
|
2147
|
+
* @throws {RequiredError}
|
|
2148
|
+
* x_request_id?: string,
|
|
2149
|
+
*/
|
|
2150
|
+
pGFetchSettlements: (x_api_version, FetchSettlementsRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2151
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2152
|
+
(0, common_1.assertParamExists)('pGFetchSettlements', 'x_api_version', x_api_version);
|
|
2153
|
+
// verify required parameter 'FetchSettlementsRequest' is not null or undefined
|
|
2154
|
+
(0, common_1.assertParamExists)('pGFetchSettlements', 'FetchSettlementsRequest', FetchSettlementsRequest);
|
|
2155
|
+
const localVarPath = `/settlements`;
|
|
2156
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2157
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2158
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2159
|
+
url = "https://api.cashfree.com/pg";
|
|
2160
|
+
}
|
|
2161
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2162
|
+
let baseOptions;
|
|
2163
|
+
if (configuration) {
|
|
2164
|
+
baseOptions = configuration.baseOptions;
|
|
2165
|
+
}
|
|
2166
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2167
|
+
const localVarHeaderParameter = {};
|
|
2168
|
+
const localVarQueryParameter = {};
|
|
2169
|
+
// authentication XPartnerAPIKey required
|
|
2170
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2171
|
+
// authentication XClientSecret required
|
|
2172
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2173
|
+
// authentication XPartnerMerchantID required
|
|
2174
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2175
|
+
// authentication XClientID required
|
|
2176
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2177
|
+
// authentication XClientSignatureHeader required
|
|
2178
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2179
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2180
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2181
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2182
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2183
|
+
}
|
|
2184
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2185
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2186
|
+
}
|
|
2187
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2188
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2189
|
+
}
|
|
2190
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2191
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2192
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2193
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(FetchSettlementsRequest, localVarRequestOptions, configuration);
|
|
2194
|
+
return {
|
|
2195
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2196
|
+
options: localVarRequestOptions,
|
|
2197
|
+
};
|
|
2198
|
+
}),
|
|
2199
|
+
/**
|
|
2200
|
+
* - Use this API to get settlement reconciliation details using Settlement ID, settlement UTR or date range. - This API will return events for the settlement IDs you want
|
|
2201
|
+
* @summary Settlement Reconciliation
|
|
2202
|
+
|
|
2203
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2204
|
+
* @param {SettlementFetchReconRequest} SettlementFetchReconRequest Request Body for the settlement reconciliation
|
|
2205
|
+
* @param {string} [Content_Type] application/json
|
|
2206
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2207
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2208
|
+
* @param {string} [Accept] application/json
|
|
2209
|
+
* @param {*} [options] Override http request option.
|
|
2210
|
+
* @throws {RequiredError}
|
|
2211
|
+
* x_request_id?: string,
|
|
2212
|
+
*/
|
|
2213
|
+
pGSettlementFetchRecon: (x_api_version, SettlementFetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2214
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2215
|
+
(0, common_1.assertParamExists)('pGSettlementFetchRecon', 'x_api_version', x_api_version);
|
|
2216
|
+
// verify required parameter 'SettlementFetchReconRequest' is not null or undefined
|
|
2217
|
+
(0, common_1.assertParamExists)('pGSettlementFetchRecon', 'SettlementFetchReconRequest', SettlementFetchReconRequest);
|
|
2218
|
+
const localVarPath = `/settlement/recon`;
|
|
2219
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2220
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2221
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2222
|
+
url = "https://api.cashfree.com/pg";
|
|
2223
|
+
}
|
|
2224
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2225
|
+
let baseOptions;
|
|
2226
|
+
if (configuration) {
|
|
2227
|
+
baseOptions = configuration.baseOptions;
|
|
2228
|
+
}
|
|
2229
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2230
|
+
const localVarHeaderParameter = {};
|
|
2231
|
+
const localVarQueryParameter = {};
|
|
2232
|
+
// authentication XPartnerAPIKey required
|
|
2233
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2234
|
+
// authentication XClientSecret required
|
|
2235
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2236
|
+
// authentication XPartnerMerchantID required
|
|
2237
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2238
|
+
// authentication XClientID required
|
|
2239
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2240
|
+
// authentication XClientSignatureHeader required
|
|
2241
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2242
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2243
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2244
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2245
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2246
|
+
}
|
|
2247
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2248
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2249
|
+
}
|
|
2250
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2251
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2252
|
+
}
|
|
2253
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2254
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2255
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2256
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(SettlementFetchReconRequest, localVarRequestOptions, configuration);
|
|
2257
|
+
return {
|
|
2258
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2259
|
+
options: localVarRequestOptions,
|
|
2260
|
+
};
|
|
2261
|
+
}),
|
|
2262
|
+
};
|
|
2263
|
+
};
|
|
2264
|
+
/**
|
|
2265
|
+
* SettlementReconciliationApi - functional programming interface
|
|
2266
|
+
* @export
|
|
2267
|
+
*/
|
|
2268
|
+
const SettlementReconciliationApiFp = function (configuration) {
|
|
2269
|
+
const localVarAxiosParamCreator = SettlementReconciliationApiAxiosParamCreator(configuration);
|
|
2270
|
+
return {
|
|
2271
|
+
/**
|
|
2272
|
+
* Use this API to get all settlement details by specifying the settlement ID, settlement UTR or date range.
|
|
2273
|
+
* @summary Get All Settlements
|
|
2274
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2275
|
+
* @param {FetchSettlementsRequest} FetchSettlementsRequest Request Body to get the settlements
|
|
2276
|
+
* @param {string} [Content_Type] application/json
|
|
2277
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2278
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2279
|
+
* @param {string} [Accept] application/json
|
|
2280
|
+
* @param {*} [options] Override http request option.
|
|
2281
|
+
* @throws {RequiredError}
|
|
2282
|
+
*/
|
|
2283
|
+
pGFetchSettlements(x_api_version, FetchSettlementsRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
2284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2285
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGFetchSettlements(x_api_version, FetchSettlementsRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options);
|
|
2286
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2287
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2288
|
+
url = "https://api.cashfree.com/pg";
|
|
2289
|
+
}
|
|
2290
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2291
|
+
});
|
|
2292
|
+
},
|
|
2293
|
+
/**
|
|
2294
|
+
* - Use this API to get settlement reconciliation details using Settlement ID, settlement UTR or date range. - This API will return events for the settlement IDs you want
|
|
2295
|
+
* @summary Settlement Reconciliation
|
|
2296
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2297
|
+
* @param {SettlementFetchReconRequest} SettlementFetchReconRequest Request Body for the settlement reconciliation
|
|
2298
|
+
* @param {string} [Content_Type] application/json
|
|
2299
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2300
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2301
|
+
* @param {string} [Accept] application/json
|
|
2302
|
+
* @param {*} [options] Override http request option.
|
|
2303
|
+
* @throws {RequiredError}
|
|
2304
|
+
*/
|
|
2305
|
+
pGSettlementFetchRecon(x_api_version, SettlementFetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
2306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2307
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGSettlementFetchRecon(x_api_version, SettlementFetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options);
|
|
2308
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2309
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2310
|
+
url = "https://api.cashfree.com/pg";
|
|
2311
|
+
}
|
|
2312
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2313
|
+
});
|
|
2314
|
+
},
|
|
2315
|
+
};
|
|
2316
|
+
};
|
|
2317
|
+
/**
|
|
2318
|
+
* SettlementReconciliationApi - object-oriented interface
|
|
2319
|
+
* @export
|
|
2320
|
+
* @class SettlementReconciliationApi
|
|
2321
|
+
* @extends {BaseAPI}
|
|
2322
|
+
*/
|
|
2323
|
+
/**
|
|
2324
|
+
* SettlementsApi - axios parameter creator
|
|
2325
|
+
* @export
|
|
2326
|
+
*/
|
|
2327
|
+
const SettlementsApiAxiosParamCreator = function (configuration) {
|
|
2328
|
+
return {
|
|
2329
|
+
/**
|
|
2330
|
+
* Use this API to view all the settlements of a particular order.
|
|
2331
|
+
* @summary Get Settlements by Order ID
|
|
2332
|
+
|
|
2333
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2334
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
2335
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2336
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2337
|
+
* @param {*} [options] Override http request option.
|
|
2338
|
+
* @throws {RequiredError}
|
|
2339
|
+
* x_idempotency_key?: string,
|
|
2340
|
+
*/
|
|
2341
|
+
pGOrderFetchSettlement: (x_api_version, order_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2342
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2343
|
+
(0, common_1.assertParamExists)('pGOrderFetchSettlement', 'x_api_version', x_api_version);
|
|
2344
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
2345
|
+
(0, common_1.assertParamExists)('pGOrderFetchSettlement', 'order_id', order_id);
|
|
2346
|
+
const localVarPath = `/orders/{order_id}/settlements`
|
|
2347
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
2348
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2349
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2350
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2351
|
+
url = "https://api.cashfree.com/pg";
|
|
2352
|
+
}
|
|
2353
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2354
|
+
let baseOptions;
|
|
2355
|
+
if (configuration) {
|
|
2356
|
+
baseOptions = configuration.baseOptions;
|
|
2357
|
+
}
|
|
2358
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2359
|
+
const localVarHeaderParameter = {};
|
|
2360
|
+
const localVarQueryParameter = {};
|
|
2361
|
+
// authentication XPartnerAPIKey required
|
|
2362
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2363
|
+
// authentication XClientSecret required
|
|
2364
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2365
|
+
// authentication XPartnerMerchantID required
|
|
2366
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2367
|
+
// authentication XClientID required
|
|
2368
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2369
|
+
// authentication XClientSignatureHeader required
|
|
2370
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2371
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2372
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2373
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2374
|
+
}
|
|
2375
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2376
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2377
|
+
}
|
|
2378
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2379
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2380
|
+
}
|
|
2381
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2382
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2383
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2384
|
+
return {
|
|
2385
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2386
|
+
options: localVarRequestOptions,
|
|
2387
|
+
};
|
|
2388
|
+
}),
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
2391
|
+
/**
|
|
2392
|
+
* SettlementsApi - functional programming interface
|
|
2393
|
+
* @export
|
|
2394
|
+
*/
|
|
2395
|
+
const SettlementsApiFp = function (configuration) {
|
|
2396
|
+
const localVarAxiosParamCreator = SettlementsApiAxiosParamCreator(configuration);
|
|
2397
|
+
return {
|
|
2398
|
+
/**
|
|
2399
|
+
* Use this API to view all the settlements of a particular order.
|
|
2400
|
+
* @summary Get Settlements by Order ID
|
|
2401
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2402
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
2403
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2404
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2405
|
+
* @param {*} [options] Override http request option.
|
|
2406
|
+
* @throws {RequiredError}
|
|
2407
|
+
*/
|
|
2408
|
+
pGOrderFetchSettlement(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
2409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2410
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGOrderFetchSettlement(x_api_version, order_id, x_request_id, x_idempotency_key, options);
|
|
2411
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2412
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2413
|
+
url = "https://api.cashfree.com/pg";
|
|
2414
|
+
}
|
|
2415
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2416
|
+
});
|
|
2417
|
+
},
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
/**
|
|
2421
|
+
* SettlementsApi - object-oriented interface
|
|
2422
|
+
* @export
|
|
2423
|
+
* @class SettlementsApi
|
|
2424
|
+
* @extends {BaseAPI}
|
|
2425
|
+
*/
|
|
2426
|
+
/**
|
|
2427
|
+
* SoftPOSApi - axios parameter creator
|
|
2428
|
+
* @export
|
|
2429
|
+
*/
|
|
2430
|
+
const SoftPOSApiAxiosParamCreator = function (configuration) {
|
|
2431
|
+
return {
|
|
2432
|
+
/**
|
|
2433
|
+
* Use this API to create new terminals to use softPOS.
|
|
2434
|
+
* @summary Create Terminal
|
|
2435
|
+
|
|
2436
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2437
|
+
* @param {CreateTerminalRequest} CreateTerminalRequest Request Body to Create Terminal for SPOS
|
|
2438
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2439
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2440
|
+
* @param {*} [options] Override http request option.
|
|
2441
|
+
* @throws {RequiredError}
|
|
2442
|
+
* x_idempotency_key?: string,
|
|
2443
|
+
*/
|
|
2444
|
+
sposCreateTerminal: (x_api_version, CreateTerminalRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2445
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2446
|
+
(0, common_1.assertParamExists)('sposCreateTerminal', 'x_api_version', x_api_version);
|
|
2447
|
+
// verify required parameter 'CreateTerminalRequest' is not null or undefined
|
|
2448
|
+
(0, common_1.assertParamExists)('sposCreateTerminal', 'CreateTerminalRequest', CreateTerminalRequest);
|
|
2449
|
+
const localVarPath = `/terminal`;
|
|
2450
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2451
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2452
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2453
|
+
url = "https://api.cashfree.com/pg";
|
|
2454
|
+
}
|
|
2455
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2456
|
+
let baseOptions;
|
|
2457
|
+
if (configuration) {
|
|
2458
|
+
baseOptions = configuration.baseOptions;
|
|
2459
|
+
}
|
|
2460
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2461
|
+
const localVarHeaderParameter = {};
|
|
2462
|
+
const localVarQueryParameter = {};
|
|
2463
|
+
// authentication XPartnerAPIKey required
|
|
2464
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2465
|
+
// authentication XClientSecret required
|
|
2466
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2467
|
+
// authentication XPartnerMerchantID required
|
|
2468
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2469
|
+
// authentication XClientID required
|
|
2470
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2471
|
+
// authentication XClientSignatureHeader required
|
|
2472
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2473
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2474
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2475
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2476
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2477
|
+
}
|
|
2478
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2479
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2480
|
+
}
|
|
2481
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2482
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2483
|
+
}
|
|
2484
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2485
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2486
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2487
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateTerminalRequest, localVarRequestOptions, configuration);
|
|
2488
|
+
return {
|
|
2489
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2490
|
+
options: localVarRequestOptions,
|
|
2491
|
+
};
|
|
2492
|
+
}),
|
|
2493
|
+
/**
|
|
2494
|
+
* Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
|
|
2495
|
+
* @summary Create Terminal
|
|
2496
|
+
|
|
2497
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2498
|
+
* @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
|
|
2499
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2500
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2501
|
+
* @param {*} [options] Override http request option.
|
|
2502
|
+
* @throws {RequiredError}
|
|
2503
|
+
* x_idempotency_key?: string,
|
|
2504
|
+
*/
|
|
2505
|
+
sposCreateTerminalTransaction: (x_api_version, CreateTerminalTransactionRequest, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2506
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2507
|
+
(0, common_1.assertParamExists)('sposCreateTerminalTransaction', 'x_api_version', x_api_version);
|
|
2508
|
+
// verify required parameter 'CreateTerminalTransactionRequest' is not null or undefined
|
|
2509
|
+
(0, common_1.assertParamExists)('sposCreateTerminalTransaction', 'CreateTerminalTransactionRequest', CreateTerminalTransactionRequest);
|
|
2510
|
+
const localVarPath = `/terminal/transactions`;
|
|
2511
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2512
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2513
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2514
|
+
url = "https://api.cashfree.com/pg";
|
|
2515
|
+
}
|
|
2516
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2517
|
+
let baseOptions;
|
|
2518
|
+
if (configuration) {
|
|
2519
|
+
baseOptions = configuration.baseOptions;
|
|
2520
|
+
}
|
|
2521
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2522
|
+
const localVarHeaderParameter = {};
|
|
2523
|
+
const localVarQueryParameter = {};
|
|
2524
|
+
// authentication XPartnerAPIKey required
|
|
2525
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2526
|
+
// authentication XClientSecret required
|
|
2527
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2528
|
+
// authentication XPartnerMerchantID required
|
|
2529
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2530
|
+
// authentication XClientID required
|
|
2531
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2532
|
+
// authentication XClientSignatureHeader required
|
|
2533
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2534
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2535
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2536
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2537
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2538
|
+
}
|
|
2539
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2540
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2541
|
+
}
|
|
2542
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2543
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2544
|
+
}
|
|
2545
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2546
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2547
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2548
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(CreateTerminalTransactionRequest, localVarRequestOptions, configuration);
|
|
2549
|
+
return {
|
|
2550
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2551
|
+
options: localVarRequestOptions,
|
|
2552
|
+
};
|
|
2553
|
+
}),
|
|
2554
|
+
/**
|
|
2555
|
+
* Use this API to view all details of a terminal.
|
|
2556
|
+
* @summary Get terminal status using phone number
|
|
2557
|
+
|
|
2558
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2559
|
+
* @param {string} terminal_phone_no The terminal for which you want to view the order details.
|
|
2560
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2561
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2562
|
+
* @param {*} [options] Override http request option.
|
|
2563
|
+
* @throws {RequiredError}
|
|
2564
|
+
* x_idempotency_key?: string,
|
|
2565
|
+
*/
|
|
2566
|
+
sposFetchTerminal: (x_api_version, terminal_phone_no, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2567
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2568
|
+
(0, common_1.assertParamExists)('sposFetchTerminal', 'x_api_version', x_api_version);
|
|
2569
|
+
// verify required parameter 'terminal_phone_no' is not null or undefined
|
|
2570
|
+
(0, common_1.assertParamExists)('sposFetchTerminal', 'terminal_phone_no', terminal_phone_no);
|
|
2571
|
+
const localVarPath = `/terminal/{terminal_phone_no}`
|
|
2572
|
+
.replace(`{${"terminal_phone_no"}}`, encodeURIComponent(String(terminal_phone_no)));
|
|
2573
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2574
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2575
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2576
|
+
url = "https://api.cashfree.com/pg";
|
|
2577
|
+
}
|
|
2578
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2579
|
+
let baseOptions;
|
|
2580
|
+
if (configuration) {
|
|
2581
|
+
baseOptions = configuration.baseOptions;
|
|
2582
|
+
}
|
|
2583
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2584
|
+
const localVarHeaderParameter = {};
|
|
2585
|
+
const localVarQueryParameter = {};
|
|
2586
|
+
// authentication XPartnerAPIKey required
|
|
2587
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2588
|
+
// authentication XClientSecret required
|
|
2589
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2590
|
+
// authentication XPartnerMerchantID required
|
|
2591
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2592
|
+
// authentication XClientID required
|
|
2593
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2594
|
+
// authentication XClientSignatureHeader required
|
|
2595
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2596
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2597
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2598
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2599
|
+
}
|
|
2600
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2601
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2602
|
+
}
|
|
2603
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2604
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2605
|
+
}
|
|
2606
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2607
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2608
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2609
|
+
return {
|
|
2610
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2611
|
+
options: localVarRequestOptions,
|
|
2612
|
+
};
|
|
2613
|
+
}),
|
|
2614
|
+
/**
|
|
2615
|
+
* You can fetch all the StaticQRs corresponding to given terminal id or phone number. Provide either the terminal_phone_no or terminal_id in the request.
|
|
2616
|
+
* @summary Fetch Terminal QR Codes
|
|
2617
|
+
|
|
2618
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2619
|
+
* @param {string} terminal_phone_no Phone number assigned to the terminal. Required if you are not providing the cf_terminal_id in the request.
|
|
2620
|
+
* @param {string} cf_terminal_id Cashfree terminal id for which you want to get staticQRs. Required if you are not providing the terminal_phone_number in the request.
|
|
2621
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2622
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2623
|
+
* @param {*} [options] Override http request option.
|
|
2624
|
+
* @throws {RequiredError}
|
|
2625
|
+
* x_request_id?: string,
|
|
2626
|
+
*/
|
|
2627
|
+
sposFetchTerminalQRCodes: (x_api_version, terminal_phone_no, cf_terminal_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2628
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2629
|
+
(0, common_1.assertParamExists)('sposFetchTerminalQRCodes', 'x_api_version', x_api_version);
|
|
2630
|
+
// verify required parameter 'terminal_phone_no' is not null or undefined
|
|
2631
|
+
(0, common_1.assertParamExists)('sposFetchTerminalQRCodes', 'terminal_phone_no', terminal_phone_no);
|
|
2632
|
+
// verify required parameter 'cf_terminal_id' is not null or undefined
|
|
2633
|
+
(0, common_1.assertParamExists)('sposFetchTerminalQRCodes', 'cf_terminal_id', cf_terminal_id);
|
|
2634
|
+
const localVarPath = `/terminal/qrcodes`;
|
|
2635
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2636
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2637
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2638
|
+
url = "https://api.cashfree.com/pg";
|
|
2639
|
+
}
|
|
2640
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2641
|
+
let baseOptions;
|
|
2642
|
+
if (configuration) {
|
|
2643
|
+
baseOptions = configuration.baseOptions;
|
|
2644
|
+
}
|
|
2645
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2646
|
+
const localVarHeaderParameter = {};
|
|
2647
|
+
const localVarQueryParameter = {};
|
|
2648
|
+
// authentication XPartnerAPIKey required
|
|
2649
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2650
|
+
// authentication XClientSecret required
|
|
2651
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2652
|
+
// authentication XPartnerMerchantID required
|
|
2653
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2654
|
+
// authentication XClientID required
|
|
2655
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2656
|
+
// authentication XClientSignatureHeader required
|
|
2657
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2658
|
+
if (terminal_phone_no !== undefined) {
|
|
2659
|
+
localVarQueryParameter['terminal_phone_no'] = terminal_phone_no;
|
|
2660
|
+
}
|
|
2661
|
+
if (cf_terminal_id !== undefined) {
|
|
2662
|
+
localVarQueryParameter['cf_terminal_id'] = cf_terminal_id;
|
|
2663
|
+
}
|
|
2664
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2665
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2666
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2667
|
+
}
|
|
2668
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2669
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2670
|
+
}
|
|
2671
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2672
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2673
|
+
}
|
|
2674
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2675
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2676
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2677
|
+
return {
|
|
2678
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2679
|
+
options: localVarRequestOptions,
|
|
2680
|
+
};
|
|
2681
|
+
}),
|
|
2682
|
+
};
|
|
2683
|
+
};
|
|
2684
|
+
/**
|
|
2685
|
+
* SoftPOSApi - functional programming interface
|
|
2686
|
+
* @export
|
|
2687
|
+
*/
|
|
2688
|
+
const SoftPOSApiFp = function (configuration) {
|
|
2689
|
+
const localVarAxiosParamCreator = SoftPOSApiAxiosParamCreator(configuration);
|
|
2690
|
+
return {
|
|
2691
|
+
/**
|
|
2692
|
+
* Use this API to create new terminals to use softPOS.
|
|
2693
|
+
* @summary Create Terminal
|
|
2694
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2695
|
+
* @param {CreateTerminalRequest} CreateTerminalRequest Request Body to Create Terminal for SPOS
|
|
2696
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2697
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2698
|
+
* @param {*} [options] Override http request option.
|
|
2699
|
+
* @throws {RequiredError}
|
|
2700
|
+
*/
|
|
2701
|
+
sposCreateTerminal(x_api_version, CreateTerminalRequest, x_request_id, x_idempotency_key, options) {
|
|
2702
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2703
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sposCreateTerminal(x_api_version, CreateTerminalRequest, x_request_id, x_idempotency_key, options);
|
|
2704
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2705
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2706
|
+
url = "https://api.cashfree.com/pg";
|
|
2707
|
+
}
|
|
2708
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2709
|
+
});
|
|
2710
|
+
},
|
|
2711
|
+
/**
|
|
2712
|
+
* Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
|
|
2713
|
+
* @summary Create Terminal
|
|
2714
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2715
|
+
* @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
|
|
2716
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2717
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2718
|
+
* @param {*} [options] Override http request option.
|
|
2719
|
+
* @throws {RequiredError}
|
|
2720
|
+
*/
|
|
2721
|
+
sposCreateTerminalTransaction(x_api_version, CreateTerminalTransactionRequest, x_request_id, x_idempotency_key, options) {
|
|
2722
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2723
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sposCreateTerminalTransaction(x_api_version, CreateTerminalTransactionRequest, x_request_id, x_idempotency_key, options);
|
|
2724
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2725
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2726
|
+
url = "https://api.cashfree.com/pg";
|
|
2727
|
+
}
|
|
2728
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2729
|
+
});
|
|
2730
|
+
},
|
|
2731
|
+
/**
|
|
2732
|
+
* Use this API to view all details of a terminal.
|
|
2733
|
+
* @summary Get terminal status using phone number
|
|
2734
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2735
|
+
* @param {string} terminal_phone_no The terminal for which you want to view the order details.
|
|
2736
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2737
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2738
|
+
* @param {*} [options] Override http request option.
|
|
2739
|
+
* @throws {RequiredError}
|
|
2740
|
+
*/
|
|
2741
|
+
sposFetchTerminal(x_api_version, terminal_phone_no, x_request_id, x_idempotency_key, options) {
|
|
2742
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2743
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sposFetchTerminal(x_api_version, terminal_phone_no, x_request_id, x_idempotency_key, options);
|
|
2744
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2745
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2746
|
+
url = "https://api.cashfree.com/pg";
|
|
2747
|
+
}
|
|
2748
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2749
|
+
});
|
|
2750
|
+
},
|
|
2751
|
+
/**
|
|
2752
|
+
* You can fetch all the StaticQRs corresponding to given terminal id or phone number. Provide either the terminal_phone_no or terminal_id in the request.
|
|
2753
|
+
* @summary Fetch Terminal QR Codes
|
|
2754
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2755
|
+
* @param {string} terminal_phone_no Phone number assigned to the terminal. Required if you are not providing the cf_terminal_id in the request.
|
|
2756
|
+
* @param {string} cf_terminal_id Cashfree terminal id for which you want to get staticQRs. Required if you are not providing the terminal_phone_number in the request.
|
|
2757
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2758
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2759
|
+
* @param {*} [options] Override http request option.
|
|
2760
|
+
* @throws {RequiredError}
|
|
2761
|
+
*/
|
|
2762
|
+
sposFetchTerminalQRCodes(x_api_version, terminal_phone_no, cf_terminal_id, x_request_id, x_idempotency_key, options) {
|
|
2763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2764
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.sposFetchTerminalQRCodes(x_api_version, terminal_phone_no, cf_terminal_id, x_request_id, x_idempotency_key, options);
|
|
2765
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2766
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2767
|
+
url = "https://api.cashfree.com/pg";
|
|
2768
|
+
}
|
|
2769
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
2770
|
+
});
|
|
2771
|
+
},
|
|
2772
|
+
};
|
|
2773
|
+
};
|
|
2774
|
+
/**
|
|
2775
|
+
* SoftPOSApi - object-oriented interface
|
|
2776
|
+
* @export
|
|
2777
|
+
* @class SoftPOSApi
|
|
2778
|
+
* @extends {BaseAPI}
|
|
2779
|
+
*/
|
|
2780
|
+
/**
|
|
2781
|
+
* TokenVaultApi - axios parameter creator
|
|
2782
|
+
* @export
|
|
2783
|
+
*/
|
|
2784
|
+
const TokenVaultApiAxiosParamCreator = function (configuration) {
|
|
2785
|
+
return {
|
|
2786
|
+
/**
|
|
2787
|
+
* Use this API to delete a saved card instrument for a customer_id and instrument_id
|
|
2788
|
+
* @summary Delete Saved Card Instrument
|
|
2789
|
+
|
|
2790
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2791
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
2792
|
+
* @param {string} instrument_id The instrument_id which needs to be deleted
|
|
2793
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2794
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2795
|
+
* @param {*} [options] Override http request option.
|
|
2796
|
+
* @throws {RequiredError}
|
|
2797
|
+
* x_request_id?: string,
|
|
2798
|
+
*/
|
|
2799
|
+
pGCustomerDeleteInstrument: (x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2800
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2801
|
+
(0, common_1.assertParamExists)('pGCustomerDeleteInstrument', 'x_api_version', x_api_version);
|
|
2802
|
+
// verify required parameter 'customer_id' is not null or undefined
|
|
2803
|
+
(0, common_1.assertParamExists)('pGCustomerDeleteInstrument', 'customer_id', customer_id);
|
|
2804
|
+
// verify required parameter 'instrument_id' is not null or undefined
|
|
2805
|
+
(0, common_1.assertParamExists)('pGCustomerDeleteInstrument', 'instrument_id', instrument_id);
|
|
2806
|
+
const localVarPath = `/customers/{customer_id}/instruments/{instrument_id}`
|
|
2807
|
+
.replace(`{${"customer_id"}}`, encodeURIComponent(String(customer_id)))
|
|
2808
|
+
.replace(`{${"instrument_id"}}`, encodeURIComponent(String(instrument_id)));
|
|
2809
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2810
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2811
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2812
|
+
url = "https://api.cashfree.com/pg";
|
|
2813
|
+
}
|
|
2814
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2815
|
+
let baseOptions;
|
|
2816
|
+
if (configuration) {
|
|
2817
|
+
baseOptions = configuration.baseOptions;
|
|
2818
|
+
}
|
|
2819
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
2820
|
+
const localVarHeaderParameter = {};
|
|
2821
|
+
const localVarQueryParameter = {};
|
|
2822
|
+
// authentication XPartnerAPIKey required
|
|
2823
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2824
|
+
// authentication XClientSecret required
|
|
2825
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2826
|
+
// authentication XPartnerMerchantID required
|
|
2827
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2828
|
+
// authentication XClientID required
|
|
2829
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2830
|
+
// authentication XClientSignatureHeader required
|
|
2831
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2832
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2833
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2834
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2835
|
+
}
|
|
2836
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2837
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2838
|
+
}
|
|
2839
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2840
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2841
|
+
}
|
|
2842
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2843
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2844
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2845
|
+
return {
|
|
2846
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2847
|
+
options: localVarRequestOptions,
|
|
2848
|
+
};
|
|
2849
|
+
}),
|
|
2850
|
+
/**
|
|
2851
|
+
* Use this API to fetch a single specific saved card for a customer_id by it\'s instrument_id
|
|
2852
|
+
* @summary Fetch Specific Saved Card Instrument
|
|
2853
|
+
|
|
2854
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2855
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
2856
|
+
* @param {string} instrument_id The instrument_id of the saved instrument which needs to be queried
|
|
2857
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2858
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2859
|
+
* @param {*} [options] Override http request option.
|
|
2860
|
+
* @throws {RequiredError}
|
|
2861
|
+
* x_request_id?: string,
|
|
2862
|
+
*/
|
|
2863
|
+
pGCustomerFetchInstrument: (x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2864
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2865
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstrument', 'x_api_version', x_api_version);
|
|
2866
|
+
// verify required parameter 'customer_id' is not null or undefined
|
|
2867
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstrument', 'customer_id', customer_id);
|
|
2868
|
+
// verify required parameter 'instrument_id' is not null or undefined
|
|
2869
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstrument', 'instrument_id', instrument_id);
|
|
2870
|
+
const localVarPath = `/customers/{customer_id}/instruments/{instrument_id}`
|
|
2871
|
+
.replace(`{${"customer_id"}}`, encodeURIComponent(String(customer_id)))
|
|
2872
|
+
.replace(`{${"instrument_id"}}`, encodeURIComponent(String(instrument_id)));
|
|
2873
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2874
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2875
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2876
|
+
url = "https://api.cashfree.com/pg";
|
|
2877
|
+
}
|
|
2878
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2879
|
+
let baseOptions;
|
|
2880
|
+
if (configuration) {
|
|
2881
|
+
baseOptions = configuration.baseOptions;
|
|
2882
|
+
}
|
|
2883
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2884
|
+
const localVarHeaderParameter = {};
|
|
2885
|
+
const localVarQueryParameter = {};
|
|
2886
|
+
// authentication XPartnerAPIKey required
|
|
2887
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2888
|
+
// authentication XClientSecret required
|
|
2889
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2890
|
+
// authentication XPartnerMerchantID required
|
|
2891
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2892
|
+
// authentication XClientID required
|
|
2893
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2894
|
+
// authentication XClientSignatureHeader required
|
|
2895
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2896
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2897
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2898
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2899
|
+
}
|
|
2900
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2901
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2902
|
+
}
|
|
2903
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2904
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2905
|
+
}
|
|
2906
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2907
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2908
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2909
|
+
return {
|
|
2910
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2911
|
+
options: localVarRequestOptions,
|
|
2912
|
+
};
|
|
2913
|
+
}),
|
|
2914
|
+
/**
|
|
2915
|
+
* Use this API to fetch saved cards for a customer_id
|
|
2916
|
+
* @summary Fetch All Saved Card Instrument
|
|
2917
|
+
|
|
2918
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2919
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
2920
|
+
* @param {PGCustomerFetchInstrumentsInstrumentTypeEnum} instrument_type Payment mode or type of saved instrument
|
|
2921
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2922
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2923
|
+
* @param {*} [options] Override http request option.
|
|
2924
|
+
* @throws {RequiredError}
|
|
2925
|
+
* x_request_id?: string,
|
|
2926
|
+
*/
|
|
2927
|
+
pGCustomerFetchInstruments: (x_api_version, customer_id, instrument_type, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2928
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2929
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstruments', 'x_api_version', x_api_version);
|
|
2930
|
+
// verify required parameter 'customer_id' is not null or undefined
|
|
2931
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstruments', 'customer_id', customer_id);
|
|
2932
|
+
// verify required parameter 'instrument_type' is not null or undefined
|
|
2933
|
+
(0, common_1.assertParamExists)('pGCustomerFetchInstruments', 'instrument_type', instrument_type);
|
|
2934
|
+
const localVarPath = `/customers/{customer_id}/instruments`
|
|
2935
|
+
.replace(`{${"customer_id"}}`, encodeURIComponent(String(customer_id)));
|
|
2936
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2937
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
2938
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
2939
|
+
url = "https://api.cashfree.com/pg";
|
|
2940
|
+
}
|
|
2941
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
2942
|
+
let baseOptions;
|
|
2943
|
+
if (configuration) {
|
|
2944
|
+
baseOptions = configuration.baseOptions;
|
|
2945
|
+
}
|
|
2946
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2947
|
+
const localVarHeaderParameter = {};
|
|
2948
|
+
const localVarQueryParameter = {};
|
|
2949
|
+
// authentication XPartnerAPIKey required
|
|
2950
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
2951
|
+
// authentication XClientSecret required
|
|
2952
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
2953
|
+
// authentication XPartnerMerchantID required
|
|
2954
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
2955
|
+
// authentication XClientID required
|
|
2956
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
2957
|
+
// authentication XClientSignatureHeader required
|
|
2958
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
2959
|
+
if (instrument_type !== undefined) {
|
|
2960
|
+
localVarQueryParameter['instrument_type'] = instrument_type;
|
|
2961
|
+
}
|
|
2962
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
2963
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
2964
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
2965
|
+
}
|
|
2966
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
2967
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
2968
|
+
}
|
|
2969
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
2970
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
2971
|
+
}
|
|
2972
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2973
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2974
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2975
|
+
return {
|
|
2976
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2977
|
+
options: localVarRequestOptions,
|
|
2978
|
+
};
|
|
2979
|
+
}),
|
|
2980
|
+
/**
|
|
2981
|
+
* Use this API To get the card network token, token expiry and cryptogram for a saved card instrument using instrument id
|
|
2982
|
+
* @summary Fetch cryptogram for a saved card instrument
|
|
2983
|
+
|
|
2984
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
2985
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
2986
|
+
* @param {string} instrument_id The instrument_id of the saved card instrument which needs to be queried
|
|
2987
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
2988
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
2989
|
+
* @param {*} [options] Override http request option.
|
|
2990
|
+
* @throws {RequiredError}
|
|
2991
|
+
* x_request_id?: string,
|
|
2992
|
+
*/
|
|
2993
|
+
pGCustomerInstrumentsFetchCryptogram: (x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2994
|
+
// verify required parameter 'x_api_version' is not null or undefined
|
|
2995
|
+
(0, common_1.assertParamExists)('pGCustomerInstrumentsFetchCryptogram', 'x_api_version', x_api_version);
|
|
2996
|
+
// verify required parameter 'customer_id' is not null or undefined
|
|
2997
|
+
(0, common_1.assertParamExists)('pGCustomerInstrumentsFetchCryptogram', 'customer_id', customer_id);
|
|
2998
|
+
// verify required parameter 'instrument_id' is not null or undefined
|
|
2999
|
+
(0, common_1.assertParamExists)('pGCustomerInstrumentsFetchCryptogram', 'instrument_id', instrument_id);
|
|
3000
|
+
const localVarPath = `/customers/{customer_id}/instruments/{instrument_id}/cryptogram`
|
|
3001
|
+
.replace(`{${"customer_id"}}`, encodeURIComponent(String(customer_id)))
|
|
3002
|
+
.replace(`{${"instrument_id"}}`, encodeURIComponent(String(instrument_id)));
|
|
3003
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3004
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
3005
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
3006
|
+
url = "https://api.cashfree.com/pg";
|
|
3007
|
+
}
|
|
3008
|
+
const localVarUrlObj = new URL(localVarPath, url);
|
|
3009
|
+
let baseOptions;
|
|
3010
|
+
if (configuration) {
|
|
3011
|
+
baseOptions = configuration.baseOptions;
|
|
3012
|
+
}
|
|
3013
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3014
|
+
const localVarHeaderParameter = {};
|
|
3015
|
+
const localVarQueryParameter = {};
|
|
3016
|
+
// authentication XPartnerAPIKey required
|
|
3017
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-apikey");
|
|
3018
|
+
// authentication XClientSecret required
|
|
3019
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-secret");
|
|
3020
|
+
// authentication XPartnerMerchantID required
|
|
3021
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-partner-merchantid");
|
|
3022
|
+
// authentication XClientID required
|
|
3023
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-id");
|
|
3024
|
+
// authentication XClientSignatureHeader required
|
|
3025
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-client-signature");
|
|
3026
|
+
localVarHeaderParameter['x-sdk-platform'] = 'nodejssdk-3.0.0';
|
|
3027
|
+
if (x_api_version != null && x_api_version != undefined) {
|
|
3028
|
+
localVarHeaderParameter['x-api-version'] = x_api_version;
|
|
3029
|
+
}
|
|
3030
|
+
if (x_request_id != null && x_request_id != undefined) {
|
|
3031
|
+
localVarHeaderParameter['x-request-id'] = x_request_id;
|
|
3032
|
+
}
|
|
3033
|
+
if (x_idempotency_key != null && x_idempotency_key != undefined) {
|
|
3034
|
+
localVarHeaderParameter['x-idempotency-key'] = x_idempotency_key;
|
|
3035
|
+
}
|
|
3036
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3037
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3038
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3039
|
+
return {
|
|
3040
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3041
|
+
options: localVarRequestOptions,
|
|
3042
|
+
};
|
|
3043
|
+
}),
|
|
3044
|
+
};
|
|
3045
|
+
};
|
|
3046
|
+
/**
|
|
3047
|
+
* TokenVaultApi - functional programming interface
|
|
3048
|
+
* @export
|
|
3049
|
+
*/
|
|
3050
|
+
const TokenVaultApiFp = function (configuration) {
|
|
3051
|
+
const localVarAxiosParamCreator = TokenVaultApiAxiosParamCreator(configuration);
|
|
3052
|
+
return {
|
|
3053
|
+
/**
|
|
3054
|
+
* Use this API to delete a saved card instrument for a customer_id and instrument_id
|
|
3055
|
+
* @summary Delete Saved Card Instrument
|
|
3056
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3057
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
3058
|
+
* @param {string} instrument_id The instrument_id which needs to be deleted
|
|
3059
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3060
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3061
|
+
* @param {*} [options] Override http request option.
|
|
3062
|
+
* @throws {RequiredError}
|
|
3063
|
+
*/
|
|
3064
|
+
pGCustomerDeleteInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
3065
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3066
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCustomerDeleteInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options);
|
|
3067
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
3068
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
3069
|
+
url = "https://api.cashfree.com/pg";
|
|
3070
|
+
}
|
|
3071
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
3072
|
+
});
|
|
3073
|
+
},
|
|
3074
|
+
/**
|
|
3075
|
+
* Use this API to fetch a single specific saved card for a customer_id by it\'s instrument_id
|
|
3076
|
+
* @summary Fetch Specific Saved Card Instrument
|
|
3077
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3078
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
3079
|
+
* @param {string} instrument_id The instrument_id of the saved instrument which needs to be queried
|
|
3080
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3081
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3082
|
+
* @param {*} [options] Override http request option.
|
|
3083
|
+
* @throws {RequiredError}
|
|
3084
|
+
*/
|
|
3085
|
+
pGCustomerFetchInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
3086
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3087
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCustomerFetchInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options);
|
|
3088
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
3089
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
3090
|
+
url = "https://api.cashfree.com/pg";
|
|
3091
|
+
}
|
|
3092
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
3093
|
+
});
|
|
3094
|
+
},
|
|
3095
|
+
/**
|
|
3096
|
+
* Use this API to fetch saved cards for a customer_id
|
|
3097
|
+
* @summary Fetch All Saved Card Instrument
|
|
3098
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3099
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
3100
|
+
* @param {PGCustomerFetchInstrumentsInstrumentTypeEnum} instrument_type Payment mode or type of saved instrument
|
|
3101
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3102
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3103
|
+
* @param {*} [options] Override http request option.
|
|
3104
|
+
* @throws {RequiredError}
|
|
3105
|
+
*/
|
|
3106
|
+
pGCustomerFetchInstruments(x_api_version, customer_id, instrument_type, x_request_id, x_idempotency_key, options) {
|
|
3107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3108
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCustomerFetchInstruments(x_api_version, customer_id, instrument_type, x_request_id, x_idempotency_key, options);
|
|
3109
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
3110
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
3111
|
+
url = "https://api.cashfree.com/pg";
|
|
3112
|
+
}
|
|
3113
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
3114
|
+
});
|
|
3115
|
+
},
|
|
3116
|
+
/**
|
|
3117
|
+
* Use this API To get the card network token, token expiry and cryptogram for a saved card instrument using instrument id
|
|
3118
|
+
* @summary Fetch cryptogram for a saved card instrument
|
|
3119
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3120
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
3121
|
+
* @param {string} instrument_id The instrument_id of the saved card instrument which needs to be queried
|
|
3122
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3123
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3124
|
+
* @param {*} [options] Override http request option.
|
|
3125
|
+
* @throws {RequiredError}
|
|
3126
|
+
*/
|
|
3127
|
+
pGCustomerInstrumentsFetchCryptogram(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
3128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3129
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pGCustomerInstrumentsFetchCryptogram(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options);
|
|
3130
|
+
var url = "https://sandbox.cashfree.com/pg";
|
|
3131
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.PRODUCTION) {
|
|
3132
|
+
url = "https://api.cashfree.com/pg";
|
|
3133
|
+
}
|
|
3134
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, url, configuration);
|
|
3135
|
+
});
|
|
3136
|
+
},
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
/**
|
|
3140
|
+
* TokenVaultApi - object-oriented interface
|
|
3141
|
+
* @export
|
|
3142
|
+
* @class TokenVaultApi
|
|
3143
|
+
* @extends {BaseAPI}
|
|
3144
|
+
*/
|
|
3145
|
+
/**
|
|
3146
|
+
* @export
|
|
3147
|
+
*/
|
|
3148
|
+
exports.PGCustomerFetchInstrumentsInstrumentTypeEnum = {
|
|
3149
|
+
CARD: 'card',
|
|
3150
|
+
UNKNOWN_DEFAULT_OPEN_API: '11184809'
|
|
3151
|
+
};
|
|
3152
|
+
class Environment {
|
|
3153
|
+
constructor() {
|
|
3154
|
+
this.PRODUCTION = configuration_1.CFEnvironment.PRODUCTION;
|
|
3155
|
+
this.SANDBOX = configuration_1.CFEnvironment.SANDBOX;
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
class Cashfree {
|
|
3159
|
+
/**
|
|
3160
|
+
* Use this API to get eligible Cardless EMI Payment Methods available for a customer on an order basis their phone number.
|
|
3161
|
+
* @summary Get Eligible Cardless EMI Payment Methods for a customer on an order
|
|
3162
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3163
|
+
* @param {EligibilityFetchCardlessEMIRequest} EligibilityFetchCardlessEMIRequest Request Body to get eligible cardless emi options for a customer and order
|
|
3164
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3165
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3166
|
+
* @param {*} [options] Override http request option.
|
|
3167
|
+
* @throws {RequiredError}
|
|
3168
|
+
* @memberof EligibilityApi
|
|
3169
|
+
*/
|
|
3170
|
+
static PGEligibilityFetchCardlessEMI(x_api_version, EligibilityFetchCardlessEMIRequest, x_request_id, x_idempotency_key, options) {
|
|
3171
|
+
Sentry.init({
|
|
3172
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3173
|
+
// Performance Monitoring
|
|
3174
|
+
tracesSampleRate: 1.0,
|
|
3175
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3176
|
+
profilesSampleRate: 1.0,
|
|
3177
|
+
attachStacktrace: true,
|
|
3178
|
+
enableTracing: true,
|
|
3179
|
+
beforeSend: (event) => {
|
|
3180
|
+
delete event.contexts.os;
|
|
3181
|
+
delete event.contexts.device;
|
|
3182
|
+
delete event.server_name;
|
|
3183
|
+
return event;
|
|
3184
|
+
},
|
|
3185
|
+
});
|
|
3186
|
+
Sentry.configureScope((scope) => {
|
|
3187
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3188
|
+
scope.setExtra('environment', 'sandbox');
|
|
3189
|
+
}
|
|
3190
|
+
else {
|
|
3191
|
+
scope.setExtra('environment', 'production');
|
|
3192
|
+
}
|
|
3193
|
+
scope.setExtra('release', "3.0.0");
|
|
3194
|
+
});
|
|
3195
|
+
try {
|
|
3196
|
+
return EligibilityApiFp().pGEligibilityFetchCardlessEMI(x_api_version, EligibilityFetchCardlessEMIRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3197
|
+
}
|
|
3198
|
+
catch (error) {
|
|
3199
|
+
Sentry.captureException(error);
|
|
3200
|
+
throw error;
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
/**
|
|
3204
|
+
* Use this API to get eligible offers for an order_id or order amount.
|
|
3205
|
+
* @summary Get Eligible Offers for an Order
|
|
3206
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3207
|
+
* @param {EligibilityFetchOffersRequest} EligibilityFetchOffersRequest Request Body to get eligible offers for a customer and order
|
|
3208
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3209
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3210
|
+
* @param {*} [options] Override http request option.
|
|
3211
|
+
* @throws {RequiredError}
|
|
3212
|
+
* @memberof EligibilityApi
|
|
3213
|
+
*/
|
|
3214
|
+
static PGEligibilityFetchOffers(x_api_version, EligibilityFetchOffersRequest, x_request_id, x_idempotency_key, options) {
|
|
3215
|
+
Sentry.init({
|
|
3216
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3217
|
+
// Performance Monitoring
|
|
3218
|
+
tracesSampleRate: 1.0,
|
|
3219
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3220
|
+
profilesSampleRate: 1.0,
|
|
3221
|
+
attachStacktrace: true,
|
|
3222
|
+
enableTracing: true,
|
|
3223
|
+
beforeSend: (event) => {
|
|
3224
|
+
delete event.contexts.os;
|
|
3225
|
+
delete event.contexts.device;
|
|
3226
|
+
delete event.server_name;
|
|
3227
|
+
return event;
|
|
3228
|
+
},
|
|
3229
|
+
});
|
|
3230
|
+
Sentry.configureScope((scope) => {
|
|
3231
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3232
|
+
scope.setExtra('environment', 'sandbox');
|
|
3233
|
+
}
|
|
3234
|
+
else {
|
|
3235
|
+
scope.setExtra('environment', 'production');
|
|
3236
|
+
}
|
|
3237
|
+
scope.setExtra('release', "3.0.0");
|
|
3238
|
+
});
|
|
3239
|
+
try {
|
|
3240
|
+
return EligibilityApiFp().pGEligibilityFetchOffers(x_api_version, EligibilityFetchOffersRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3241
|
+
}
|
|
3242
|
+
catch (error) {
|
|
3243
|
+
Sentry.captureException(error);
|
|
3244
|
+
throw error;
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
/**
|
|
3248
|
+
* Use this API to get eligible Paylater Payment Methods for a customer on an order.
|
|
3249
|
+
* @summary Get Eligible Paylater for a customer on an order
|
|
3250
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3251
|
+
* @param {EligibilityFetchPaylaterRequest} EligibilityFetchPaylaterRequest Request Body to get eligible paylater options for a customer and order
|
|
3252
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3253
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3254
|
+
* @param {*} [options] Override http request option.
|
|
3255
|
+
* @throws {RequiredError}
|
|
3256
|
+
* @memberof EligibilityApi
|
|
3257
|
+
*/
|
|
3258
|
+
static PGEligibilityFetchPaylater(x_api_version, EligibilityFetchPaylaterRequest, x_request_id, x_idempotency_key, options) {
|
|
3259
|
+
Sentry.init({
|
|
3260
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3261
|
+
// Performance Monitoring
|
|
3262
|
+
tracesSampleRate: 1.0,
|
|
3263
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3264
|
+
profilesSampleRate: 1.0,
|
|
3265
|
+
attachStacktrace: true,
|
|
3266
|
+
enableTracing: true,
|
|
3267
|
+
beforeSend: (event) => {
|
|
3268
|
+
delete event.contexts.os;
|
|
3269
|
+
delete event.contexts.device;
|
|
3270
|
+
delete event.server_name;
|
|
3271
|
+
return event;
|
|
3272
|
+
},
|
|
3273
|
+
});
|
|
3274
|
+
Sentry.configureScope((scope) => {
|
|
3275
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3276
|
+
scope.setExtra('environment', 'sandbox');
|
|
3277
|
+
}
|
|
3278
|
+
else {
|
|
3279
|
+
scope.setExtra('environment', 'production');
|
|
3280
|
+
}
|
|
3281
|
+
scope.setExtra('release', "3.0.0");
|
|
3282
|
+
});
|
|
3283
|
+
try {
|
|
3284
|
+
return EligibilityApiFp().pGEligibilityFetchPaylater(x_api_version, EligibilityFetchPaylaterRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3285
|
+
}
|
|
3286
|
+
catch (error) {
|
|
3287
|
+
Sentry.captureException(error);
|
|
3288
|
+
throw error;
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
/**
|
|
3292
|
+
* Use this API to get eligible Payment Methods
|
|
3293
|
+
* @summary Get eligible Payment Methods
|
|
3294
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3295
|
+
* @param {EligibilityFetchPaymentMethodsRequest} EligibilityFetchPaymentMethodsRequest Request Body to get eligible payment methods for an account and order
|
|
3296
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3297
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3298
|
+
* @param {*} [options] Override http request option.
|
|
3299
|
+
* @throws {RequiredError}
|
|
3300
|
+
* @memberof EligibilityApi
|
|
3301
|
+
*/
|
|
3302
|
+
static PGEligibilityFetchPaymentMethods(x_api_version, EligibilityFetchPaymentMethodsRequest, x_request_id, x_idempotency_key, options) {
|
|
3303
|
+
Sentry.init({
|
|
3304
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3305
|
+
// Performance Monitoring
|
|
3306
|
+
tracesSampleRate: 1.0,
|
|
3307
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3308
|
+
profilesSampleRate: 1.0,
|
|
3309
|
+
attachStacktrace: true,
|
|
3310
|
+
enableTracing: true,
|
|
3311
|
+
beforeSend: (event) => {
|
|
3312
|
+
delete event.contexts.os;
|
|
3313
|
+
delete event.contexts.device;
|
|
3314
|
+
delete event.server_name;
|
|
3315
|
+
return event;
|
|
3316
|
+
},
|
|
3317
|
+
});
|
|
3318
|
+
Sentry.configureScope((scope) => {
|
|
3319
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3320
|
+
scope.setExtra('environment', 'sandbox');
|
|
3321
|
+
}
|
|
3322
|
+
else {
|
|
3323
|
+
scope.setExtra('environment', 'production');
|
|
3324
|
+
}
|
|
3325
|
+
scope.setExtra('release', "3.0.0");
|
|
3326
|
+
});
|
|
3327
|
+
try {
|
|
3328
|
+
return EligibilityApiFp().pGEligibilityFetchPaymentMethods(x_api_version, EligibilityFetchPaymentMethodsRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3329
|
+
}
|
|
3330
|
+
catch (error) {
|
|
3331
|
+
Sentry.captureException(error);
|
|
3332
|
+
throw error;
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
/**
|
|
3336
|
+
* Use this API to create offers with Cashfree from your backend
|
|
3337
|
+
* @summary Create Offer
|
|
3338
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3339
|
+
* @param {CreateOfferRequest} CreateOfferRequest Request body to create an offer at Cashfree
|
|
3340
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3341
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3342
|
+
* @param {*} [options] Override http request option.
|
|
3343
|
+
* @throws {RequiredError}
|
|
3344
|
+
* @memberof OffersApi
|
|
3345
|
+
*/
|
|
3346
|
+
static PGCreateOffer(x_api_version, CreateOfferRequest, x_request_id, x_idempotency_key, options) {
|
|
3347
|
+
Sentry.init({
|
|
3348
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3349
|
+
// Performance Monitoring
|
|
3350
|
+
tracesSampleRate: 1.0,
|
|
3351
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3352
|
+
profilesSampleRate: 1.0,
|
|
3353
|
+
attachStacktrace: true,
|
|
3354
|
+
enableTracing: true,
|
|
3355
|
+
beforeSend: (event) => {
|
|
3356
|
+
delete event.contexts.os;
|
|
3357
|
+
delete event.contexts.device;
|
|
3358
|
+
delete event.server_name;
|
|
3359
|
+
return event;
|
|
3360
|
+
},
|
|
3361
|
+
});
|
|
3362
|
+
Sentry.configureScope((scope) => {
|
|
3363
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3364
|
+
scope.setExtra('environment', 'sandbox');
|
|
3365
|
+
}
|
|
3366
|
+
else {
|
|
3367
|
+
scope.setExtra('environment', 'production');
|
|
3368
|
+
}
|
|
3369
|
+
scope.setExtra('release', "3.0.0");
|
|
3370
|
+
});
|
|
3371
|
+
try {
|
|
3372
|
+
return OffersApiFp().pGCreateOffer(x_api_version, CreateOfferRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3373
|
+
}
|
|
3374
|
+
catch (error) {
|
|
3375
|
+
Sentry.captureException(error);
|
|
3376
|
+
throw error;
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
/**
|
|
3380
|
+
* Use this API to get offer by offer_id
|
|
3381
|
+
* @summary Get Offer by ID
|
|
3382
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3383
|
+
* @param {string} offer_id The offer ID for which you want to view the offer details.
|
|
3384
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3385
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3386
|
+
* @param {*} [options] Override http request option.
|
|
3387
|
+
* @throws {RequiredError}
|
|
3388
|
+
* @memberof OffersApi
|
|
3389
|
+
*/
|
|
3390
|
+
static PGFetchOffer(x_api_version, offer_id, x_request_id, x_idempotency_key, options) {
|
|
3391
|
+
Sentry.init({
|
|
3392
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3393
|
+
// Performance Monitoring
|
|
3394
|
+
tracesSampleRate: 1.0,
|
|
3395
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3396
|
+
profilesSampleRate: 1.0,
|
|
3397
|
+
attachStacktrace: true,
|
|
3398
|
+
enableTracing: true,
|
|
3399
|
+
beforeSend: (event) => {
|
|
3400
|
+
delete event.contexts.os;
|
|
3401
|
+
delete event.contexts.device;
|
|
3402
|
+
delete event.server_name;
|
|
3403
|
+
return event;
|
|
3404
|
+
},
|
|
3405
|
+
});
|
|
3406
|
+
Sentry.configureScope((scope) => {
|
|
3407
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3408
|
+
scope.setExtra('environment', 'sandbox');
|
|
3409
|
+
}
|
|
3410
|
+
else {
|
|
3411
|
+
scope.setExtra('environment', 'production');
|
|
3412
|
+
}
|
|
3413
|
+
scope.setExtra('release', "3.0.0");
|
|
3414
|
+
});
|
|
3415
|
+
try {
|
|
3416
|
+
return OffersApiFp().pGFetchOffer(x_api_version, offer_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3417
|
+
}
|
|
3418
|
+
catch (error) {
|
|
3419
|
+
Sentry.captureException(error);
|
|
3420
|
+
throw error;
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3424
|
+
* ### Order An order is an entity which has a amount and currency associated with it. It is something for which you want to collect payment for. Use this API to create orders with Cashfree from your backend to get a `payment_sessions_id`. You can use the `payment_sessions_id` to create a transaction for the order.
|
|
3425
|
+
* @summary Create Order
|
|
3426
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3427
|
+
* @param {CreateOrderRequest} CreateOrderRequest Request body to create an order at cashfree
|
|
3428
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3429
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3430
|
+
* @param {*} [options] Override http request option.
|
|
3431
|
+
* @throws {RequiredError}
|
|
3432
|
+
* @memberof OrdersApi
|
|
3433
|
+
*/
|
|
3434
|
+
static PGCreateOrder(x_api_version, CreateOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
3435
|
+
Sentry.init({
|
|
3436
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3437
|
+
// Performance Monitoring
|
|
3438
|
+
tracesSampleRate: 1.0,
|
|
3439
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3440
|
+
profilesSampleRate: 1.0,
|
|
3441
|
+
attachStacktrace: true,
|
|
3442
|
+
enableTracing: true,
|
|
3443
|
+
beforeSend: (event) => {
|
|
3444
|
+
delete event.contexts.os;
|
|
3445
|
+
delete event.contexts.device;
|
|
3446
|
+
delete event.server_name;
|
|
3447
|
+
return event;
|
|
3448
|
+
},
|
|
3449
|
+
});
|
|
3450
|
+
Sentry.configureScope((scope) => {
|
|
3451
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3452
|
+
scope.setExtra('environment', 'sandbox');
|
|
3453
|
+
}
|
|
3454
|
+
else {
|
|
3455
|
+
scope.setExtra('environment', 'production');
|
|
3456
|
+
}
|
|
3457
|
+
scope.setExtra('release', "3.0.0");
|
|
3458
|
+
});
|
|
3459
|
+
try {
|
|
3460
|
+
return OrdersApiFp().pGCreateOrder(x_api_version, CreateOrderRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3461
|
+
}
|
|
3462
|
+
catch (error) {
|
|
3463
|
+
Sentry.captureException(error);
|
|
3464
|
+
throw error;
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
/**
|
|
3468
|
+
* Use this API to fetch the order that was created at Cashfree\'s using the `order_id`. ## When to use this API - To check the status of your order - Once the order is PAID - Once your customer returns to `return_url`
|
|
3469
|
+
* @summary Get Order
|
|
3470
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3471
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
3472
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3473
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3474
|
+
* @param {*} [options] Override http request option.
|
|
3475
|
+
* @throws {RequiredError}
|
|
3476
|
+
* @memberof OrdersApi
|
|
3477
|
+
*/
|
|
3478
|
+
static PGFetchOrder(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
3479
|
+
Sentry.init({
|
|
3480
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3481
|
+
// Performance Monitoring
|
|
3482
|
+
tracesSampleRate: 1.0,
|
|
3483
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3484
|
+
profilesSampleRate: 1.0,
|
|
3485
|
+
attachStacktrace: true,
|
|
3486
|
+
enableTracing: true,
|
|
3487
|
+
beforeSend: (event) => {
|
|
3488
|
+
delete event.contexts.os;
|
|
3489
|
+
delete event.contexts.device;
|
|
3490
|
+
delete event.server_name;
|
|
3491
|
+
return event;
|
|
3492
|
+
},
|
|
3493
|
+
});
|
|
3494
|
+
Sentry.configureScope((scope) => {
|
|
3495
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3496
|
+
scope.setExtra('environment', 'sandbox');
|
|
3497
|
+
}
|
|
3498
|
+
else {
|
|
3499
|
+
scope.setExtra('environment', 'production');
|
|
3500
|
+
}
|
|
3501
|
+
scope.setExtra('release', "3.0.0");
|
|
3502
|
+
});
|
|
3503
|
+
try {
|
|
3504
|
+
return OrdersApiFp().pGFetchOrder(x_api_version, order_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3505
|
+
}
|
|
3506
|
+
catch (error) {
|
|
3507
|
+
Sentry.captureException(error);
|
|
3508
|
+
throw error;
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* - Use this API to get the payment gateway reconciliation details with date range. - It will have events for your payment account
|
|
3513
|
+
* @summary PG Reconciliation
|
|
3514
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3515
|
+
* @param {FetchReconRequest} FetchReconRequest Request Body for the reconciliation
|
|
3516
|
+
* @param {string} [Content_Type] application/json
|
|
3517
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3518
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3519
|
+
* @param {string} [Accept] application/json
|
|
3520
|
+
* @param {*} [options] Override http request option.
|
|
3521
|
+
* @throws {RequiredError}
|
|
3522
|
+
* @memberof PGReconciliationApi
|
|
3523
|
+
*/
|
|
3524
|
+
static PGFetchRecon(x_api_version, FetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
3525
|
+
Sentry.init({
|
|
3526
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3527
|
+
// Performance Monitoring
|
|
3528
|
+
tracesSampleRate: 1.0,
|
|
3529
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3530
|
+
profilesSampleRate: 1.0,
|
|
3531
|
+
attachStacktrace: true,
|
|
3532
|
+
enableTracing: true,
|
|
3533
|
+
beforeSend: (event) => {
|
|
3534
|
+
delete event.contexts.os;
|
|
3535
|
+
delete event.contexts.device;
|
|
3536
|
+
delete event.server_name;
|
|
3537
|
+
return event;
|
|
3538
|
+
},
|
|
3539
|
+
});
|
|
3540
|
+
Sentry.configureScope((scope) => {
|
|
3541
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3542
|
+
scope.setExtra('environment', 'sandbox');
|
|
3543
|
+
}
|
|
3544
|
+
else {
|
|
3545
|
+
scope.setExtra('environment', 'production');
|
|
3546
|
+
}
|
|
3547
|
+
scope.setExtra('release', "3.0.0");
|
|
3548
|
+
});
|
|
3549
|
+
try {
|
|
3550
|
+
return PGReconciliationApiFp().pGFetchRecon(x_api_version, FetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3551
|
+
}
|
|
3552
|
+
catch (error) {
|
|
3553
|
+
Sentry.captureException(error);
|
|
3554
|
+
throw error;
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
/**
|
|
3558
|
+
* Use this API to cancel a payment link. No further payments can be done against a cancelled link. Only a link in ACTIVE status can be cancelled.
|
|
3559
|
+
* @summary Cancel Payment Link
|
|
3560
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3561
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
3562
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3563
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3564
|
+
* @param {*} [options] Override http request option.
|
|
3565
|
+
* @throws {RequiredError}
|
|
3566
|
+
* @memberof PaymentLinksApi
|
|
3567
|
+
*/
|
|
3568
|
+
static PGCancelLink(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
3569
|
+
Sentry.init({
|
|
3570
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3571
|
+
// Performance Monitoring
|
|
3572
|
+
tracesSampleRate: 1.0,
|
|
3573
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3574
|
+
profilesSampleRate: 1.0,
|
|
3575
|
+
attachStacktrace: true,
|
|
3576
|
+
enableTracing: true,
|
|
3577
|
+
beforeSend: (event) => {
|
|
3578
|
+
delete event.contexts.os;
|
|
3579
|
+
delete event.contexts.device;
|
|
3580
|
+
delete event.server_name;
|
|
3581
|
+
return event;
|
|
3582
|
+
},
|
|
3583
|
+
});
|
|
3584
|
+
Sentry.configureScope((scope) => {
|
|
3585
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3586
|
+
scope.setExtra('environment', 'sandbox');
|
|
3587
|
+
}
|
|
3588
|
+
else {
|
|
3589
|
+
scope.setExtra('environment', 'production');
|
|
3590
|
+
}
|
|
3591
|
+
scope.setExtra('release', "3.0.0");
|
|
3592
|
+
});
|
|
3593
|
+
try {
|
|
3594
|
+
return PaymentLinksApiFp().pGCancelLink(x_api_version, link_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3595
|
+
}
|
|
3596
|
+
catch (error) {
|
|
3597
|
+
Sentry.captureException(error);
|
|
3598
|
+
throw error;
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
/**
|
|
3602
|
+
* Use this API to create a new payment link. The created payment link url will be available in the API response parameter link_url.
|
|
3603
|
+
* @summary Create Payment Link
|
|
3604
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3605
|
+
* @param {CreateLinkRequest} CreateLinkRequest Request Body to Create Payment Links
|
|
3606
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3607
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3608
|
+
* @param {*} [options] Override http request option.
|
|
3609
|
+
* @throws {RequiredError}
|
|
3610
|
+
* @memberof PaymentLinksApi
|
|
3611
|
+
*/
|
|
3612
|
+
static PGCreateLink(x_api_version, CreateLinkRequest, x_request_id, x_idempotency_key, options) {
|
|
3613
|
+
Sentry.init({
|
|
3614
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3615
|
+
// Performance Monitoring
|
|
3616
|
+
tracesSampleRate: 1.0,
|
|
3617
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3618
|
+
profilesSampleRate: 1.0,
|
|
3619
|
+
attachStacktrace: true,
|
|
3620
|
+
enableTracing: true,
|
|
3621
|
+
beforeSend: (event) => {
|
|
3622
|
+
delete event.contexts.os;
|
|
3623
|
+
delete event.contexts.device;
|
|
3624
|
+
delete event.server_name;
|
|
3625
|
+
return event;
|
|
3626
|
+
},
|
|
3627
|
+
});
|
|
3628
|
+
Sentry.configureScope((scope) => {
|
|
3629
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3630
|
+
scope.setExtra('environment', 'sandbox');
|
|
3631
|
+
}
|
|
3632
|
+
else {
|
|
3633
|
+
scope.setExtra('environment', 'production');
|
|
3634
|
+
}
|
|
3635
|
+
scope.setExtra('release', "3.0.0");
|
|
3636
|
+
});
|
|
3637
|
+
try {
|
|
3638
|
+
return PaymentLinksApiFp().pGCreateLink(x_api_version, CreateLinkRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3639
|
+
}
|
|
3640
|
+
catch (error) {
|
|
3641
|
+
Sentry.captureException(error);
|
|
3642
|
+
throw error;
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Use this API to view all details and status of a payment link.
|
|
3647
|
+
* @summary Fetch Payment Link Details
|
|
3648
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3649
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
3650
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3651
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3652
|
+
* @param {*} [options] Override http request option.
|
|
3653
|
+
* @throws {RequiredError}
|
|
3654
|
+
* @memberof PaymentLinksApi
|
|
3655
|
+
*/
|
|
3656
|
+
static PGFetchLink(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
3657
|
+
Sentry.init({
|
|
3658
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3659
|
+
// Performance Monitoring
|
|
3660
|
+
tracesSampleRate: 1.0,
|
|
3661
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3662
|
+
profilesSampleRate: 1.0,
|
|
3663
|
+
attachStacktrace: true,
|
|
3664
|
+
enableTracing: true,
|
|
3665
|
+
beforeSend: (event) => {
|
|
3666
|
+
delete event.contexts.os;
|
|
3667
|
+
delete event.contexts.device;
|
|
3668
|
+
delete event.server_name;
|
|
3669
|
+
return event;
|
|
3670
|
+
},
|
|
3671
|
+
});
|
|
3672
|
+
Sentry.configureScope((scope) => {
|
|
3673
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3674
|
+
scope.setExtra('environment', 'sandbox');
|
|
3675
|
+
}
|
|
3676
|
+
else {
|
|
3677
|
+
scope.setExtra('environment', 'production');
|
|
3678
|
+
}
|
|
3679
|
+
scope.setExtra('release', "3.0.0");
|
|
3680
|
+
});
|
|
3681
|
+
try {
|
|
3682
|
+
return PaymentLinksApiFp().pGFetchLink(x_api_version, link_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3683
|
+
}
|
|
3684
|
+
catch (error) {
|
|
3685
|
+
Sentry.captureException(error);
|
|
3686
|
+
throw error;
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
/**
|
|
3690
|
+
* Use this API to view all order details for a payment link.
|
|
3691
|
+
* @summary Get Orders for a Payment Link
|
|
3692
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3693
|
+
* @param {string} link_id The payment link ID for which you want to view the details.
|
|
3694
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3695
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3696
|
+
* @param {*} [options] Override http request option.
|
|
3697
|
+
* @throws {RequiredError}
|
|
3698
|
+
* @memberof PaymentLinksApi
|
|
3699
|
+
*/
|
|
3700
|
+
static PGLinkFetchOrders(x_api_version, link_id, x_request_id, x_idempotency_key, options) {
|
|
3701
|
+
Sentry.init({
|
|
3702
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3703
|
+
// Performance Monitoring
|
|
3704
|
+
tracesSampleRate: 1.0,
|
|
3705
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3706
|
+
profilesSampleRate: 1.0,
|
|
3707
|
+
attachStacktrace: true,
|
|
3708
|
+
enableTracing: true,
|
|
3709
|
+
beforeSend: (event) => {
|
|
3710
|
+
delete event.contexts.os;
|
|
3711
|
+
delete event.contexts.device;
|
|
3712
|
+
delete event.server_name;
|
|
3713
|
+
return event;
|
|
3714
|
+
},
|
|
3715
|
+
});
|
|
3716
|
+
Sentry.configureScope((scope) => {
|
|
3717
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3718
|
+
scope.setExtra('environment', 'sandbox');
|
|
3719
|
+
}
|
|
3720
|
+
else {
|
|
3721
|
+
scope.setExtra('environment', 'production');
|
|
3722
|
+
}
|
|
3723
|
+
scope.setExtra('release', "3.0.0");
|
|
3724
|
+
});
|
|
3725
|
+
try {
|
|
3726
|
+
return PaymentLinksApiFp().pGLinkFetchOrders(x_api_version, link_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3727
|
+
}
|
|
3728
|
+
catch (error) {
|
|
3729
|
+
Sentry.captureException(error);
|
|
3730
|
+
throw error;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
/**
|
|
3734
|
+
* Use this API to capture or void a preauthorized payment
|
|
3735
|
+
* @summary Preauthorization
|
|
3736
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3737
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
3738
|
+
* @param {AuthorizeOrderRequest} AuthorizeOrderRequest Request to Capture or Void Transactions
|
|
3739
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3740
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3741
|
+
* @param {*} [options] Override http request option.
|
|
3742
|
+
* @throws {RequiredError}
|
|
3743
|
+
* @memberof PaymentsApi
|
|
3744
|
+
*/
|
|
3745
|
+
static PGAuthorizeOrder(x_api_version, order_id, AuthorizeOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
3746
|
+
Sentry.init({
|
|
3747
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3748
|
+
// Performance Monitoring
|
|
3749
|
+
tracesSampleRate: 1.0,
|
|
3750
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3751
|
+
profilesSampleRate: 1.0,
|
|
3752
|
+
attachStacktrace: true,
|
|
3753
|
+
enableTracing: true,
|
|
3754
|
+
beforeSend: (event) => {
|
|
3755
|
+
delete event.contexts.os;
|
|
3756
|
+
delete event.contexts.device;
|
|
3757
|
+
delete event.server_name;
|
|
3758
|
+
return event;
|
|
3759
|
+
},
|
|
3760
|
+
});
|
|
3761
|
+
Sentry.configureScope((scope) => {
|
|
3762
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3763
|
+
scope.setExtra('environment', 'sandbox');
|
|
3764
|
+
}
|
|
3765
|
+
else {
|
|
3766
|
+
scope.setExtra('environment', 'production');
|
|
3767
|
+
}
|
|
3768
|
+
scope.setExtra('release', "3.0.0");
|
|
3769
|
+
});
|
|
3770
|
+
try {
|
|
3771
|
+
return PaymentsApiFp().pGAuthorizeOrder(x_api_version, order_id, AuthorizeOrderRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3772
|
+
}
|
|
3773
|
+
catch (error) {
|
|
3774
|
+
Sentry.captureException(error);
|
|
3775
|
+
throw error;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
/**
|
|
3779
|
+
* If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
|
|
3780
|
+
* @summary Submit or Resend OTP
|
|
3781
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3782
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
3783
|
+
* @param {OrderAuthenticatePaymentRequest} OrderAuthenticatePaymentRequest Request body to submit/resend headless OTP. To use this API make sure you have headless OTP enabled for your account
|
|
3784
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3785
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3786
|
+
* @param {*} [options] Override http request option.
|
|
3787
|
+
* @throws {RequiredError}
|
|
3788
|
+
* @memberof PaymentsApi
|
|
3789
|
+
*/
|
|
3790
|
+
static PGOrderAuthenticatePayment(x_api_version, cf_payment_id, OrderAuthenticatePaymentRequest, x_request_id, x_idempotency_key, options) {
|
|
3791
|
+
Sentry.init({
|
|
3792
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3793
|
+
// Performance Monitoring
|
|
3794
|
+
tracesSampleRate: 1.0,
|
|
3795
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3796
|
+
profilesSampleRate: 1.0,
|
|
3797
|
+
attachStacktrace: true,
|
|
3798
|
+
enableTracing: true,
|
|
3799
|
+
beforeSend: (event) => {
|
|
3800
|
+
delete event.contexts.os;
|
|
3801
|
+
delete event.contexts.device;
|
|
3802
|
+
delete event.server_name;
|
|
3803
|
+
return event;
|
|
3804
|
+
},
|
|
3805
|
+
});
|
|
3806
|
+
Sentry.configureScope((scope) => {
|
|
3807
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3808
|
+
scope.setExtra('environment', 'sandbox');
|
|
3809
|
+
}
|
|
3810
|
+
else {
|
|
3811
|
+
scope.setExtra('environment', 'production');
|
|
3812
|
+
}
|
|
3813
|
+
scope.setExtra('release', "3.0.0");
|
|
3814
|
+
});
|
|
3815
|
+
try {
|
|
3816
|
+
return PaymentsApiFp().pGOrderAuthenticatePayment(x_api_version, cf_payment_id, OrderAuthenticatePaymentRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3817
|
+
}
|
|
3818
|
+
catch (error) {
|
|
3819
|
+
Sentry.captureException(error);
|
|
3820
|
+
throw error;
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
/**
|
|
3824
|
+
* Use this API to view payment details of an order for a payment ID.
|
|
3825
|
+
* @summary Get Payment by ID
|
|
3826
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3827
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
3828
|
+
* @param {string} cf_payment_id The Cashfree payment or transaction ID.
|
|
3829
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3830
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3831
|
+
* @param {*} [options] Override http request option.
|
|
3832
|
+
* @throws {RequiredError}
|
|
3833
|
+
* @memberof PaymentsApi
|
|
3834
|
+
*/
|
|
3835
|
+
static PGOrderFetchPayment(x_api_version, order_id, cf_payment_id, x_request_id, x_idempotency_key, options) {
|
|
3836
|
+
Sentry.init({
|
|
3837
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3838
|
+
// Performance Monitoring
|
|
3839
|
+
tracesSampleRate: 1.0,
|
|
3840
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3841
|
+
profilesSampleRate: 1.0,
|
|
3842
|
+
attachStacktrace: true,
|
|
3843
|
+
enableTracing: true,
|
|
3844
|
+
beforeSend: (event) => {
|
|
3845
|
+
delete event.contexts.os;
|
|
3846
|
+
delete event.contexts.device;
|
|
3847
|
+
delete event.server_name;
|
|
3848
|
+
return event;
|
|
3849
|
+
},
|
|
3850
|
+
});
|
|
3851
|
+
Sentry.configureScope((scope) => {
|
|
3852
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3853
|
+
scope.setExtra('environment', 'sandbox');
|
|
3854
|
+
}
|
|
3855
|
+
else {
|
|
3856
|
+
scope.setExtra('environment', 'production');
|
|
3857
|
+
}
|
|
3858
|
+
scope.setExtra('release', "3.0.0");
|
|
3859
|
+
});
|
|
3860
|
+
try {
|
|
3861
|
+
return PaymentsApiFp().pGOrderFetchPayment(x_api_version, order_id, cf_payment_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3862
|
+
}
|
|
3863
|
+
catch (error) {
|
|
3864
|
+
Sentry.captureException(error);
|
|
3865
|
+
throw error;
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
/**
|
|
3869
|
+
* Use this API to view all payment details for an order.
|
|
3870
|
+
* @summary Get Payments for an Order
|
|
3871
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3872
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
3873
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3874
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3875
|
+
* @param {*} [options] Override http request option.
|
|
3876
|
+
* @throws {RequiredError}
|
|
3877
|
+
* @memberof PaymentsApi
|
|
3878
|
+
*/
|
|
3879
|
+
static PGOrderFetchPayments(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
3880
|
+
Sentry.init({
|
|
3881
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3882
|
+
// Performance Monitoring
|
|
3883
|
+
tracesSampleRate: 1.0,
|
|
3884
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3885
|
+
profilesSampleRate: 1.0,
|
|
3886
|
+
attachStacktrace: true,
|
|
3887
|
+
enableTracing: true,
|
|
3888
|
+
beforeSend: (event) => {
|
|
3889
|
+
delete event.contexts.os;
|
|
3890
|
+
delete event.contexts.device;
|
|
3891
|
+
delete event.server_name;
|
|
3892
|
+
return event;
|
|
3893
|
+
},
|
|
3894
|
+
});
|
|
3895
|
+
Sentry.configureScope((scope) => {
|
|
3896
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3897
|
+
scope.setExtra('environment', 'sandbox');
|
|
3898
|
+
}
|
|
3899
|
+
else {
|
|
3900
|
+
scope.setExtra('environment', 'production');
|
|
3901
|
+
}
|
|
3902
|
+
scope.setExtra('release', "3.0.0");
|
|
3903
|
+
});
|
|
3904
|
+
try {
|
|
3905
|
+
return PaymentsApiFp().pGOrderFetchPayments(x_api_version, order_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3906
|
+
}
|
|
3907
|
+
catch (error) {
|
|
3908
|
+
Sentry.captureException(error);
|
|
3909
|
+
throw error;
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* Use this API when you have already created the orders and want Cashfree to process the payment. To use this API S2S flag needs to be enabled from the backend. In case you want to use the cards payment option the PCI DSS flag is required, for more information send an email to \"care@cashfree.com\".
|
|
3914
|
+
* @summary Order Pay
|
|
3915
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3916
|
+
* @param {PayOrderRequest} PayOrderRequest Request body to create a transaction at cashfree using `payment_session_id`
|
|
3917
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3918
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3919
|
+
* @param {*} [options] Override http request option.
|
|
3920
|
+
* @throws {RequiredError}
|
|
3921
|
+
* @memberof PaymentsApi
|
|
3922
|
+
*/
|
|
3923
|
+
static PGPayOrder(x_api_version, PayOrderRequest, x_request_id, x_idempotency_key, options) {
|
|
3924
|
+
Sentry.init({
|
|
3925
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3926
|
+
// Performance Monitoring
|
|
3927
|
+
tracesSampleRate: 1.0,
|
|
3928
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3929
|
+
profilesSampleRate: 1.0,
|
|
3930
|
+
attachStacktrace: true,
|
|
3931
|
+
enableTracing: true,
|
|
3932
|
+
beforeSend: (event) => {
|
|
3933
|
+
delete event.contexts.os;
|
|
3934
|
+
delete event.contexts.device;
|
|
3935
|
+
delete event.server_name;
|
|
3936
|
+
return event;
|
|
3937
|
+
},
|
|
3938
|
+
});
|
|
3939
|
+
Sentry.configureScope((scope) => {
|
|
3940
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3941
|
+
scope.setExtra('environment', 'sandbox');
|
|
3942
|
+
}
|
|
3943
|
+
else {
|
|
3944
|
+
scope.setExtra('environment', 'production');
|
|
3945
|
+
}
|
|
3946
|
+
scope.setExtra('release', "3.0.0");
|
|
3947
|
+
});
|
|
3948
|
+
try {
|
|
3949
|
+
return PaymentsApiFp().pGPayOrder(x_api_version, PayOrderRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3950
|
+
}
|
|
3951
|
+
catch (error) {
|
|
3952
|
+
Sentry.captureException(error);
|
|
3953
|
+
throw error;
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
/**
|
|
3957
|
+
* Use this API to initiate refunds.
|
|
3958
|
+
* @summary Create Refund
|
|
3959
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
3960
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
3961
|
+
* @param {OrderCreateRefundRequest} OrderCreateRefundRequest Request Body to Create Refunds
|
|
3962
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
3963
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
3964
|
+
* @param {*} [options] Override http request option.
|
|
3965
|
+
* @throws {RequiredError}
|
|
3966
|
+
* @memberof RefundsApi
|
|
3967
|
+
*/
|
|
3968
|
+
static PGOrderCreateRefund(x_api_version, order_id, OrderCreateRefundRequest, x_request_id, x_idempotency_key, options) {
|
|
3969
|
+
Sentry.init({
|
|
3970
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
3971
|
+
// Performance Monitoring
|
|
3972
|
+
tracesSampleRate: 1.0,
|
|
3973
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
3974
|
+
profilesSampleRate: 1.0,
|
|
3975
|
+
attachStacktrace: true,
|
|
3976
|
+
enableTracing: true,
|
|
3977
|
+
beforeSend: (event) => {
|
|
3978
|
+
delete event.contexts.os;
|
|
3979
|
+
delete event.contexts.device;
|
|
3980
|
+
delete event.server_name;
|
|
3981
|
+
return event;
|
|
3982
|
+
},
|
|
3983
|
+
});
|
|
3984
|
+
Sentry.configureScope((scope) => {
|
|
3985
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
3986
|
+
scope.setExtra('environment', 'sandbox');
|
|
3987
|
+
}
|
|
3988
|
+
else {
|
|
3989
|
+
scope.setExtra('environment', 'production');
|
|
3990
|
+
}
|
|
3991
|
+
scope.setExtra('release', "3.0.0");
|
|
3992
|
+
});
|
|
3993
|
+
try {
|
|
3994
|
+
return RefundsApiFp().pGOrderCreateRefund(x_api_version, order_id, OrderCreateRefundRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
3995
|
+
}
|
|
3996
|
+
catch (error) {
|
|
3997
|
+
Sentry.captureException(error);
|
|
3998
|
+
throw error;
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
/**
|
|
4002
|
+
* Use this API to fetch a specific refund processed on your Cashfree Account.
|
|
4003
|
+
* @summary Get Refund
|
|
4004
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4005
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
4006
|
+
* @param {string} refund_id Refund Id of the refund you want to fetch.
|
|
4007
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4008
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4009
|
+
* @param {*} [options] Override http request option.
|
|
4010
|
+
* @throws {RequiredError}
|
|
4011
|
+
* @memberof RefundsApi
|
|
4012
|
+
*/
|
|
4013
|
+
static PGOrderFetchRefund(x_api_version, order_id, refund_id, x_request_id, x_idempotency_key, options) {
|
|
4014
|
+
Sentry.init({
|
|
4015
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4016
|
+
// Performance Monitoring
|
|
4017
|
+
tracesSampleRate: 1.0,
|
|
4018
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4019
|
+
profilesSampleRate: 1.0,
|
|
4020
|
+
attachStacktrace: true,
|
|
4021
|
+
enableTracing: true,
|
|
4022
|
+
beforeSend: (event) => {
|
|
4023
|
+
delete event.contexts.os;
|
|
4024
|
+
delete event.contexts.device;
|
|
4025
|
+
delete event.server_name;
|
|
4026
|
+
return event;
|
|
4027
|
+
},
|
|
4028
|
+
});
|
|
4029
|
+
Sentry.configureScope((scope) => {
|
|
4030
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4031
|
+
scope.setExtra('environment', 'sandbox');
|
|
4032
|
+
}
|
|
4033
|
+
else {
|
|
4034
|
+
scope.setExtra('environment', 'production');
|
|
4035
|
+
}
|
|
4036
|
+
scope.setExtra('release', "3.0.0");
|
|
4037
|
+
});
|
|
4038
|
+
try {
|
|
4039
|
+
return RefundsApiFp().pGOrderFetchRefund(x_api_version, order_id, refund_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4040
|
+
}
|
|
4041
|
+
catch (error) {
|
|
4042
|
+
Sentry.captureException(error);
|
|
4043
|
+
throw error;
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
/**
|
|
4047
|
+
* Use this API to fetch all refunds processed against an order.
|
|
4048
|
+
* @summary Get All Refunds for an Order
|
|
4049
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4050
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
4051
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4052
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4053
|
+
* @param {*} [options] Override http request option.
|
|
4054
|
+
* @throws {RequiredError}
|
|
4055
|
+
* @memberof RefundsApi
|
|
4056
|
+
*/
|
|
4057
|
+
static PGOrderFetchRefunds(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
4058
|
+
Sentry.init({
|
|
4059
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4060
|
+
// Performance Monitoring
|
|
4061
|
+
tracesSampleRate: 1.0,
|
|
4062
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4063
|
+
profilesSampleRate: 1.0,
|
|
4064
|
+
attachStacktrace: true,
|
|
4065
|
+
enableTracing: true,
|
|
4066
|
+
beforeSend: (event) => {
|
|
4067
|
+
delete event.contexts.os;
|
|
4068
|
+
delete event.contexts.device;
|
|
4069
|
+
delete event.server_name;
|
|
4070
|
+
return event;
|
|
4071
|
+
},
|
|
4072
|
+
});
|
|
4073
|
+
Sentry.configureScope((scope) => {
|
|
4074
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4075
|
+
scope.setExtra('environment', 'sandbox');
|
|
4076
|
+
}
|
|
4077
|
+
else {
|
|
4078
|
+
scope.setExtra('environment', 'production');
|
|
4079
|
+
}
|
|
4080
|
+
scope.setExtra('release', "3.0.0");
|
|
4081
|
+
});
|
|
4082
|
+
try {
|
|
4083
|
+
return RefundsApiFp().pGOrderFetchRefunds(x_api_version, order_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4084
|
+
}
|
|
4085
|
+
catch (error) {
|
|
4086
|
+
Sentry.captureException(error);
|
|
4087
|
+
throw error;
|
|
4088
|
+
}
|
|
4089
|
+
}
|
|
4090
|
+
/**
|
|
4091
|
+
* Use this API to get all settlement details by specifying the settlement ID, settlement UTR or date range.
|
|
4092
|
+
* @summary Get All Settlements
|
|
4093
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4094
|
+
* @param {FetchSettlementsRequest} FetchSettlementsRequest Request Body to get the settlements
|
|
4095
|
+
* @param {string} [Content_Type] application/json
|
|
4096
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4097
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4098
|
+
* @param {string} [Accept] application/json
|
|
4099
|
+
* @param {*} [options] Override http request option.
|
|
4100
|
+
* @throws {RequiredError}
|
|
4101
|
+
* @memberof SettlementReconciliationApi
|
|
4102
|
+
*/
|
|
4103
|
+
static PGFetchSettlements(x_api_version, FetchSettlementsRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
4104
|
+
Sentry.init({
|
|
4105
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4106
|
+
// Performance Monitoring
|
|
4107
|
+
tracesSampleRate: 1.0,
|
|
4108
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4109
|
+
profilesSampleRate: 1.0,
|
|
4110
|
+
attachStacktrace: true,
|
|
4111
|
+
enableTracing: true,
|
|
4112
|
+
beforeSend: (event) => {
|
|
4113
|
+
delete event.contexts.os;
|
|
4114
|
+
delete event.contexts.device;
|
|
4115
|
+
delete event.server_name;
|
|
4116
|
+
return event;
|
|
4117
|
+
},
|
|
4118
|
+
});
|
|
4119
|
+
Sentry.configureScope((scope) => {
|
|
4120
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4121
|
+
scope.setExtra('environment', 'sandbox');
|
|
4122
|
+
}
|
|
4123
|
+
else {
|
|
4124
|
+
scope.setExtra('environment', 'production');
|
|
4125
|
+
}
|
|
4126
|
+
scope.setExtra('release', "3.0.0");
|
|
4127
|
+
});
|
|
4128
|
+
try {
|
|
4129
|
+
return SettlementReconciliationApiFp().pGFetchSettlements(x_api_version, FetchSettlementsRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4130
|
+
}
|
|
4131
|
+
catch (error) {
|
|
4132
|
+
Sentry.captureException(error);
|
|
4133
|
+
throw error;
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
/**
|
|
4137
|
+
* - Use this API to get settlement reconciliation details using Settlement ID, settlement UTR or date range. - This API will return events for the settlement IDs you want
|
|
4138
|
+
* @summary Settlement Reconciliation
|
|
4139
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4140
|
+
* @param {SettlementFetchReconRequest} SettlementFetchReconRequest Request Body for the settlement reconciliation
|
|
4141
|
+
* @param {string} [Content_Type] application/json
|
|
4142
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4143
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4144
|
+
* @param {string} [Accept] application/json
|
|
4145
|
+
* @param {*} [options] Override http request option.
|
|
4146
|
+
* @throws {RequiredError}
|
|
4147
|
+
* @memberof SettlementReconciliationApi
|
|
4148
|
+
*/
|
|
4149
|
+
static PGSettlementFetchRecon(x_api_version, SettlementFetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options) {
|
|
4150
|
+
Sentry.init({
|
|
4151
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4152
|
+
// Performance Monitoring
|
|
4153
|
+
tracesSampleRate: 1.0,
|
|
4154
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4155
|
+
profilesSampleRate: 1.0,
|
|
4156
|
+
attachStacktrace: true,
|
|
4157
|
+
enableTracing: true,
|
|
4158
|
+
beforeSend: (event) => {
|
|
4159
|
+
delete event.contexts.os;
|
|
4160
|
+
delete event.contexts.device;
|
|
4161
|
+
delete event.server_name;
|
|
4162
|
+
return event;
|
|
4163
|
+
},
|
|
4164
|
+
});
|
|
4165
|
+
Sentry.configureScope((scope) => {
|
|
4166
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4167
|
+
scope.setExtra('environment', 'sandbox');
|
|
4168
|
+
}
|
|
4169
|
+
else {
|
|
4170
|
+
scope.setExtra('environment', 'production');
|
|
4171
|
+
}
|
|
4172
|
+
scope.setExtra('release', "3.0.0");
|
|
4173
|
+
});
|
|
4174
|
+
try {
|
|
4175
|
+
return SettlementReconciliationApiFp().pGSettlementFetchRecon(x_api_version, SettlementFetchReconRequest, Content_Type, x_request_id, x_idempotency_key, Accept, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4176
|
+
}
|
|
4177
|
+
catch (error) {
|
|
4178
|
+
Sentry.captureException(error);
|
|
4179
|
+
throw error;
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
/**
|
|
4183
|
+
* Use this API to view all the settlements of a particular order.
|
|
4184
|
+
* @summary Get Settlements by Order ID
|
|
4185
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4186
|
+
* @param {string} order_id The id which uniquely identifies your order
|
|
4187
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4188
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4189
|
+
* @param {*} [options] Override http request option.
|
|
4190
|
+
* @throws {RequiredError}
|
|
4191
|
+
* @memberof SettlementsApi
|
|
4192
|
+
*/
|
|
4193
|
+
static PGOrderFetchSettlement(x_api_version, order_id, x_request_id, x_idempotency_key, options) {
|
|
4194
|
+
Sentry.init({
|
|
4195
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4196
|
+
// Performance Monitoring
|
|
4197
|
+
tracesSampleRate: 1.0,
|
|
4198
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4199
|
+
profilesSampleRate: 1.0,
|
|
4200
|
+
attachStacktrace: true,
|
|
4201
|
+
enableTracing: true,
|
|
4202
|
+
beforeSend: (event) => {
|
|
4203
|
+
delete event.contexts.os;
|
|
4204
|
+
delete event.contexts.device;
|
|
4205
|
+
delete event.server_name;
|
|
4206
|
+
return event;
|
|
4207
|
+
},
|
|
4208
|
+
});
|
|
4209
|
+
Sentry.configureScope((scope) => {
|
|
4210
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4211
|
+
scope.setExtra('environment', 'sandbox');
|
|
4212
|
+
}
|
|
4213
|
+
else {
|
|
4214
|
+
scope.setExtra('environment', 'production');
|
|
4215
|
+
}
|
|
4216
|
+
scope.setExtra('release', "3.0.0");
|
|
4217
|
+
});
|
|
4218
|
+
try {
|
|
4219
|
+
return SettlementsApiFp().pGOrderFetchSettlement(x_api_version, order_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4220
|
+
}
|
|
4221
|
+
catch (error) {
|
|
4222
|
+
Sentry.captureException(error);
|
|
4223
|
+
throw error;
|
|
4224
|
+
}
|
|
4225
|
+
}
|
|
4226
|
+
/**
|
|
4227
|
+
* Use this API to create new terminals to use softPOS.
|
|
4228
|
+
* @summary Create Terminal
|
|
4229
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4230
|
+
* @param {CreateTerminalRequest} CreateTerminalRequest Request Body to Create Terminal for SPOS
|
|
4231
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4232
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4233
|
+
* @param {*} [options] Override http request option.
|
|
4234
|
+
* @throws {RequiredError}
|
|
4235
|
+
* @memberof SoftPOSApi
|
|
4236
|
+
*/
|
|
4237
|
+
static SposCreateTerminal(x_api_version, CreateTerminalRequest, x_request_id, x_idempotency_key, options) {
|
|
4238
|
+
Sentry.init({
|
|
4239
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4240
|
+
// Performance Monitoring
|
|
4241
|
+
tracesSampleRate: 1.0,
|
|
4242
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4243
|
+
profilesSampleRate: 1.0,
|
|
4244
|
+
attachStacktrace: true,
|
|
4245
|
+
enableTracing: true,
|
|
4246
|
+
beforeSend: (event) => {
|
|
4247
|
+
delete event.contexts.os;
|
|
4248
|
+
delete event.contexts.device;
|
|
4249
|
+
delete event.server_name;
|
|
4250
|
+
return event;
|
|
4251
|
+
},
|
|
4252
|
+
});
|
|
4253
|
+
Sentry.configureScope((scope) => {
|
|
4254
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4255
|
+
scope.setExtra('environment', 'sandbox');
|
|
4256
|
+
}
|
|
4257
|
+
else {
|
|
4258
|
+
scope.setExtra('environment', 'production');
|
|
4259
|
+
}
|
|
4260
|
+
scope.setExtra('release', "3.0.0");
|
|
4261
|
+
});
|
|
4262
|
+
try {
|
|
4263
|
+
return SoftPOSApiFp().sposCreateTerminal(x_api_version, CreateTerminalRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4264
|
+
}
|
|
4265
|
+
catch (error) {
|
|
4266
|
+
Sentry.captureException(error);
|
|
4267
|
+
throw error;
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
/**
|
|
4271
|
+
* Use this API to create a new terminal transaction. To use this API you should first create an order using the Create Order API. Also, you need to enter the terminal details while creating the order and pass the same terminal information while creating a transaction using the below mentioned API.
|
|
4272
|
+
* @summary Create Terminal
|
|
4273
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4274
|
+
* @param {CreateTerminalTransactionRequest} CreateTerminalTransactionRequest Request body to create a terminal transaction
|
|
4275
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4276
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4277
|
+
* @param {*} [options] Override http request option.
|
|
4278
|
+
* @throws {RequiredError}
|
|
4279
|
+
* @memberof SoftPOSApi
|
|
4280
|
+
*/
|
|
4281
|
+
static SposCreateTerminalTransaction(x_api_version, CreateTerminalTransactionRequest, x_request_id, x_idempotency_key, options) {
|
|
4282
|
+
Sentry.init({
|
|
4283
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4284
|
+
// Performance Monitoring
|
|
4285
|
+
tracesSampleRate: 1.0,
|
|
4286
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4287
|
+
profilesSampleRate: 1.0,
|
|
4288
|
+
attachStacktrace: true,
|
|
4289
|
+
enableTracing: true,
|
|
4290
|
+
beforeSend: (event) => {
|
|
4291
|
+
delete event.contexts.os;
|
|
4292
|
+
delete event.contexts.device;
|
|
4293
|
+
delete event.server_name;
|
|
4294
|
+
return event;
|
|
4295
|
+
},
|
|
4296
|
+
});
|
|
4297
|
+
Sentry.configureScope((scope) => {
|
|
4298
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4299
|
+
scope.setExtra('environment', 'sandbox');
|
|
4300
|
+
}
|
|
4301
|
+
else {
|
|
4302
|
+
scope.setExtra('environment', 'production');
|
|
4303
|
+
}
|
|
4304
|
+
scope.setExtra('release', "3.0.0");
|
|
4305
|
+
});
|
|
4306
|
+
try {
|
|
4307
|
+
return SoftPOSApiFp().sposCreateTerminalTransaction(x_api_version, CreateTerminalTransactionRequest, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4308
|
+
}
|
|
4309
|
+
catch (error) {
|
|
4310
|
+
Sentry.captureException(error);
|
|
4311
|
+
throw error;
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
/**
|
|
4315
|
+
* Use this API to view all details of a terminal.
|
|
4316
|
+
* @summary Get terminal status using phone number
|
|
4317
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4318
|
+
* @param {string} terminal_phone_no The terminal for which you want to view the order details.
|
|
4319
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4320
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4321
|
+
* @param {*} [options] Override http request option.
|
|
4322
|
+
* @throws {RequiredError}
|
|
4323
|
+
* @memberof SoftPOSApi
|
|
4324
|
+
*/
|
|
4325
|
+
static SposFetchTerminal(x_api_version, terminal_phone_no, x_request_id, x_idempotency_key, options) {
|
|
4326
|
+
Sentry.init({
|
|
4327
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4328
|
+
// Performance Monitoring
|
|
4329
|
+
tracesSampleRate: 1.0,
|
|
4330
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4331
|
+
profilesSampleRate: 1.0,
|
|
4332
|
+
attachStacktrace: true,
|
|
4333
|
+
enableTracing: true,
|
|
4334
|
+
beforeSend: (event) => {
|
|
4335
|
+
delete event.contexts.os;
|
|
4336
|
+
delete event.contexts.device;
|
|
4337
|
+
delete event.server_name;
|
|
4338
|
+
return event;
|
|
4339
|
+
},
|
|
4340
|
+
});
|
|
4341
|
+
Sentry.configureScope((scope) => {
|
|
4342
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4343
|
+
scope.setExtra('environment', 'sandbox');
|
|
4344
|
+
}
|
|
4345
|
+
else {
|
|
4346
|
+
scope.setExtra('environment', 'production');
|
|
4347
|
+
}
|
|
4348
|
+
scope.setExtra('release', "3.0.0");
|
|
4349
|
+
});
|
|
4350
|
+
try {
|
|
4351
|
+
return SoftPOSApiFp().sposFetchTerminal(x_api_version, terminal_phone_no, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4352
|
+
}
|
|
4353
|
+
catch (error) {
|
|
4354
|
+
Sentry.captureException(error);
|
|
4355
|
+
throw error;
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
/**
|
|
4359
|
+
* You can fetch all the StaticQRs corresponding to given terminal id or phone number. Provide either the terminal_phone_no or terminal_id in the request.
|
|
4360
|
+
* @summary Fetch Terminal QR Codes
|
|
4361
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4362
|
+
* @param {string} terminal_phone_no Phone number assigned to the terminal. Required if you are not providing the cf_terminal_id in the request.
|
|
4363
|
+
* @param {string} cf_terminal_id Cashfree terminal id for which you want to get staticQRs. Required if you are not providing the terminal_phone_number in the request.
|
|
4364
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4365
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4366
|
+
* @param {*} [options] Override http request option.
|
|
4367
|
+
* @throws {RequiredError}
|
|
4368
|
+
* @memberof SoftPOSApi
|
|
4369
|
+
*/
|
|
4370
|
+
static SposFetchTerminalQRCodes(x_api_version, terminal_phone_no, cf_terminal_id, x_request_id, x_idempotency_key, options) {
|
|
4371
|
+
Sentry.init({
|
|
4372
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4373
|
+
// Performance Monitoring
|
|
4374
|
+
tracesSampleRate: 1.0,
|
|
4375
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4376
|
+
profilesSampleRate: 1.0,
|
|
4377
|
+
attachStacktrace: true,
|
|
4378
|
+
enableTracing: true,
|
|
4379
|
+
beforeSend: (event) => {
|
|
4380
|
+
delete event.contexts.os;
|
|
4381
|
+
delete event.contexts.device;
|
|
4382
|
+
delete event.server_name;
|
|
4383
|
+
return event;
|
|
4384
|
+
},
|
|
4385
|
+
});
|
|
4386
|
+
Sentry.configureScope((scope) => {
|
|
4387
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4388
|
+
scope.setExtra('environment', 'sandbox');
|
|
4389
|
+
}
|
|
4390
|
+
else {
|
|
4391
|
+
scope.setExtra('environment', 'production');
|
|
4392
|
+
}
|
|
4393
|
+
scope.setExtra('release', "3.0.0");
|
|
4394
|
+
});
|
|
4395
|
+
try {
|
|
4396
|
+
return SoftPOSApiFp().sposFetchTerminalQRCodes(x_api_version, terminal_phone_no, cf_terminal_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4397
|
+
}
|
|
4398
|
+
catch (error) {
|
|
4399
|
+
Sentry.captureException(error);
|
|
4400
|
+
throw error;
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
/**
|
|
4404
|
+
* Use this API to delete a saved card instrument for a customer_id and instrument_id
|
|
4405
|
+
* @summary Delete Saved Card Instrument
|
|
4406
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4407
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
4408
|
+
* @param {string} instrument_id The instrument_id which needs to be deleted
|
|
4409
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4410
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4411
|
+
* @param {*} [options] Override http request option.
|
|
4412
|
+
* @throws {RequiredError}
|
|
4413
|
+
* @memberof TokenVaultApi
|
|
4414
|
+
*/
|
|
4415
|
+
static PGCustomerDeleteInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
4416
|
+
Sentry.init({
|
|
4417
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4418
|
+
// Performance Monitoring
|
|
4419
|
+
tracesSampleRate: 1.0,
|
|
4420
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4421
|
+
profilesSampleRate: 1.0,
|
|
4422
|
+
attachStacktrace: true,
|
|
4423
|
+
enableTracing: true,
|
|
4424
|
+
beforeSend: (event) => {
|
|
4425
|
+
delete event.contexts.os;
|
|
4426
|
+
delete event.contexts.device;
|
|
4427
|
+
delete event.server_name;
|
|
4428
|
+
return event;
|
|
4429
|
+
},
|
|
4430
|
+
});
|
|
4431
|
+
Sentry.configureScope((scope) => {
|
|
4432
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4433
|
+
scope.setExtra('environment', 'sandbox');
|
|
4434
|
+
}
|
|
4435
|
+
else {
|
|
4436
|
+
scope.setExtra('environment', 'production');
|
|
4437
|
+
}
|
|
4438
|
+
scope.setExtra('release', "3.0.0");
|
|
4439
|
+
});
|
|
4440
|
+
try {
|
|
4441
|
+
return TokenVaultApiFp().pGCustomerDeleteInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4442
|
+
}
|
|
4443
|
+
catch (error) {
|
|
4444
|
+
Sentry.captureException(error);
|
|
4445
|
+
throw error;
|
|
4446
|
+
}
|
|
4447
|
+
}
|
|
4448
|
+
/**
|
|
4449
|
+
* Use this API to fetch a single specific saved card for a customer_id by it\'s instrument_id
|
|
4450
|
+
* @summary Fetch Specific Saved Card Instrument
|
|
4451
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4452
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
4453
|
+
* @param {string} instrument_id The instrument_id of the saved instrument which needs to be queried
|
|
4454
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4455
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4456
|
+
* @param {*} [options] Override http request option.
|
|
4457
|
+
* @throws {RequiredError}
|
|
4458
|
+
* @memberof TokenVaultApi
|
|
4459
|
+
*/
|
|
4460
|
+
static PGCustomerFetchInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
4461
|
+
Sentry.init({
|
|
4462
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4463
|
+
// Performance Monitoring
|
|
4464
|
+
tracesSampleRate: 1.0,
|
|
4465
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4466
|
+
profilesSampleRate: 1.0,
|
|
4467
|
+
attachStacktrace: true,
|
|
4468
|
+
enableTracing: true,
|
|
4469
|
+
beforeSend: (event) => {
|
|
4470
|
+
delete event.contexts.os;
|
|
4471
|
+
delete event.contexts.device;
|
|
4472
|
+
delete event.server_name;
|
|
4473
|
+
return event;
|
|
4474
|
+
},
|
|
4475
|
+
});
|
|
4476
|
+
Sentry.configureScope((scope) => {
|
|
4477
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4478
|
+
scope.setExtra('environment', 'sandbox');
|
|
4479
|
+
}
|
|
4480
|
+
else {
|
|
4481
|
+
scope.setExtra('environment', 'production');
|
|
4482
|
+
}
|
|
4483
|
+
scope.setExtra('release', "3.0.0");
|
|
4484
|
+
});
|
|
4485
|
+
try {
|
|
4486
|
+
return TokenVaultApiFp().pGCustomerFetchInstrument(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4487
|
+
}
|
|
4488
|
+
catch (error) {
|
|
4489
|
+
Sentry.captureException(error);
|
|
4490
|
+
throw error;
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
/**
|
|
4494
|
+
* Use this API to fetch saved cards for a customer_id
|
|
4495
|
+
* @summary Fetch All Saved Card Instrument
|
|
4496
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4497
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
4498
|
+
* @param {PGCustomerFetchInstrumentsInstrumentTypeEnum} instrument_type Payment mode or type of saved instrument
|
|
4499
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4500
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4501
|
+
* @param {*} [options] Override http request option.
|
|
4502
|
+
* @throws {RequiredError}
|
|
4503
|
+
* @memberof TokenVaultApi
|
|
4504
|
+
*/
|
|
4505
|
+
static PGCustomerFetchInstruments(x_api_version, customer_id, instrument_type, x_request_id, x_idempotency_key, options) {
|
|
4506
|
+
Sentry.init({
|
|
4507
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4508
|
+
// Performance Monitoring
|
|
4509
|
+
tracesSampleRate: 1.0,
|
|
4510
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4511
|
+
profilesSampleRate: 1.0,
|
|
4512
|
+
attachStacktrace: true,
|
|
4513
|
+
enableTracing: true,
|
|
4514
|
+
beforeSend: (event) => {
|
|
4515
|
+
delete event.contexts.os;
|
|
4516
|
+
delete event.contexts.device;
|
|
4517
|
+
delete event.server_name;
|
|
4518
|
+
return event;
|
|
4519
|
+
},
|
|
4520
|
+
});
|
|
4521
|
+
Sentry.configureScope((scope) => {
|
|
4522
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4523
|
+
scope.setExtra('environment', 'sandbox');
|
|
4524
|
+
}
|
|
4525
|
+
else {
|
|
4526
|
+
scope.setExtra('environment', 'production');
|
|
4527
|
+
}
|
|
4528
|
+
scope.setExtra('release', "3.0.0");
|
|
4529
|
+
});
|
|
4530
|
+
try {
|
|
4531
|
+
return TokenVaultApiFp().pGCustomerFetchInstruments(x_api_version, customer_id, instrument_type, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4532
|
+
}
|
|
4533
|
+
catch (error) {
|
|
4534
|
+
Sentry.captureException(error);
|
|
4535
|
+
throw error;
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
/**
|
|
4539
|
+
* Use this API To get the card network token, token expiry and cryptogram for a saved card instrument using instrument id
|
|
4540
|
+
* @summary Fetch cryptogram for a saved card instrument
|
|
4541
|
+
* @param {string} x_api_version API version to be used. Format is in YYYY-MM-DD
|
|
4542
|
+
* @param {string} customer_id Your Customer ID that you had sent during create order API `POST/orders`
|
|
4543
|
+
* @param {string} instrument_id The instrument_id of the saved card instrument which needs to be queried
|
|
4544
|
+
* @param {string} [x_request_id] Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree
|
|
4545
|
+
* @param {string} [x_idempotency_key] Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
|
|
4546
|
+
* @param {*} [options] Override http request option.
|
|
4547
|
+
* @throws {RequiredError}
|
|
4548
|
+
* @memberof TokenVaultApi
|
|
4549
|
+
*/
|
|
4550
|
+
static PGCustomerInstrumentsFetchCryptogram(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options) {
|
|
4551
|
+
Sentry.init({
|
|
4552
|
+
dsn: 'https://ad7936cb4d7f4f2b99c6571a8e7a4df7@o330525.ingest.sentry.io/4505085005725696',
|
|
4553
|
+
// Performance Monitoring
|
|
4554
|
+
tracesSampleRate: 1.0,
|
|
4555
|
+
// Set sampling rate for profiling - this is relative to tracesSampleRate
|
|
4556
|
+
profilesSampleRate: 1.0,
|
|
4557
|
+
attachStacktrace: true,
|
|
4558
|
+
enableTracing: true,
|
|
4559
|
+
beforeSend: (event) => {
|
|
4560
|
+
delete event.contexts.os;
|
|
4561
|
+
delete event.contexts.device;
|
|
4562
|
+
delete event.server_name;
|
|
4563
|
+
return event;
|
|
4564
|
+
},
|
|
4565
|
+
});
|
|
4566
|
+
Sentry.configureScope((scope) => {
|
|
4567
|
+
if (Cashfree.XEnvironment == configuration_1.CFEnvironment.SANDBOX) {
|
|
4568
|
+
scope.setExtra('environment', 'sandbox');
|
|
4569
|
+
}
|
|
4570
|
+
else {
|
|
4571
|
+
scope.setExtra('environment', 'production');
|
|
4572
|
+
}
|
|
4573
|
+
scope.setExtra('release', "3.0.0");
|
|
4574
|
+
});
|
|
4575
|
+
try {
|
|
4576
|
+
return TokenVaultApiFp().pGCustomerInstrumentsFetchCryptogram(x_api_version, customer_id, instrument_id, x_request_id, x_idempotency_key, options).then((request) => request(Cashfree.axios, Cashfree.basePath));
|
|
4577
|
+
}
|
|
4578
|
+
catch (error) {
|
|
4579
|
+
Sentry.captureException(error);
|
|
4580
|
+
throw error;
|
|
4581
|
+
}
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
exports.Cashfree = Cashfree;
|
|
4585
|
+
Cashfree.Environment = new Environment();
|