mangopay4-nodejs-sdk 2.0.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ ## [2.1.0] - 2026-06-24
2
+ This release adds unified recurring pay-ins, PayPal deposit preauthorizations, and several new model fields. Some methods are now marked `@deprecated` in favour of new names.
3
+
4
+ ### Added - Unified recurring pay-in method
5
+ - New `PayIns.createRecurringPayIn(recurringPayIn)` method that creates a recurring pay-in for Card, PayPal, Apple Pay, and Google Pay using the same object structure as the non-recurring pay-in methods. It routes to the correct endpoint based on the payment and execution type:
6
+ - `payins/recurring/card/direct`
7
+ - `payins/payment-methods/paypal/recurring`
8
+ - `payins/payment-methods/applepay/recurring`
9
+ - `payins/payment-methods/googlepay/recurring`
10
+ - New recurring registration methods `getRecurringPayInRegistration`, `updateRecurringPayInRegistration`, and `createRecurringPayInRegistration`.
11
+
12
+ ### Deprecated - Older recurring pay-in methods
13
+ The following are now deprecated (still functional) in favour of the unified methods above:
14
+ - `createRecurringPayInRegistrationCIT`, `createRecurringPayInRegistrationMIT`, `createRecurringPayPalPayInCIT`, `createRecurringPayPalPayInMIT` → use `createRecurringPayIn`
15
+ - `getRecurringPayin` → use `getRecurringPayInRegistration`
16
+ - `updateRecurringPayin` → use `updateRecurringPayInRegistration`
17
+ - `createRecurringPayment` → use `createRecurringPayInRegistration`
18
+
19
+ ### Added - PayPal deposit preauthorization support
20
+ - New `Deposits.createPayPalPreauthorization(deposit)` method, backed by the `deposit-preauthorizations/payment-methods/paypal` endpoint
21
+ - New `PayPalDepositPreauthorization` model and `CreatePayPalDepositPreauthorization` TypeScript typing (fields include `PaypalPayerID`, `PaypalOrderID`, `Buyer*`, `Trackings`, `ShippingPreference`, `LineItems`, `DataCollectionId`, etc.)
22
+ - New `PayIns.createDepositPreauthorizedPayInWithoutComplement(payIn)` method, backed by the `payins/deposit-preauthorized/direct/full-capture` endpoint
23
+ - `PayIns.createCardPreAuthorizedDepositPayIn` is now deprecated in favour of `createDepositPreauthorizedPayInWithoutComplement`
24
+
25
+ ### Added - `FlowDescriptor` parameter
26
+ - New `FlowDescriptor` object (`FlowId`, `Beneficiaries[].UserId`) added to pay-in, recurring pay-in registration, card preauthorization, and deposit create/data typings, allowing payment flow and beneficiary information to be passed
27
+
28
+ ### Added - `Email` property on Hook
29
+ - The `Hook` model and `hook` typings now support an `Email` property on create and update
30
+
31
+ ### Added - `DateRangeBy` on Report V2
32
+ - The Report V2 model (`ReportsV2.create`) now supports the `DateRangeBy` field (e.g. `"ExecutionDate"`), with a matching `DateRangeBy?: string` typing on `ReportV2Data`.
33
+
34
+ ### Added - Virtual account local account fields
35
+ - `LocalAccount` typings gained `BankCode`, `BSBCode`, and `BCNumber` fields, with documentation updates to existing local account fields
36
+
37
+ ### Changed - Dependency upgrades
38
+ - `axios` `1.16.0` → `1.17.0`
39
+ - `form-data` `4.0.5` → `4.0.6`
40
+
1
41
  ## [2.0.0] - 2026-05-27
2
42
 
3
43
  > **⚠️ Breaking release.** This version raises the minimum required Node.js version and bumps several dependencies. The runtime API of the SDK is unchanged — no method signatures, models, or TypeScript typings were modified — but please review the notes below before upgrading.
