@getivy/node-sdk 0.1.0-alpha.3 → 0.1.0-alpha.31
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 +328 -0
- package/README.md +15 -27
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +12 -1
- package/core.d.ts.map +1 -1
- package/core.js +20 -11
- package/core.js.map +1 -1
- package/core.mjs +21 -12
- package/core.mjs.map +1 -1
- package/index.d.mts +8 -2
- package/index.d.ts +8 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balance.d.ts +2 -2
- package/resources/balance.d.ts.map +1 -1
- package/resources/banks.d.ts +53 -5
- package/resources/banks.d.ts.map +1 -1
- package/resources/charges.d.ts +3 -16
- package/resources/charges.d.ts.map +1 -1
- package/resources/checkoutsession.d.ts +397 -1577
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/customers.d.ts +56 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +3 -2
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +3 -2
- package/resources/customers.mjs.map +1 -1
- package/resources/data/accounts.d.ts +104 -0
- package/resources/data/accounts.d.ts.map +1 -0
- package/resources/data/accounts.js +15 -0
- package/resources/data/accounts.js.map +1 -0
- package/resources/data/accounts.mjs +11 -0
- package/resources/data/accounts.mjs.map +1 -0
- package/resources/data/balances.d.ts +45 -0
- package/resources/data/balances.d.ts.map +1 -0
- package/resources/data/balances.js +15 -0
- package/resources/data/balances.js.map +1 -0
- package/resources/data/balances.mjs +11 -0
- package/resources/data/balances.mjs.map +1 -0
- package/resources/data/consent.d.ts +80 -0
- package/resources/data/consent.d.ts.map +1 -0
- package/resources/data/consent.js +21 -0
- package/resources/data/consent.js.map +1 -0
- package/resources/data/consent.mjs +17 -0
- package/resources/data/consent.mjs.map +1 -0
- package/resources/data/data.d.ts +26 -0
- package/resources/data/data.d.ts.map +1 -0
- package/resources/data/data.js +55 -0
- package/resources/data/data.js.map +1 -0
- package/resources/data/data.mjs +28 -0
- package/resources/data/data.mjs.map +1 -0
- package/resources/data/index.d.ts +7 -0
- package/resources/data/index.d.ts.map +1 -0
- package/resources/data/index.js +17 -0
- package/resources/data/index.js.map +1 -0
- package/resources/data/index.mjs +8 -0
- package/resources/data/index.mjs.map +1 -0
- package/resources/data/session.d.ts +234 -0
- package/resources/data/session.d.ts.map +1 -0
- package/resources/data/session.js +21 -0
- package/resources/data/session.js.map +1 -0
- package/resources/data/session.mjs +17 -0
- package/resources/data/session.mjs.map +1 -0
- package/resources/data/transactions.d.ts +54 -0
- package/resources/data/transactions.d.ts.map +1 -0
- package/resources/data/transactions.js +16 -0
- package/resources/data/transactions.js.map +1 -0
- package/resources/data/transactions.mjs +12 -0
- package/resources/data/transactions.mjs.map +1 -0
- package/resources/data.d.ts +2 -0
- package/resources/data.d.ts.map +1 -0
- package/resources/data.js +19 -0
- package/resources/data.js.map +1 -0
- package/resources/data.mjs +3 -0
- package/resources/data.mjs.map +1 -0
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.ts +255 -405
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +10 -6
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +10 -6
- package/resources/orders.mjs.map +1 -1
- package/resources/payouts.d.ts +2 -2
- package/resources/payouts.d.ts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reports.d.ts +2 -2
- package/resources/reports.d.ts.map +1 -1
- package/resources/webhooksubscription.d.ts +155 -0
- package/resources/webhooksubscription.d.ts.map +1 -0
- package/resources/webhooksubscription.js +42 -0
- package/resources/webhooksubscription.js.map +1 -0
- package/resources/webhooksubscription.mjs +38 -0
- package/resources/webhooksubscription.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +39 -12
- package/src/index.ts +38 -4
- package/src/resources/balance.ts +2 -2
- package/src/resources/banks.ts +92 -5
- package/src/resources/charges.ts +3 -16
- package/src/resources/checkoutsession.ts +2338 -6557
- package/src/resources/customers.ts +61 -6
- package/src/resources/data/accounts.ts +134 -0
- package/src/resources/data/balances.ts +57 -0
- package/src/resources/data/consent.ts +110 -0
- package/src/resources/data/data.ts +75 -0
- package/src/resources/data/index.ts +20 -0
- package/src/resources/data/session.ts +1299 -0
- package/src/resources/data/transactions.ts +71 -0
- package/src/resources/data.ts +3 -0
- package/src/resources/index.ts +16 -2
- package/src/resources/orders.ts +812 -1970
- package/src/resources/payouts.ts +2 -2
- package/src/resources/refunds.ts +0 -1
- package/src/resources/reports.ts +2 -2
- package/src/resources/webhooksubscription.ts +353 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/orders.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { APIResource } from "../resource.js";
|
|
2
2
|
import * as Core from "../core.js";
|
|
3
3
|
export declare class Orders extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new order. By creating a new order, you will create a new settlement
|
|
6
|
+
* destination which you can use to settle expected incoming payments efficiently.
|
|
7
|
+
* After creating the order, Ivy provides you with a destination for the expected
|
|
8
|
+
* incoming payment. As soon as a payment with the same details arrives, Ivy will
|
|
9
|
+
* update the status of the order.
|
|
10
|
+
*/
|
|
11
|
+
create(body: OrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<OrderCreateResponse>;
|
|
4
12
|
/**
|
|
5
13
|
* Retrieve details of an order. You can retrieve the order by passing either the
|
|
6
14
|
* internal Ivy order id or the `referenceId` you specified when creating a
|
|
7
15
|
* Checkout Session to the `id` field.
|
|
8
16
|
*/
|
|
9
17
|
retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Update certain fields of the specified order.
|
|
12
|
-
*/
|
|
13
|
-
update(body: OrderUpdateParams, options?: Core.RequestOptions): Core.APIPromise<OrderUpdateResponse>;
|
|
14
18
|
}
|
|
15
|
-
export interface
|
|
19
|
+
export interface OrderCreateResponse {
|
|
16
20
|
/**
|
|
17
21
|
* The Ivy unique identifier for the order.
|
|
18
22
|
*/
|
|
@@ -38,12 +42,12 @@ export interface OrderRetrieveResponse {
|
|
|
38
42
|
*/
|
|
39
43
|
merchantId: string;
|
|
40
44
|
/**
|
|
41
|
-
* The
|
|
45
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
42
46
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
43
47
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
44
48
|
* as this is the format accepted by most banks.
|
|
45
49
|
*/
|
|
46
|
-
price:
|
|
50
|
+
price: OrderCreateResponse.Price;
|
|
47
51
|
/**
|
|
48
52
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
49
53
|
* order. Needs to be unique per shop per order and can be up to 200 characters.
|
|
@@ -58,81 +62,57 @@ export interface OrderRetrieveResponse {
|
|
|
58
62
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
59
63
|
* information.
|
|
60
64
|
*/
|
|
61
|
-
status: 'failed' | 'canceled' | 'processing' | '
|
|
65
|
+
status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
62
66
|
updatedAt: string;
|
|
63
67
|
/**
|
|
64
|
-
* The
|
|
65
|
-
*
|
|
68
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
69
|
+
* if no payment was made.
|
|
70
|
+
*/
|
|
71
|
+
bankId?: string;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
74
|
+
* the reference that will be visible on the bank statement.
|
|
66
75
|
*/
|
|
67
76
|
bankStatementReference?: string;
|
|
68
77
|
/**
|
|
69
|
-
* The billing address of the
|
|
78
|
+
* The billing address of the customer.
|
|
70
79
|
*/
|
|
71
|
-
billingAddress?:
|
|
80
|
+
billingAddress?: OrderCreateResponse.BillingAddress;
|
|
72
81
|
/**
|
|
73
82
|
* The merchant category code or
|
|
74
83
|
* [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
|
|
75
84
|
*/
|
|
76
85
|
category?: string;
|
|
77
|
-
/**
|
|
78
|
-
* @deprecated
|
|
79
|
-
*/
|
|
80
|
-
climateActionMode?: OrderRetrieveResponse.ClimateActionMode;
|
|
81
|
-
/**
|
|
82
|
-
* @deprecated
|
|
83
|
-
*/
|
|
84
|
-
co2Grams?: number;
|
|
85
86
|
/**
|
|
86
87
|
* The unique identifier of the customer who placed the order.
|
|
87
88
|
*/
|
|
88
89
|
customerId?: string;
|
|
90
|
+
destination?: OrderCreateResponse.Destination;
|
|
89
91
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
+
* @deprecated Currently only visible in the merchant dashboard. This id used to be
|
|
93
|
+
* displayed to the user during the checkout.
|
|
92
94
|
*/
|
|
93
95
|
displayId?: string;
|
|
94
96
|
/**
|
|
95
|
-
*
|
|
96
|
-
* to their bank login. For express Checkout Sessions this is always false.
|
|
97
|
-
*/
|
|
98
|
-
guest?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Only valid for sustainable incentive mode. The social / sustainable projects
|
|
101
|
-
* available to the user during Checkout.
|
|
102
|
-
*/
|
|
103
|
-
impactOffsetProjects?: Array<string>;
|
|
104
|
-
/**
|
|
105
|
-
* The incentive mode of the checkout session. For any use-case apart from
|
|
106
|
-
* e-commerce, please use `white_label` as the value. If set to `white_label`, the
|
|
107
|
-
* checkout session will be white labeled. If set to `sustainable`, the checkout
|
|
108
|
-
* session will contain sustainable incentives for users.
|
|
97
|
+
* @deprecated The list of line items for the order.
|
|
109
98
|
*/
|
|
110
|
-
|
|
99
|
+
lineItems?: Array<OrderCreateResponse.LineItem>;
|
|
100
|
+
mandate?: OrderCreateResponse.Mandate;
|
|
111
101
|
/**
|
|
112
|
-
*
|
|
102
|
+
* @deprecated
|
|
113
103
|
*/
|
|
114
|
-
|
|
115
|
-
mandate?: OrderRetrieveResponse.Mandate;
|
|
116
|
-
/**
|
|
117
|
-
* The destination bank account where the money will be sent to.
|
|
118
|
-
*/
|
|
119
|
-
merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
|
|
104
|
+
merchantFinancialAddress?: OrderCreateResponse.MerchantFinancialAddress;
|
|
120
105
|
/**
|
|
121
106
|
* Any data which will be stored and returned for this checkout session and
|
|
122
107
|
* corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
|
|
123
108
|
* more info.
|
|
124
109
|
*/
|
|
125
110
|
metadata?: Record<string, unknown>;
|
|
126
|
-
/**
|
|
127
|
-
* Only valid for sustainable incentive mode. The social / sustainability project
|
|
128
|
-
* chosen by the user during Checkout.
|
|
129
|
-
*/
|
|
130
|
-
offsetProject?: string;
|
|
131
111
|
/**
|
|
132
112
|
* The source bank account where the money is send from.
|
|
133
113
|
*/
|
|
134
|
-
payerFinancialAddress?:
|
|
135
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
114
|
+
payerFinancialAddress?: OrderCreateResponse.PayerFinancialAddress;
|
|
115
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
136
116
|
/**
|
|
137
117
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
138
118
|
*/
|
|
@@ -149,36 +129,23 @@ export interface OrderRetrieveResponse {
|
|
|
149
129
|
/**
|
|
150
130
|
* The list of refunds connected to this order.
|
|
151
131
|
*/
|
|
152
|
-
refunds?: Array<
|
|
153
|
-
/**
|
|
154
|
-
* The shipping address of the user. This is only collected in express Checkouts.
|
|
155
|
-
*/
|
|
156
|
-
shippingAddress?: OrderRetrieveResponse.ShippingAddress;
|
|
157
|
-
/**
|
|
158
|
-
* The selected shipping method by the user. Can either be selected during an
|
|
159
|
-
* express Checkout Session or passed during Checkout Session creation.
|
|
160
|
-
*/
|
|
161
|
-
shippingMethod?: OrderRetrieveResponse.ShippingMethod;
|
|
162
|
-
/**
|
|
163
|
-
* The logo of the shop provided as a URL.
|
|
164
|
-
*/
|
|
165
|
-
shopLogo?: string;
|
|
132
|
+
refunds?: Array<OrderCreateResponse.Refund>;
|
|
166
133
|
/**
|
|
167
134
|
* The shopper object. Contains information collected from the user during the
|
|
168
135
|
* Checkout.
|
|
169
136
|
*/
|
|
170
|
-
shopper?:
|
|
137
|
+
shopper?: OrderCreateResponse.Shopper;
|
|
171
138
|
/**
|
|
172
139
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
173
140
|
* collected in the Checkout.
|
|
174
141
|
*/
|
|
175
142
|
shopperEmail?: string;
|
|
176
|
-
statusClassification?:
|
|
143
|
+
statusClassification?: OrderCreateResponse.StatusClassification;
|
|
177
144
|
/**
|
|
178
145
|
* List of status history items for the order, used for logging every update on
|
|
179
146
|
* status.
|
|
180
147
|
*/
|
|
181
|
-
statusHistoryList?: Array<
|
|
148
|
+
statusHistoryList?: Array<OrderCreateResponse.StatusHistoryList>;
|
|
182
149
|
/**
|
|
183
150
|
* The subaccount id of the order.
|
|
184
151
|
*/
|
|
@@ -187,44 +154,27 @@ export interface OrderRetrieveResponse {
|
|
|
187
154
|
* The legal name of the subaccount
|
|
188
155
|
*/
|
|
189
156
|
subaccountLegalName?: string;
|
|
190
|
-
/**
|
|
191
|
-
* @deprecated
|
|
192
|
-
*/
|
|
193
|
-
trees?: number;
|
|
194
157
|
}
|
|
195
|
-
export declare namespace
|
|
158
|
+
export declare namespace OrderCreateResponse {
|
|
196
159
|
/**
|
|
197
|
-
* The
|
|
160
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
198
161
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
199
162
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
200
163
|
* as this is the format accepted by most banks.
|
|
201
164
|
*/
|
|
202
165
|
interface Price {
|
|
203
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
166
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
204
167
|
/**
|
|
205
168
|
* The total amount to be paid.
|
|
206
169
|
*/
|
|
207
170
|
total: number;
|
|
208
|
-
/**
|
|
209
|
-
* The shipping amount.
|
|
210
|
-
*/
|
|
211
171
|
shipping?: number;
|
|
212
|
-
/**
|
|
213
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
214
|
-
*/
|
|
215
172
|
subTotal?: number;
|
|
216
|
-
/**
|
|
217
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
218
|
-
* to 2 decimal places for the actual transfer.
|
|
219
|
-
*/
|
|
220
173
|
totalNet?: number;
|
|
221
|
-
/**
|
|
222
|
-
* The VAT amount.
|
|
223
|
-
*/
|
|
224
174
|
vat?: number;
|
|
225
175
|
}
|
|
226
176
|
/**
|
|
227
|
-
* The billing address of the
|
|
177
|
+
* The billing address of the customer.
|
|
228
178
|
*/
|
|
229
179
|
interface BillingAddress {
|
|
230
180
|
city: string;
|
|
@@ -240,12 +190,75 @@ export declare namespace OrderRetrieveResponse {
|
|
|
240
190
|
line2?: string;
|
|
241
191
|
region?: string;
|
|
242
192
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
193
|
+
interface Destination {
|
|
194
|
+
/**
|
|
195
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
196
|
+
* to "iban", the "iban" object must be filled out.
|
|
197
|
+
*/
|
|
198
|
+
bankAccount: Destination.BankAccount;
|
|
199
|
+
/**
|
|
200
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
201
|
+
* that will be visible on the bank statement.
|
|
202
|
+
*/
|
|
203
|
+
bankStatementReference: string;
|
|
204
|
+
}
|
|
205
|
+
namespace Destination {
|
|
206
|
+
/**
|
|
207
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
208
|
+
* to "iban", the "iban" object must be filled out.
|
|
209
|
+
*/
|
|
210
|
+
interface BankAccount {
|
|
211
|
+
/**
|
|
212
|
+
* The type of the financial address. The actual destination is determined by this
|
|
213
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
214
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
215
|
+
* in the "iban" object.
|
|
216
|
+
*
|
|
217
|
+
* - iban: The IBAN of the account
|
|
218
|
+
* - sort_code: The sort code of the account
|
|
219
|
+
* - bank_code: The bank code of the account
|
|
220
|
+
* - bban: The BBAN of the account
|
|
221
|
+
*/
|
|
222
|
+
type: string;
|
|
223
|
+
bankCode?: BankAccount.BankCode;
|
|
224
|
+
bban?: BankAccount.Bban;
|
|
225
|
+
iban?: BankAccount.Iban;
|
|
226
|
+
sortCode?: BankAccount.SortCode;
|
|
227
|
+
}
|
|
228
|
+
namespace BankAccount {
|
|
229
|
+
interface BankCode {
|
|
230
|
+
/**
|
|
231
|
+
* The name of the account holder.
|
|
232
|
+
*/
|
|
233
|
+
accountHolderName: string;
|
|
234
|
+
accountNumber: string;
|
|
235
|
+
code: string;
|
|
236
|
+
}
|
|
237
|
+
interface Bban {
|
|
238
|
+
/**
|
|
239
|
+
* The name of the account holder.
|
|
240
|
+
*/
|
|
241
|
+
accountHolderName: string;
|
|
242
|
+
bban: string;
|
|
243
|
+
bic?: string;
|
|
244
|
+
}
|
|
245
|
+
interface Iban {
|
|
246
|
+
/**
|
|
247
|
+
* The name of the account holder.
|
|
248
|
+
*/
|
|
249
|
+
accountHolderName: string;
|
|
250
|
+
iban: string;
|
|
251
|
+
bic?: string;
|
|
252
|
+
}
|
|
253
|
+
interface SortCode {
|
|
254
|
+
/**
|
|
255
|
+
* The name of the account holder.
|
|
256
|
+
*/
|
|
257
|
+
accountHolderName: string;
|
|
258
|
+
accountNumber: string;
|
|
259
|
+
sortCode: string;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
249
262
|
}
|
|
250
263
|
interface LineItem {
|
|
251
264
|
/**
|
|
@@ -344,7 +357,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
344
357
|
* 10.23 EUR.
|
|
345
358
|
*/
|
|
346
359
|
amount?: number;
|
|
347
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
360
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
348
361
|
}
|
|
349
362
|
}
|
|
350
363
|
/**
|
|
@@ -356,7 +369,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
356
369
|
}
|
|
357
370
|
}
|
|
358
371
|
/**
|
|
359
|
-
*
|
|
372
|
+
* @deprecated
|
|
360
373
|
*/
|
|
361
374
|
interface MerchantFinancialAddress {
|
|
362
375
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -486,100 +499,6 @@ export declare namespace OrderRetrieveResponse {
|
|
|
486
499
|
updatedAt: string;
|
|
487
500
|
description?: string;
|
|
488
501
|
}
|
|
489
|
-
/**
|
|
490
|
-
* The shipping address of the user. This is only collected in express Checkouts.
|
|
491
|
-
*/
|
|
492
|
-
interface ShippingAddress {
|
|
493
|
-
city: string;
|
|
494
|
-
/**
|
|
495
|
-
* The country code in
|
|
496
|
-
* [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
497
|
-
*/
|
|
498
|
-
country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
|
|
499
|
-
line1: string;
|
|
500
|
-
zipCode: string;
|
|
501
|
-
firstName?: string;
|
|
502
|
-
lastName?: string;
|
|
503
|
-
line2?: string;
|
|
504
|
-
region?: string;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* The selected shipping method by the user. Can either be selected during an
|
|
508
|
-
* express Checkout Session or passed during Checkout Session creation.
|
|
509
|
-
*/
|
|
510
|
-
interface ShippingMethod {
|
|
511
|
-
/**
|
|
512
|
-
* The customer-facing name of the shipping method.
|
|
513
|
-
*/
|
|
514
|
-
name: string;
|
|
515
|
-
/**
|
|
516
|
-
* The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
|
|
517
|
-
*/
|
|
518
|
-
price: number;
|
|
519
|
-
/**
|
|
520
|
-
* The unique identifier of the shipping method within Ivy.
|
|
521
|
-
*/
|
|
522
|
-
id?: string;
|
|
523
|
-
/**
|
|
524
|
-
* The list of countries where the shipping method is available.
|
|
525
|
-
*/
|
|
526
|
-
countries?: Array<'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK'>;
|
|
527
|
-
/**
|
|
528
|
-
* The delivery estimate of the shipping method.
|
|
529
|
-
*/
|
|
530
|
-
deliveryEstimate?: ShippingMethod.DeliveryEstimate;
|
|
531
|
-
/**
|
|
532
|
-
* The unique identifier within your system of the shipping method.
|
|
533
|
-
*/
|
|
534
|
-
reference?: string;
|
|
535
|
-
/**
|
|
536
|
-
* @deprecated Deprecated in favor of deliveryEstimate
|
|
537
|
-
*/
|
|
538
|
-
timeFrame?: string;
|
|
539
|
-
}
|
|
540
|
-
namespace ShippingMethod {
|
|
541
|
-
/**
|
|
542
|
-
* The delivery estimate of the shipping method.
|
|
543
|
-
*/
|
|
544
|
-
interface DeliveryEstimate {
|
|
545
|
-
/**
|
|
546
|
-
* The maximum delivery time.
|
|
547
|
-
*/
|
|
548
|
-
maximum?: DeliveryEstimate.Maximum;
|
|
549
|
-
/**
|
|
550
|
-
* The minimum delivery time.
|
|
551
|
-
*/
|
|
552
|
-
minimum?: DeliveryEstimate.Minimum;
|
|
553
|
-
}
|
|
554
|
-
namespace DeliveryEstimate {
|
|
555
|
-
/**
|
|
556
|
-
* The maximum delivery time.
|
|
557
|
-
*/
|
|
558
|
-
interface Maximum {
|
|
559
|
-
/**
|
|
560
|
-
* The unit of the time duration.
|
|
561
|
-
*/
|
|
562
|
-
unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
|
|
563
|
-
/**
|
|
564
|
-
* The value of the time duration.
|
|
565
|
-
*/
|
|
566
|
-
value: number;
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* The minimum delivery time.
|
|
570
|
-
*/
|
|
571
|
-
interface Minimum {
|
|
572
|
-
/**
|
|
573
|
-
* The unit of the time duration.
|
|
574
|
-
*/
|
|
575
|
-
unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
|
|
576
|
-
/**
|
|
577
|
-
* The value of the time duration.
|
|
578
|
-
*/
|
|
579
|
-
value: number;
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
502
|
/**
|
|
584
503
|
* The shopper object. Contains information collected from the user during the
|
|
585
504
|
* Checkout.
|
|
@@ -593,12 +512,12 @@ export declare namespace OrderRetrieveResponse {
|
|
|
593
512
|
* Populated with the primary payment initiation failure classsification if
|
|
594
513
|
* available.
|
|
595
514
|
*/
|
|
596
|
-
primary
|
|
515
|
+
primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
|
|
597
516
|
/**
|
|
598
517
|
* Populated with the secondary payment initiation failure classsification if
|
|
599
518
|
* available.
|
|
600
519
|
*/
|
|
601
|
-
secondary?:
|
|
520
|
+
secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled';
|
|
602
521
|
}
|
|
603
522
|
interface StatusHistoryList {
|
|
604
523
|
/**
|
|
@@ -606,7 +525,7 @@ export declare namespace OrderRetrieveResponse {
|
|
|
606
525
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
607
526
|
* information.
|
|
608
527
|
*/
|
|
609
|
-
currentStatus: 'failed' | 'canceled' | 'processing' | '
|
|
528
|
+
currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
610
529
|
reason: string;
|
|
611
530
|
updatedAt: string;
|
|
612
531
|
/**
|
|
@@ -614,10 +533,10 @@ export declare namespace OrderRetrieveResponse {
|
|
|
614
533
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
615
534
|
* information.
|
|
616
535
|
*/
|
|
617
|
-
previousStatus?: 'failed' | 'canceled' | 'processing' | '
|
|
536
|
+
previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
|
|
618
537
|
}
|
|
619
538
|
}
|
|
620
|
-
export interface
|
|
539
|
+
export interface OrderRetrieveResponse {
|
|
621
540
|
/**
|
|
622
541
|
* The Ivy unique identifier for the order.
|
|
623
542
|
*/
|
|
@@ -643,12 +562,12 @@ export interface OrderUpdateResponse {
|
|
|
643
562
|
*/
|
|
644
563
|
merchantId: string;
|
|
645
564
|
/**
|
|
646
|
-
* The
|
|
565
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
647
566
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
648
567
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
649
568
|
* as this is the format accepted by most banks.
|
|
650
569
|
*/
|
|
651
|
-
price:
|
|
570
|
+
price: OrderRetrieveResponse.Price;
|
|
652
571
|
/**
|
|
653
572
|
* An internal reference id which will be stored with the checkout & corresponding
|
|
654
573
|
* order. Needs to be unique per shop per order and can be up to 200 characters.
|
|
@@ -663,81 +582,57 @@ export interface OrderUpdateResponse {
|
|
|
663
582
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
664
583
|
* information.
|
|
665
584
|
*/
|
|
666
|
-
status: 'failed' | 'canceled' | 'processing' | '
|
|
585
|
+
status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
667
586
|
updatedAt: string;
|
|
668
587
|
/**
|
|
669
|
-
* The
|
|
670
|
-
*
|
|
588
|
+
* The unique identifier of Ivy of the chosen bank to make the payment. Not there,
|
|
589
|
+
* if no payment was made.
|
|
590
|
+
*/
|
|
591
|
+
bankId?: string;
|
|
592
|
+
/**
|
|
593
|
+
* @deprecated The bank statement reference of the payment for the order. This is
|
|
594
|
+
* the reference that will be visible on the bank statement.
|
|
671
595
|
*/
|
|
672
596
|
bankStatementReference?: string;
|
|
673
597
|
/**
|
|
674
|
-
* The billing address of the
|
|
598
|
+
* The billing address of the customer.
|
|
675
599
|
*/
|
|
676
|
-
billingAddress?:
|
|
600
|
+
billingAddress?: OrderRetrieveResponse.BillingAddress;
|
|
677
601
|
/**
|
|
678
602
|
* The merchant category code or
|
|
679
603
|
* [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
|
|
680
604
|
*/
|
|
681
605
|
category?: string;
|
|
682
|
-
/**
|
|
683
|
-
* @deprecated
|
|
684
|
-
*/
|
|
685
|
-
climateActionMode?: OrderUpdateResponse.ClimateActionMode;
|
|
686
|
-
/**
|
|
687
|
-
* @deprecated
|
|
688
|
-
*/
|
|
689
|
-
co2Grams?: number;
|
|
690
606
|
/**
|
|
691
607
|
* The unique identifier of the customer who placed the order.
|
|
692
608
|
*/
|
|
693
609
|
customerId?: string;
|
|
610
|
+
destination?: OrderRetrieveResponse.Destination;
|
|
694
611
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
612
|
+
* @deprecated Currently only visible in the merchant dashboard. This id used to be
|
|
613
|
+
* displayed to the user during the checkout.
|
|
697
614
|
*/
|
|
698
615
|
displayId?: string;
|
|
699
616
|
/**
|
|
700
|
-
*
|
|
701
|
-
* to their bank login. For express Checkout Sessions this is always false.
|
|
617
|
+
* @deprecated The list of line items for the order.
|
|
702
618
|
*/
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
* Only valid for sustainable incentive mode. The social / sustainable projects
|
|
706
|
-
* available to the user during Checkout.
|
|
707
|
-
*/
|
|
708
|
-
impactOffsetProjects?: Array<string>;
|
|
709
|
-
/**
|
|
710
|
-
* The incentive mode of the checkout session. For any use-case apart from
|
|
711
|
-
* e-commerce, please use `white_label` as the value. If set to `white_label`, the
|
|
712
|
-
* checkout session will be white labeled. If set to `sustainable`, the checkout
|
|
713
|
-
* session will contain sustainable incentives for users.
|
|
714
|
-
*/
|
|
715
|
-
incentiveMode?: 'white_label' | 'sustainable';
|
|
716
|
-
/**
|
|
717
|
-
* The line items of the Checkout.
|
|
718
|
-
*/
|
|
719
|
-
lineItems?: Array<OrderUpdateResponse.LineItem>;
|
|
720
|
-
mandate?: OrderUpdateResponse.Mandate;
|
|
619
|
+
lineItems?: Array<OrderRetrieveResponse.LineItem>;
|
|
620
|
+
mandate?: OrderRetrieveResponse.Mandate;
|
|
721
621
|
/**
|
|
722
|
-
*
|
|
622
|
+
* @deprecated
|
|
723
623
|
*/
|
|
724
|
-
merchantFinancialAddress?:
|
|
624
|
+
merchantFinancialAddress?: OrderRetrieveResponse.MerchantFinancialAddress;
|
|
725
625
|
/**
|
|
726
626
|
* Any data which will be stored and returned for this checkout session and
|
|
727
627
|
* corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
|
|
728
628
|
* more info.
|
|
729
629
|
*/
|
|
730
630
|
metadata?: Record<string, unknown>;
|
|
731
|
-
/**
|
|
732
|
-
* Only valid for sustainable incentive mode. The social / sustainability project
|
|
733
|
-
* chosen by the user during Checkout.
|
|
734
|
-
*/
|
|
735
|
-
offsetProject?: string;
|
|
736
631
|
/**
|
|
737
632
|
* The source bank account where the money is send from.
|
|
738
633
|
*/
|
|
739
|
-
payerFinancialAddress?:
|
|
740
|
-
paymentMethodType?: 'sepa_debit' | 'customer_balance';
|
|
634
|
+
payerFinancialAddress?: OrderRetrieveResponse.PayerFinancialAddress;
|
|
635
|
+
paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
|
|
741
636
|
/**
|
|
742
637
|
* The payment mode of the order. Can be either 'settlement' or 'direct'.
|
|
743
638
|
*/
|
|
@@ -754,36 +649,23 @@ export interface OrderUpdateResponse {
|
|
|
754
649
|
/**
|
|
755
650
|
* The list of refunds connected to this order.
|
|
756
651
|
*/
|
|
757
|
-
refunds?: Array<
|
|
758
|
-
/**
|
|
759
|
-
* The shipping address of the user. This is only collected in express Checkouts.
|
|
760
|
-
*/
|
|
761
|
-
shippingAddress?: OrderUpdateResponse.ShippingAddress;
|
|
762
|
-
/**
|
|
763
|
-
* The selected shipping method by the user. Can either be selected during an
|
|
764
|
-
* express Checkout Session or passed during Checkout Session creation.
|
|
765
|
-
*/
|
|
766
|
-
shippingMethod?: OrderUpdateResponse.ShippingMethod;
|
|
767
|
-
/**
|
|
768
|
-
* The logo of the shop provided as a URL.
|
|
769
|
-
*/
|
|
770
|
-
shopLogo?: string;
|
|
652
|
+
refunds?: Array<OrderRetrieveResponse.Refund>;
|
|
771
653
|
/**
|
|
772
654
|
* The shopper object. Contains information collected from the user during the
|
|
773
655
|
* Checkout.
|
|
774
656
|
*/
|
|
775
|
-
shopper?:
|
|
657
|
+
shopper?: OrderRetrieveResponse.Shopper;
|
|
776
658
|
/**
|
|
777
659
|
* @deprecated Deprecated in favor of `shopper.email`. The email of the user if
|
|
778
660
|
* collected in the Checkout.
|
|
779
661
|
*/
|
|
780
662
|
shopperEmail?: string;
|
|
781
|
-
statusClassification?:
|
|
663
|
+
statusClassification?: OrderRetrieveResponse.StatusClassification;
|
|
782
664
|
/**
|
|
783
665
|
* List of status history items for the order, used for logging every update on
|
|
784
666
|
* status.
|
|
785
667
|
*/
|
|
786
|
-
statusHistoryList?: Array<
|
|
668
|
+
statusHistoryList?: Array<OrderRetrieveResponse.StatusHistoryList>;
|
|
787
669
|
/**
|
|
788
670
|
* The subaccount id of the order.
|
|
789
671
|
*/
|
|
@@ -792,44 +674,27 @@ export interface OrderUpdateResponse {
|
|
|
792
674
|
* The legal name of the subaccount
|
|
793
675
|
*/
|
|
794
676
|
subaccountLegalName?: string;
|
|
795
|
-
/**
|
|
796
|
-
* @deprecated
|
|
797
|
-
*/
|
|
798
|
-
trees?: number;
|
|
799
677
|
}
|
|
800
|
-
export declare namespace
|
|
678
|
+
export declare namespace OrderRetrieveResponse {
|
|
801
679
|
/**
|
|
802
|
-
* The
|
|
680
|
+
* The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
|
|
803
681
|
* represents EUR 10.23. Any amount of decimal places can be provided on
|
|
804
682
|
* initialization, but the actual transfer amount is rounded to 2 decimal places,
|
|
805
683
|
* as this is the format accepted by most banks.
|
|
806
684
|
*/
|
|
807
685
|
interface Price {
|
|
808
|
-
currency: 'EUR' | 'GBP' | 'PLN';
|
|
686
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
809
687
|
/**
|
|
810
688
|
* The total amount to be paid.
|
|
811
689
|
*/
|
|
812
690
|
total: number;
|
|
813
|
-
/**
|
|
814
|
-
* The shipping amount.
|
|
815
|
-
*/
|
|
816
691
|
shipping?: number;
|
|
817
|
-
/**
|
|
818
|
-
* The subtotal amount, i.e. the total amount without VAT and shipping.
|
|
819
|
-
*/
|
|
820
692
|
subTotal?: number;
|
|
821
|
-
/**
|
|
822
|
-
* The total net amount, i.e. the total amount without VAT. This value is rounded
|
|
823
|
-
* to 2 decimal places for the actual transfer.
|
|
824
|
-
*/
|
|
825
693
|
totalNet?: number;
|
|
826
|
-
/**
|
|
827
|
-
* The VAT amount.
|
|
828
|
-
*/
|
|
829
694
|
vat?: number;
|
|
830
695
|
}
|
|
831
696
|
/**
|
|
832
|
-
* The billing address of the
|
|
697
|
+
* The billing address of the customer.
|
|
833
698
|
*/
|
|
834
699
|
interface BillingAddress {
|
|
835
700
|
city: string;
|
|
@@ -845,12 +710,75 @@ export declare namespace OrderUpdateResponse {
|
|
|
845
710
|
line2?: string;
|
|
846
711
|
region?: string;
|
|
847
712
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
713
|
+
interface Destination {
|
|
714
|
+
/**
|
|
715
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
716
|
+
* to "iban", the "iban" object must be filled out.
|
|
717
|
+
*/
|
|
718
|
+
bankAccount: Destination.BankAccount;
|
|
719
|
+
/**
|
|
720
|
+
* The bank statement reference of the payment for the order. This is the reference
|
|
721
|
+
* that will be visible on the bank statement.
|
|
722
|
+
*/
|
|
723
|
+
bankStatementReference: string;
|
|
724
|
+
}
|
|
725
|
+
namespace Destination {
|
|
726
|
+
/**
|
|
727
|
+
* The validation logic is based on the "type" field. For example, if "type" is set
|
|
728
|
+
* to "iban", the "iban" object must be filled out.
|
|
729
|
+
*/
|
|
730
|
+
interface BankAccount {
|
|
731
|
+
/**
|
|
732
|
+
* The type of the financial address. The actual destination is determined by this
|
|
733
|
+
* field which can be either "iban", "sortCode", "bankCode", or "bban". The
|
|
734
|
+
* validation will fail if you set e.g. type="iban", but then not fill any values
|
|
735
|
+
* in the "iban" object.
|
|
736
|
+
*
|
|
737
|
+
* - iban: The IBAN of the account
|
|
738
|
+
* - sort_code: The sort code of the account
|
|
739
|
+
* - bank_code: The bank code of the account
|
|
740
|
+
* - bban: The BBAN of the account
|
|
741
|
+
*/
|
|
742
|
+
type: string;
|
|
743
|
+
bankCode?: BankAccount.BankCode;
|
|
744
|
+
bban?: BankAccount.Bban;
|
|
745
|
+
iban?: BankAccount.Iban;
|
|
746
|
+
sortCode?: BankAccount.SortCode;
|
|
747
|
+
}
|
|
748
|
+
namespace BankAccount {
|
|
749
|
+
interface BankCode {
|
|
750
|
+
/**
|
|
751
|
+
* The name of the account holder.
|
|
752
|
+
*/
|
|
753
|
+
accountHolderName: string;
|
|
754
|
+
accountNumber: string;
|
|
755
|
+
code: string;
|
|
756
|
+
}
|
|
757
|
+
interface Bban {
|
|
758
|
+
/**
|
|
759
|
+
* The name of the account holder.
|
|
760
|
+
*/
|
|
761
|
+
accountHolderName: string;
|
|
762
|
+
bban: string;
|
|
763
|
+
bic?: string;
|
|
764
|
+
}
|
|
765
|
+
interface Iban {
|
|
766
|
+
/**
|
|
767
|
+
* The name of the account holder.
|
|
768
|
+
*/
|
|
769
|
+
accountHolderName: string;
|
|
770
|
+
iban: string;
|
|
771
|
+
bic?: string;
|
|
772
|
+
}
|
|
773
|
+
interface SortCode {
|
|
774
|
+
/**
|
|
775
|
+
* The name of the account holder.
|
|
776
|
+
*/
|
|
777
|
+
accountHolderName: string;
|
|
778
|
+
accountNumber: string;
|
|
779
|
+
sortCode: string;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
854
782
|
}
|
|
855
783
|
interface LineItem {
|
|
856
784
|
/**
|
|
@@ -949,7 +877,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
949
877
|
* 10.23 EUR.
|
|
950
878
|
*/
|
|
951
879
|
amount?: number;
|
|
952
|
-
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
880
|
+
currency?: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
953
881
|
}
|
|
954
882
|
}
|
|
955
883
|
/**
|
|
@@ -961,7 +889,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
961
889
|
}
|
|
962
890
|
}
|
|
963
891
|
/**
|
|
964
|
-
*
|
|
892
|
+
* @deprecated
|
|
965
893
|
*/
|
|
966
894
|
interface MerchantFinancialAddress {
|
|
967
895
|
bankCode?: MerchantFinancialAddress.BankCode;
|
|
@@ -1091,100 +1019,6 @@ export declare namespace OrderUpdateResponse {
|
|
|
1091
1019
|
updatedAt: string;
|
|
1092
1020
|
description?: string;
|
|
1093
1021
|
}
|
|
1094
|
-
/**
|
|
1095
|
-
* The shipping address of the user. This is only collected in express Checkouts.
|
|
1096
|
-
*/
|
|
1097
|
-
interface ShippingAddress {
|
|
1098
|
-
city: string;
|
|
1099
|
-
/**
|
|
1100
|
-
* The country code in
|
|
1101
|
-
* [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
1102
|
-
*/
|
|
1103
|
-
country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
|
|
1104
|
-
line1: string;
|
|
1105
|
-
zipCode: string;
|
|
1106
|
-
firstName?: string;
|
|
1107
|
-
lastName?: string;
|
|
1108
|
-
line2?: string;
|
|
1109
|
-
region?: string;
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* The selected shipping method by the user. Can either be selected during an
|
|
1113
|
-
* express Checkout Session or passed during Checkout Session creation.
|
|
1114
|
-
*/
|
|
1115
|
-
interface ShippingMethod {
|
|
1116
|
-
/**
|
|
1117
|
-
* The customer-facing name of the shipping method.
|
|
1118
|
-
*/
|
|
1119
|
-
name: string;
|
|
1120
|
-
/**
|
|
1121
|
-
* The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
|
|
1122
|
-
*/
|
|
1123
|
-
price: number;
|
|
1124
|
-
/**
|
|
1125
|
-
* The unique identifier of the shipping method within Ivy.
|
|
1126
|
-
*/
|
|
1127
|
-
id?: string;
|
|
1128
|
-
/**
|
|
1129
|
-
* The list of countries where the shipping method is available.
|
|
1130
|
-
*/
|
|
1131
|
-
countries?: Array<'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK'>;
|
|
1132
|
-
/**
|
|
1133
|
-
* The delivery estimate of the shipping method.
|
|
1134
|
-
*/
|
|
1135
|
-
deliveryEstimate?: ShippingMethod.DeliveryEstimate;
|
|
1136
|
-
/**
|
|
1137
|
-
* The unique identifier within your system of the shipping method.
|
|
1138
|
-
*/
|
|
1139
|
-
reference?: string;
|
|
1140
|
-
/**
|
|
1141
|
-
* @deprecated Deprecated in favor of deliveryEstimate
|
|
1142
|
-
*/
|
|
1143
|
-
timeFrame?: string;
|
|
1144
|
-
}
|
|
1145
|
-
namespace ShippingMethod {
|
|
1146
|
-
/**
|
|
1147
|
-
* The delivery estimate of the shipping method.
|
|
1148
|
-
*/
|
|
1149
|
-
interface DeliveryEstimate {
|
|
1150
|
-
/**
|
|
1151
|
-
* The maximum delivery time.
|
|
1152
|
-
*/
|
|
1153
|
-
maximum?: DeliveryEstimate.Maximum;
|
|
1154
|
-
/**
|
|
1155
|
-
* The minimum delivery time.
|
|
1156
|
-
*/
|
|
1157
|
-
minimum?: DeliveryEstimate.Minimum;
|
|
1158
|
-
}
|
|
1159
|
-
namespace DeliveryEstimate {
|
|
1160
|
-
/**
|
|
1161
|
-
* The maximum delivery time.
|
|
1162
|
-
*/
|
|
1163
|
-
interface Maximum {
|
|
1164
|
-
/**
|
|
1165
|
-
* The unit of the time duration.
|
|
1166
|
-
*/
|
|
1167
|
-
unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
|
|
1168
|
-
/**
|
|
1169
|
-
* The value of the time duration.
|
|
1170
|
-
*/
|
|
1171
|
-
value: number;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* The minimum delivery time.
|
|
1175
|
-
*/
|
|
1176
|
-
interface Minimum {
|
|
1177
|
-
/**
|
|
1178
|
-
* The unit of the time duration.
|
|
1179
|
-
*/
|
|
1180
|
-
unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
|
|
1181
|
-
/**
|
|
1182
|
-
* The value of the time duration.
|
|
1183
|
-
*/
|
|
1184
|
-
value: number;
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
1022
|
/**
|
|
1189
1023
|
* The shopper object. Contains information collected from the user during the
|
|
1190
1024
|
* Checkout.
|
|
@@ -1198,12 +1032,12 @@ export declare namespace OrderUpdateResponse {
|
|
|
1198
1032
|
* Populated with the primary payment initiation failure classsification if
|
|
1199
1033
|
* available.
|
|
1200
1034
|
*/
|
|
1201
|
-
primary
|
|
1035
|
+
primary: 'payment_authorisation_failed' | 'payment_execution_failed' | 'payment_abandoned';
|
|
1202
1036
|
/**
|
|
1203
1037
|
* Populated with the secondary payment initiation failure classsification if
|
|
1204
1038
|
* available.
|
|
1205
1039
|
*/
|
|
1206
|
-
secondary?:
|
|
1040
|
+
secondary?: 'timeout' | 'wrong_credentials' | 'incorrect_2fa_response' | 'payment_rejected' | 'insufficient_funds' | 'cancelled' | 'connection_to_bank_failed' | 'international_transfer_blocked' | 'international_transfer_limit_exceeded' | 'user_blocked' | 'bank_error' | 'instant_transfers_not_enabled' | 'no_active_tan_methods_available' | 'account_limit_exceeded' | 'bank_under_maintenance' | 'pin_blocked' | 'payment_not_settled';
|
|
1207
1041
|
}
|
|
1208
1042
|
interface StatusHistoryList {
|
|
1209
1043
|
/**
|
|
@@ -1211,7 +1045,7 @@ export declare namespace OrderUpdateResponse {
|
|
|
1211
1045
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1212
1046
|
* information.
|
|
1213
1047
|
*/
|
|
1214
|
-
currentStatus: 'failed' | 'canceled' | 'processing' | '
|
|
1048
|
+
currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
|
|
1215
1049
|
reason: string;
|
|
1216
1050
|
updatedAt: string;
|
|
1217
1051
|
/**
|
|
@@ -1219,37 +1053,53 @@ export declare namespace OrderUpdateResponse {
|
|
|
1219
1053
|
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1220
1054
|
* information.
|
|
1221
1055
|
*/
|
|
1222
|
-
previousStatus?: 'failed' | 'canceled' | 'processing' | '
|
|
1056
|
+
previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
|
|
1223
1057
|
}
|
|
1224
1058
|
}
|
|
1225
|
-
export interface
|
|
1226
|
-
id: string;
|
|
1227
|
-
}
|
|
1228
|
-
export interface OrderUpdateParams {
|
|
1229
|
-
id: string;
|
|
1059
|
+
export interface OrderCreateParams {
|
|
1230
1060
|
/**
|
|
1231
|
-
* The
|
|
1232
|
-
* orders in the Ivy Dashboard.
|
|
1061
|
+
* The total amount of the order
|
|
1233
1062
|
*/
|
|
1234
|
-
|
|
1063
|
+
amount: number;
|
|
1235
1064
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
* order. Needs to be unique per shop per order and can be up to 200 characters. We
|
|
1238
|
-
* recommend to use your internal order id here.
|
|
1065
|
+
* The currency code of the order
|
|
1239
1066
|
*/
|
|
1240
|
-
|
|
1067
|
+
currency: 'EUR' | 'GBP' | 'PLN' | 'SEK' | 'DKK';
|
|
1241
1068
|
/**
|
|
1242
|
-
* The
|
|
1069
|
+
* The merchant's unique reference ID for the order
|
|
1243
1070
|
*/
|
|
1244
|
-
|
|
1071
|
+
referenceId: string;
|
|
1245
1072
|
/**
|
|
1246
|
-
* The
|
|
1247
|
-
* attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
|
|
1248
|
-
* information.
|
|
1073
|
+
* The customer of the merchant.
|
|
1249
1074
|
*/
|
|
1250
|
-
|
|
1075
|
+
customer?: OrderCreateParams.Email | OrderCreateParams.ID;
|
|
1076
|
+
/**
|
|
1077
|
+
* Optional expiration timestamp in seconds
|
|
1078
|
+
*/
|
|
1079
|
+
expiresAt?: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* The subaccount id of the merchant.
|
|
1082
|
+
*/
|
|
1083
|
+
subaccountId?: string;
|
|
1084
|
+
}
|
|
1085
|
+
export declare namespace OrderCreateParams {
|
|
1086
|
+
interface Email {
|
|
1087
|
+
/**
|
|
1088
|
+
* The email of the customer.
|
|
1089
|
+
*/
|
|
1090
|
+
email: string;
|
|
1091
|
+
}
|
|
1092
|
+
interface ID {
|
|
1093
|
+
/**
|
|
1094
|
+
* The Ivy id of the customer.
|
|
1095
|
+
*/
|
|
1096
|
+
id: string;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
export interface OrderRetrieveParams {
|
|
1100
|
+
id: string;
|
|
1251
1101
|
}
|
|
1252
1102
|
export declare namespace Orders {
|
|
1253
|
-
export { type
|
|
1103
|
+
export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, };
|
|
1254
1104
|
}
|
|
1255
1105
|
//# sourceMappingURL=orders.d.ts.map
|