package/lib/apiMethods.js CHANGED
@@ -49,8 +49,12 @@ module.exports = {
49
49
  "payins_recurring_registration_get": ["/${apiVersion}/${clientId}/recurringpayinregistrations/${id}", "GET"],
50
50
  "payins_recurring_registration_put": ["/${apiVersion}/${clientId}/recurringpayinregistrations/${id}", "PUT"],
51
51
  "payins_create_recurring_card_direct": ["/${apiVersion}/${clientId}/payins/recurring/card/direct", "POST"],
52
+ "payins_recurring_card-direct_create": ["/${apiVersion}/${clientId}/payins/recurring/card/direct", "POST"],
52
53
  "payins_create_recurring_paypal": ["/${apiVersion}/${clientId}/payins/payment-methods/paypal/recurring", "POST"],
53
- "payins_create_card_pre_authorized_deposit": ["/${apiVersion}/${clientId}/payins/deposit-preauthorized/direct/full-capture", "POST"],
54
+ "payins_recurring_paypal-web_create": ["/${apiVersion}/${clientId}/payins/payment-methods/paypal/recurring", "POST"],
55
+ "payins_recurring_applepay-direct_create": ["/${apiVersion}/${clientId}/payins/payment-methods/applepay/recurring", "POST"],
56
+ "payins_recurring_googlepay-direct_create": ["/${apiVersion}/${clientId}/payins/payment-methods/googlepay/recurring", "POST"],
57
+ "payins_deposit_preauthorized_without_complement": ["/${apiVersion}/${clientId}/payins/deposit-preauthorized/direct/full-capture", "POST"],
54
58
  "payins_deposit_preauthorized_prior_to_complement": ["/${apiVersion}/${clientId}/payins/deposit-preauthorized/direct/capture-with-complement", "POST"],
55
59
  "payins_deposit_preauthorized_complement": ["/${apiVersion}/${clientId}/payins/deposit-preauthorized/direct/complement", "POST"],
56
60
  "payins_mbway-web_create": ["/${apiVersion}/${clientId}/payins/payment-methods/mbway", "POST"],
@@ -237,6 +241,7 @@ module.exports = {
237
241
  "countries_get_all": ["/${apiVersion}/countries/authorizations", "GET"],
238
242
 
239
243
  "deposits_create": ["/${apiVersion}/${clientId}/deposit-preauthorizations/card/direct", "POST"],
244
+ "deposits_paypal_create": ["/${apiVersion}/${clientId}/deposit-preauthorizations/payment-methods/paypal", "POST"],
240
245
  "deposits_get": ["/${apiVersion}/${clientId}/deposit-preauthorizations/${depositId}", "GET"],
241
246
  "deposits_update": ["/${apiVersion}/${clientId}/deposit-preauthorizations/${depositId}", "PUT"],
242
247
  "deposits_get_all_for_card": ["/${apiVersion}/${clientId}/cards/${cardId}/deposit-preauthorizations", "GET"],
@@ -14,6 +14,7 @@ module.exports = EntityBase.extend({
14
14
  * Validity: VALID, INVALID
15
15
  */
16
16
  Validity: null,
17
- EventType: null
17
+ EventType: null,
18
+ Email: null
18
19
  }
19
20
  });
@@ -30,7 +30,8 @@ var PayInRecurringRegistration = EntityBase.extend({
30
30
  CycleNumber: null,
31
31
  FreeCycles: null,
32
32
  CurrentState: null,
33
- PaymentType: null
33
+ PaymentType: null,
34
+ PaymentData: null,
34
35
  },
35
36
 
36
37
  /**
@@ -0,0 +1,21 @@
1
+ var Deposit = require('./Deposit');
2
+
3
+ module.exports = Deposit.extend({
4
+ defaults: {
5
+ PaypalPayerID: null,
6
+ PaypalOrderID: null,
7
+ BuyerFirstname: null,
8
+ BuyerLastname: null,
9
+ BuyerPhone: null,
10
+ BuyerCountry: null,
11
+ PaypalBuyerAccountEmail: null,
12
+ CancelURL: null,
13
+ Trackings: null,
14
+ ShippingPreference: null,
15
+ Reference: null,
16
+ LineItems: null,
17
+ RedirectURL: null,
18
+ ReturnURL: null,
19
+ DataCollectionId: null
20
+ }
21
+ });
@@ -15,7 +15,8 @@ var ReportV2 = EntityBase.extend({
15
15
  AfterDate: null,
16
16
  BeforeDate: null,
17
17
  Filters: null,
18
- Columns: null
18
+ Columns: null,
19
+ DateRangeBy: null
19
20
  },
20
21
 
21
22
  getSubObjects: function () {
@@ -1,5 +1,6 @@
1
1
  var Service = require('../service');
2
2
  var Deposit = require('../models/Deposit');
3
+ var PayPalDepositPreauthorization = require('../models/PayPalDepositPreauthorization');
3
4
 
4
5
  var Deposits = Service.extend({
5
6
  /**
@@ -14,6 +15,18 @@ var Deposits = Service.extend({
14
15
  return this._api.method('deposits_create', callback, options);
15
16
  },
16
17
 
18
+ /**
19
+ * Create a PayPal Deposit Preauthorization
20
+ */
21
+ createPayPalPreauthorization: function(deposit, callback, options) {
22
+ options = this._api._getOptions(callback, options, {
23
+ data: deposit,
24
+ dataClass: PayPalDepositPreauthorization
25
+ });
26
+
27
+ return this._api.method('deposits_paypal_create', callback, options);
28
+ },
29
+
17
30
  /**
18
31
  * Get a Deposit
19
32
  */
@@ -61,12 +61,33 @@ var PayIns = Service.extend({
61
61
  return this._api.method('payins_' + paymentKey + '-' + executionKey + '_create', callback, options);
62
62
  },
63
63
 
64
+ /**
65
+ * Create new recurring pay-in (Card, ApplePay, GooglePay, PayPal),
66
+ * following the same pattern (object structure) as non-recurring payins
67
+ * @param {Object} recurringPayIn PayIn object
68
+ * @param {Function} callback Callback function
69
+ * @param {Object} options Request options
70
+ * @return {Object} Request promise
71
+ */
72
+ createRecurringPayIn: function(recurringPayIn, callback, options) {
73
+ options = this._api._getOptions(callback, options, {
74
+ data: recurringPayIn,
75
+ dataClass: RecurringPayIn
76
+ });
77
+
78
+ var paymentKey = this.getPaymentKey(recurringPayIn);
79
+ var executionKey = this.getExecutionKey(recurringPayIn);
80
+
81
+ return this._api.method('payins_recurring_' + paymentKey + '-' + executionKey + '_create', callback, options);
82
+ },
83
+
64
84
  /**
65
85
  * Get recurring pay-in
66
86
  * @param {number} payInId PayIn identifier
67
87
  * @param {Function} callback Callback function
68
88
  * @param {Object} options Request options
69
89
  * @return {Object} Request promise
90
+ * @deprecated Use 'getRecurringPayInRegistration' instead
70
91
  */
71
92
  getRecurringPayin: function(payInId, callback, options) {
72
93
  options = this._api._getOptions(callback, options, {
@@ -79,6 +100,24 @@ var PayIns = Service.extend({
79
100
  return this._api.method('payins_recurring_registration_get', callback, options);
80
101
  },
81
102
 
103
+ /**
104
+ * Get recurring PayIn registration
105
+ * @param {number} recurringPayInRegistrationId Recurring PayIn registration identifier
106
+ * @param {Function} callback Callback function
107
+ * @param {Object} options Request options
108
+ * @return {Object} Request promise
109
+ */
110
+ getRecurringPayInRegistration: function(recurringPayInRegistrationId, callback, options) {
111
+ options = this._api._getOptions(callback, options, {
112
+ path: {
113
+ id: recurringPayInRegistrationId
114
+ },
115
+ dataClass: PayInRecurringRegistration
116
+ });
117
+
118
+ return this._api.method('payins_recurring_registration_get', callback, options);
119
+ },
120
+
82
121
  /**
83
122
  * Update recurring pay-in
84
123
  * @param {number} payInId PayIn identifier
@@ -86,6 +125,7 @@ var PayIns = Service.extend({
86
125
  * @param {Function} callback Callback function
87
126
  * @param {Object} options Request options
88
127
  * @return {Object} Request promise
128
+ * @deprecated Use 'updateRecurringPayInRegistration' instead
89
129
  */
90
130
  updateRecurringPayin: function(payInId, toUpdate, callback, options) {
91
131
  options = this._api._getOptions(callback, options, {
@@ -99,12 +139,32 @@ var PayIns = Service.extend({
99
139
  return this._api.method('payins_recurring_registration_put', callback, options);
100
140
  },
101
141
 
142
+ /**
143
+ * Update recurring PayIn Registration
144
+ * @param {Object} recurringPayInRegistration Object to be updated. Must contain the id.
145
+ * @param {Function} callback Callback function
146
+ * @param {Object} options Request options
147
+ * @return {Object} Request promise
148
+ */
149
+ updateRecurringPayInRegistration: function(recurringPayInRegistration, callback, options) {
150
+ options = this._api._getOptions(callback, options, {
151
+ path: {
152
+ id: recurringPayInRegistration.Id
153
+ },
154
+ data: recurringPayInRegistration,
155
+ dataClass: PayInRecurringRegistration
156
+ });
157
+
158
+ return this._api.method('payins_recurring_registration_put', callback, options);
159
+ },
160
+
102
161
  /**
103
162
  * Create Payin Registration
104
163
  * @param {Object} payIn PayInRecurringRegistration object
105
164
  * @param {Function} callback Callback function
106
165
  * @param {Object} options Request options
107
166
  * @return {Object} Request promise
167
+ * @deprecated Use 'createRecurringPayInRegistration' instead
108
168
  */
109
169
  createRecurringPayment: function(recurringPayin, callback, options) {
110
170
  options = this._api._getOptions(callback, options, {
@@ -115,12 +175,29 @@ var PayIns = Service.extend({
115
175
  return this._api.method('payins_recurring_registration', callback, options);
116
176
  },
117
177
 
178
+ /**
179
+ * Create Recurring Payin Registration
180
+ * @param {Object} recurringPayinRegistration PayInRecurringRegistration object
181
+ * @param {Function} callback Callback function
182
+ * @param {Object} options Request options
183
+ * @return {Object} Request promise
184
+ */
185
+ createRecurringPayInRegistration: function(recurringPayinRegistration, callback, options) {
186
+ options = this._api._getOptions(callback, options, {
187
+ data: recurringPayinRegistration,
188
+ dataClass: PayInRecurringRegistration
189
+ });
190
+
191
+ return this._api.method('payins_recurring_registration', callback, options);
192
+ },
193
+
118
194
  /**
119
195
  * Create new recurring pay-in CIT
120
196
  * @param {Object} payIn PayIn object
121
197
  * @param {Function} callback Callback function
122
198
  * @param {Object} options Request options
123
199
  * @return {Object} Request promise
200
+ * @deprecated Use 'createRecurringPayIn' instead
124
201
  */
125
202
  createRecurringPayInRegistrationCIT: function(payIn, callback, options) {
126
203
  options = this._api._getOptions(callback, options, {
@@ -137,6 +214,7 @@ var PayIns = Service.extend({
137
214
  * @param {Function} callback Callback function
138
215
  * @param {Object} options Request options
139
216
  * @return {Object} Request promise
217
+ * @deprecated Use 'createRecurringPayIn' instead
140
218
  */
141
219
  createRecurringPayInRegistrationMIT: function(payIn, callback, options) {
142
220
  options = this._api._getOptions(callback, options, {
@@ -153,6 +231,7 @@ var PayIns = Service.extend({
153
231
  * @param {Function} callback Callback function
154
232
  * @param {Object} options Request options
155
233
  * @return {Object} Request promise
234
+ * @deprecated Use 'createRecurringPayIn' instead
156
235
  */
157
236
  createRecurringPayPalPayInCIT: function(payIn, callback, options) {
158
237
  options = this._api._getOptions(callback, options, {
@@ -169,6 +248,7 @@ var PayIns = Service.extend({
169
248
  * @param {Function} callback Callback function
170
249
  * @param {Object} options Request options
171
250
  * @return {Object} Request promise
251
+ * @deprecated Use 'createRecurringPayIn' instead
172
252
  */
173
253
  createRecurringPayPalPayInMIT: function(payIn, callback, options) {
174
254
  options = this._api._getOptions(callback, options, {
@@ -239,6 +319,7 @@ var PayIns = Service.extend({
239
319
 
240
320
  /**
241
321
  * Create new Card PreAuthorized Deposit PayIn without complement
322
+ * @deprecated Use 'createDepositPreauthorizedPayInWithoutComplement' instead
242
323
  */
243
324
  createCardPreAuthorizedDepositPayIn: function(payIn, callback, options) {
244
325
  options = this._api._getOptions(callback, options, {
@@ -246,7 +327,19 @@ var PayIns = Service.extend({
246
327
  dataClass: PayIn
247
328
  });
248
329
 
249
- return this._api.method('payins_create_card_pre_authorized_deposit', callback, options);
330
+ return this._api.method('payins_deposit_preauthorized_without_complement', callback, options);
331
+ },
332
+
333
+ /**
334
+ * Create new Deposit PreAuthorized PayIn without complement
335
+ */
336
+ createDepositPreauthorizedPayInWithoutComplement: function(payIn, callback, options) {
337
+ options = this._api._getOptions(callback, options, {
338
+ data: payIn,
339
+ dataClass: PayIn
340
+ });
341
+
342
+ return this._api.method('payins_deposit_preauthorized_without_complement', callback, options);
250
343
  },
251
344
 
252
345
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mangopay4-nodejs-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "types": "./typings/index.d.ts",
5
5
  "description": "Mangopay Node.js SDK",
6
6
  "license": "MIT",
@@ -10,8 +10,8 @@
10
10
  "main": "./index.js",
11
11
  "dependencies": {
12
12
  "@types/node": "22.19.18",
13
- "axios": "1.16.0",
14
- "form-data": "4.0.5",
13
+ "axios": "1.17.0",
14
+ "form-data": "4.0.6",
15
15
  "promise": "8.3.0",
16
16
  "underscore": "1.13.8"
17
17
  },
@@ -28,7 +28,9 @@ export namespace enums {
28
28
 
29
29
  interface IRecurringPayInRegistrationPaymentType {
30
30
  CardDirect: "CARD_DIRECT";
31
- PayPal: "PAYPAL"
31
+ PayPal: "PAYPAL";
32
+ ApplePay: "APPLEPAY";
33
+ GooglePay: "GOOGLE_PAY";
32
34
  }
33
35
 
34
36
  interface IMandateStatus {
@@ -16,6 +16,7 @@ export namespace cardPreAuthorization {
16
16
  import ShippingData = shipping.ShippingData;
17
17
  import CardInfoData = card.CardInfoData;
18
18
  import AuthenticationResult = payIn.AuthenticationResult;
19
+ import FlowDescriptor = payIn.FlowDescriptor;
19
20
 
20
21
  type PreAuthorizationExecutionType = "DIRECT";
21
22
 
@@ -24,7 +25,7 @@ export namespace cardPreAuthorization {
24
25
  type PreAuthorizationStatus = "CREATED" | "SUCCEEDED" | "FAILED";
25
26
 
26
27
  type CreateCardPreAuthorization = PickPartialRequired<CardPreAuthorizationData,
27
- "Tag" | "Billing" | "SecureMode" | "Culture" | "StatementDescriptor" | "Shipping" | "PaymentCategory", "AuthorId" | "DebitedFunds" | "CardId" | "SecureModeReturnURL" | "IpAddress" | "BrowserInfo">;
28
+ "Tag" | "Billing" | "SecureMode" | "Culture" | "StatementDescriptor" | "Shipping" | "PaymentCategory" | "FlowDescriptor", "AuthorId" | "DebitedFunds" | "CardId" | "SecureModeReturnURL" | "IpAddress" | "BrowserInfo">;
28
29
 
29
30
  type UpdateCardPreAuthorization = PickPartialRequired<CardPreAuthorizationData,
30
31
  "Tag",
@@ -160,5 +161,10 @@ export namespace cardPreAuthorization {
160
161
  * Authentication result
161
162
  */
162
163
  AuthenticationResult?: AuthenticationResult;
164
+
165
+ /**
166
+ * Information about the payment flow and its Beneficiaries.
167
+ */
168
+ FlowDescriptor?: FlowDescriptor;
163
169
  }
164
170
  }
@@ -18,6 +18,11 @@ export namespace deposit {
18
18
  import _3DSVersion = payIn._3DSVersion;
19
19
  import CardInfoData = card.CardInfoData;
20
20
  import AuthenticationResult = payIn.AuthenticationResult;
21
+ import FlowDescriptor = payIn.FlowDescriptor;
22
+ import ShippingPreference = payIn.ShippingPreference;
23
+ import PayPalWebTrackingData = payIn.PayPalWebTrackingData;
24
+ import LineItemData = payIn.LineItemData;
25
+ import CreateLineItem = payIn.CreateLineItem;
21
26
 
22
27
  type DepositStatus = ValueOf<enums.IDepositStatus>;
23
28
 
@@ -74,6 +79,86 @@ export namespace deposit {
74
79
  * Authentication result
75
80
  */
76
81
  AuthenticationResult?: AuthenticationResult;
82
+
83
+ /**
84
+ * Information about the payment flow and its Beneficiaries.
85
+ */
86
+ FlowDescriptor?: FlowDescriptor;
87
+
88
+ /**
89
+ * The unique identifier of the buyer's PayPal account, provided by PayPal.
90
+ */
91
+ PaypalPayerID?: string;
92
+
93
+ /**
94
+ * The unique identifier of the order on the PayPal side.
95
+ */
96
+ PaypalOrderID?: string;
97
+
98
+ /**
99
+ * The first name of the buyer, returned by PayPal.
100
+ */
101
+ BuyerFirstname?: string;
102
+
103
+ /**
104
+ * The last name of the buyer, returned by PayPal.
105
+ */
106
+ BuyerLastname?: string;
107
+
108
+ /**
109
+ * The phone number of the buyer, returned by PayPal.
110
+ */
111
+ BuyerPhone?: string;
112
+
113
+ /**
114
+ * The country of the buyer, returned by PayPal.
115
+ */
116
+ BuyerCountry?: CountryISO;
117
+
118
+ /**
119
+ * The email address of the buyer's PayPal account.
120
+ */
121
+ PaypalBuyerAccountEmail?: string;
122
+
123
+ /**
124
+ * The URL to which the user is returned after canceling the payment.
125
+ */
126
+ CancelURL?: string;
127
+
128
+ /**
129
+ * Information about the shipment trackings.
130
+ */
131
+ Trackings?: PayPalWebTrackingData[];
132
+
133
+ /**
134
+ * The shipping preference used for the PayPal payment.
135
+ */
136
+ ShippingPreference?: ShippingPreference;
137
+
138
+ /**
139
+ * The platform’s order reference for the transaction.
140
+ */
141
+ Reference?: string;
142
+
143
+ /**
144
+ * Information about the items bought by the buyer.
145
+ */
146
+ LineItems?: LineItemData[];
147
+
148
+ /**
149
+ * The URL to which the user is redirected to complete the payment.
150
+ */
151
+ RedirectURL?: string;
152
+
153
+ /**
154
+ * The URL to which the user is returned after the payment, whether successful or not.
155
+ */
156
+ ReturnURL?: string;
157
+
158
+ /**
159
+ * The unique identifier of the Data Collection object containing the data PayPal needs to process the pay-in.
160
+ */
161
+ DataCollectionId?: string;
77
162
  }
78
163
 
79
164
  interface CreateDeposit {
@@ -96,6 +181,86 @@ export namespace deposit {
96
181
  Billing?: CompleteBillingData;
97
182
 
98
183
  Shipping?: ShippingData;
184
+
185
+ /**
186
+ * Information about the payment flow and its Beneficiaries.
187
+ */
188
+ FlowDescriptor?: FlowDescriptor;
189
+ }
190
+
191
+ interface CreatePayPalDepositPreauthorization {
192
+ /**
193
+ * The unique identifier of the user at the source of the transaction.
194
+ */
195
+ AuthorId: string;
196
+
197
+ /**
198
+ * Information about the preauthorized funds.
199
+ */
200
+ DebitedFunds: MoneyData;
201
+
202
+ /**
203
+ * The URL to which the user is returned after the payment, whether the transaction is successful or not.
204
+ */
205
+ ReturnURL: string;
206
+
207
+ /**
208
+ * The URL to which the user is returned after canceling the payment.
209
+ * If not provided, the user is returned to the ReturnURL.
210
+ */
211
+ CancelURL?: string;
212
+
213
+ /**
214
+ * The unique identifier of the Data Collection object containing the data PayPal needs to process the pay-in.
215
+ */
216
+ DataCollectionId?: string;
217
+
218
+ /**
219
+ * The shipping preference for the payment.
220
+ * One of SET_PROVIDED_ADDRESS, GET_FROM_FILE, or NO_SHIPPING.
221
+ */
222
+ ShippingPreference?: ShippingPreference;
223
+
224
+ /**
225
+ * Information about the end user’s shipping address.
226
+ * Required if ShippingPreference is SET_PROVIDED_ADDRESS.
227
+ */
228
+ Shipping?: ShippingData;
229
+
230
+ /**
231
+ * The platform’s order reference for the transaction (max. 127 characters).
232
+ */
233
+ Reference?: string;
234
+
235
+ /**
236
+ * Custom data that you can add to this object (max. 255 characters).
237
+ */
238
+ Tag?: string;
239
+
240
+ /**
241
+ * Custom description to appear on the user’s bank statement (max. 10 characters, alphanumeric and spaces).
242
+ */
243
+ StatementDescriptor?: string;
244
+
245
+ /**
246
+ * The language in which the PayPal payment page is to be displayed, in ISO 639-1 format.
247
+ */
248
+ Culture?: CountryISO;
249
+
250
+ /**
251
+ * The reference to the profiling session used for fraud prevention.
252
+ */
253
+ ProfilingAttemptReference?: string;
254
+
255
+ /**
256
+ * Information about the items bought by the buyer.
257
+ */
258
+ LineItems?: CreateLineItem[];
259
+
260
+ /**
261
+ * Information about the payment flow and its Beneficiaries.
262
+ */
263
+ FlowDescriptor?: FlowDescriptor;
99
264
  }
100
265
 
101
266
  interface PayinsLinkedData {
@@ -27,13 +27,18 @@ export namespace hook {
27
27
  * The event type
28
28
  */
29
29
  EventType: event.EventType;
30
+
31
+ /**
32
+ * Email
33
+ */
34
+ Email: string;
30
35
  }
31
36
 
32
- interface CreateHook extends PickPartialRequired<HookData, "Tag", "EventType" | "Url"> {
37
+ interface CreateHook extends PickPartialRequired<HookData, "Tag" | "Email", "EventType" | "Url"> {
33
38
  }
34
39
 
35
40
  interface UpdateHook extends PickPartialRequired<HookData,
36
- "EventType" | "Url" | "Tag" | "Status",
41
+ "EventType" | "Url" | "Tag" | "Status" | "Email",
37
42
  "Id"> {
38
43
  }
39
44
  }