@dintero/checkout-web-sdk 0.6.5 → 0.6.7

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.
@@ -0,0 +1,937 @@
1
+ export interface Address {
2
+ /**
3
+ * example:
4
+ * Sommerkroveien 34
5
+ */
6
+ address_line: string;
7
+ /**
8
+ * example:
9
+ * PB 123
10
+ */
11
+ address_line_2?: string;
12
+ /**
13
+ * example:
14
+ * 4515
15
+ */
16
+ postal_code?: string;
17
+ /**
18
+ * example:
19
+ * Oslo
20
+ */
21
+ postal_place: string;
22
+ /**
23
+ * ISO 3166-1 country code
24
+ *
25
+ * example:
26
+ * NO
27
+ */
28
+ country: string;
29
+ }
30
+ export interface Store {
31
+ /**
32
+ * example:
33
+ * sc029
34
+ */
35
+ id: string;
36
+ /**
37
+ * name of the store, aka trade name of the store
38
+ *
39
+ * example:
40
+ * SC Oslo
41
+ */
42
+ name?: string;
43
+ /**
44
+ * Official name of the person or entity that owns the store.
45
+ *
46
+ * example:
47
+ * SC Oslo AS
48
+ */
49
+ business_name?: string;
50
+ address?: Address;
51
+ /**
52
+ * example:
53
+ * SuperChain
54
+ */
55
+ chain?: string;
56
+ /**
57
+ * example:
58
+ * contact@superchain.com
59
+ */
60
+ email?: string;
61
+ /**
62
+ * example:
63
+ * 5790001398644
64
+ */
65
+ gln?: string;
66
+ /**
67
+ * example:
68
+ * 123456789MVA
69
+ */
70
+ organization_number?: string;
71
+ /**
72
+ * example:
73
+ * +4738260107
74
+ */
75
+ phone_number?: string;
76
+ /**
77
+ * A four-digit Merchant Category Code (MCC) for the store
78
+ * [ISO 18245:2003](https://www.iso.org/standard/33365.html)
79
+ *
80
+ * example:
81
+ * 5814
82
+ */
83
+ mcc?: string;
84
+ /**
85
+ * Merchant number associated with the stores
86
+ * payment terminal
87
+ *
88
+ * example:
89
+ * 102603
90
+ */
91
+ bax?: string;
92
+ /**
93
+ * Id to a specific point-of-sale (POS) terminal
94
+ * or workstation
95
+ *
96
+ * example:
97
+ * T0292
98
+ */
99
+ terminal_id?: string;
100
+ }
101
+ export interface ShippingOption {
102
+ /**
103
+ * Id of this shipping option product.
104
+ *
105
+ * The express checkout will group all products with the same id. Used for
106
+ * grouping delivery to the same address at different time slots, or for
107
+ * grouping deliveries to different pick up points.
108
+ *
109
+ * example:
110
+ * bring-pick-up-00001
111
+ */
112
+ id: string;
113
+ /**
114
+ * Unique id of the specific configuration of this shipping product
115
+ *
116
+ * example:
117
+ * bring-pick-up-00001-location-0a1f6b
118
+ */
119
+ line_id: string;
120
+ /**
121
+ * Countries where this shipping option can be used
122
+ */
123
+ countries?: string[];
124
+ /**
125
+ * The monetary amount of the shipping option
126
+ *
127
+ * example:
128
+ * 3900
129
+ */
130
+ amount: number;
131
+ /**
132
+ * The VAT of the `amount` parameter. Only
133
+ * used for display purposes.
134
+ *
135
+ * example:
136
+ * 975
137
+ */
138
+ vat_amount?: number;
139
+ /**
140
+ * The VAT percentage
141
+ *
142
+ * example:
143
+ * 25
144
+ */
145
+ vat?: number;
146
+ /**
147
+ * A shipping option title. Eg. "Standard"
148
+ *
149
+ * example:
150
+ * Standard
151
+ */
152
+ title: string;
153
+ /**
154
+ * A short description of the shipping option product
155
+ *
156
+ * example:
157
+ * Pick up at your nearest postal office
158
+ */
159
+ description?: string;
160
+ /**
161
+ * example:
162
+ * pick_up
163
+ */
164
+ delivery_method?: "delivery" | "pick_up" | "none";
165
+ /**
166
+ * Name of company that provides shipping service
167
+ *
168
+ * example:
169
+ * Bring
170
+ */
171
+ operator: string;
172
+ /**
173
+ * The operators own id for this shipping product
174
+ *
175
+ * example:
176
+ * pick-up-00001-location-0a1f6b
177
+ */
178
+ operator_product_id?: string;
179
+ /**
180
+ * Estimated time of arrival
181
+ */
182
+ eta?: {
183
+ /**
184
+ * example:
185
+ * 2020-10-14T19:00:00Z
186
+ */
187
+ starts_at?: string;
188
+ /**
189
+ * example:
190
+ * 2020-10-14T20:00:00Z
191
+ */
192
+ ends_at?: string;
193
+ };
194
+ /**
195
+ * A specified time for delivery to customer
196
+ */
197
+ time_slot?: {
198
+ /**
199
+ * example:
200
+ * 2020-10-14T19:00:00Z
201
+ */
202
+ starts_at?: string;
203
+ /**
204
+ * example:
205
+ * 2020-10-14T20:00:00Z
206
+ */
207
+ ends_at?: string;
208
+ };
209
+ /**
210
+ * Address
211
+ */
212
+ pick_up_address?: {
213
+ /**
214
+ * example:
215
+ * John
216
+ */
217
+ first_name?: string;
218
+ /**
219
+ * example:
220
+ * Doe
221
+ */
222
+ last_name?: string;
223
+ /**
224
+ * Gaustadalleen 21
225
+ */
226
+ address_line?: string;
227
+ /**
228
+ * PB 123
229
+ */
230
+ address_line_2?: string;
231
+ /**
232
+ * example:
233
+ * Land Lord
234
+ */
235
+ co_address?: string;
236
+ /**
237
+ * Name of the company
238
+ */
239
+ business_name?: string;
240
+ /**
241
+ * The zip code / postal code of the address.
242
+ * example:
243
+ * O349
244
+ */
245
+ postal_code?: string;
246
+ /**
247
+ * The name of the postal code
248
+ * example:
249
+ * Oslo
250
+ */
251
+ postal_place?: string;
252
+ /**
253
+ * Country of the location
254
+ * example:
255
+ * NO
256
+ */
257
+ country?: string;
258
+ /**
259
+ * mobile number of a person / company, ITU/E.123 format with
260
+ * international prefix (+PPNNNNNNNNN...)
261
+ *
262
+ */
263
+ phone_number?: string;
264
+ /**
265
+ * The email address of a person or an organization
266
+ *
267
+ */
268
+ email?: string;
269
+ latitude?: number;
270
+ longitude?: number;
271
+ /**
272
+ * Comment about the address
273
+ *
274
+ */
275
+ comment?: string;
276
+ /**
277
+ * Distance in kilometers from the shipping_address.
278
+ *
279
+ */
280
+ distance?: number;
281
+ };
282
+ }
283
+ /**
284
+ * Address in an Order
285
+ */
286
+ export interface OrderAddress {
287
+ /**
288
+ * example:
289
+ * John
290
+ */
291
+ first_name?: string;
292
+ /**
293
+ * example:
294
+ * Doe
295
+ */
296
+ last_name?: string;
297
+ /**
298
+ * Gaustadalleen 21
299
+ */
300
+ address_line?: string;
301
+ /**
302
+ * PB 123
303
+ */
304
+ address_line_2?: string;
305
+ /**
306
+ * example:
307
+ * Land Lord
308
+ */
309
+ co_address?: string;
310
+ /**
311
+ * Name of the company
312
+ */
313
+ business_name?: string;
314
+ /**
315
+ * The zip code / postal code of the address.
316
+ * example:
317
+ * O349
318
+ */
319
+ postal_code?: string;
320
+ /**
321
+ * The name of the postal code
322
+ * example:
323
+ * Oslo
324
+ */
325
+ postal_place?: string;
326
+ /**
327
+ * Country of the location
328
+ * example:
329
+ * NO
330
+ */
331
+ country?: string;
332
+ /**
333
+ * mobile number of a person / company, ITU/E.123 format with
334
+ * international prefix (+PPNNNNNNNNN...)
335
+ *
336
+ */
337
+ phone_number?: string;
338
+ /**
339
+ * The email address of a person or an organization
340
+ *
341
+ */
342
+ email?: string;
343
+ latitude?: number;
344
+ longitude?: number;
345
+ /**
346
+ * Comment about the address
347
+ *
348
+ */
349
+ comment?: string;
350
+ }
351
+ export interface DiscountItem {
352
+ /**
353
+ * Monetary amount in smallest unit for the currency
354
+ *
355
+ * example:
356
+ * 23130
357
+ */
358
+ amount?: number;
359
+ /**
360
+ * Optional, set if the amount given was from a percentage discount
361
+ *
362
+ * example:
363
+ * 10
364
+ */
365
+ percentage?: number;
366
+ discount_type?: "customer" | "periodic" | "manual" | "loyalty" | "total" | "employee" | "external";
367
+ /**
368
+ * example:
369
+ * 766da0ef-9283-42bd-b012-0582344ec53c
370
+ */
371
+ discount_id?: string;
372
+ description?: string;
373
+ /**
374
+ * example:
375
+ * 1
376
+ */
377
+ line_id?: number;
378
+ }
379
+ /**
380
+ * Publish checkout message to the customer.
381
+ *
382
+ */
383
+ export type PublishConfiguration = {
384
+ channel: "sms" | "push";
385
+ type: "checkout-link" | "app";
386
+ readonly id?: string;
387
+ /**
388
+ * status of the message sent to the customer.
389
+ *
390
+ * **`skipped`** will used in case where publish
391
+ * cannot be sent given the `session.customer`.
392
+ *
393
+ */
394
+ readonly status?: "sent" | "skipped" | "failed";
395
+ }[];
396
+ export interface InstabankConfiguration {
397
+ /**
398
+ * finance payment
399
+ */
400
+ finance?: {
401
+ /**
402
+ * enable finance payment
403
+ */
404
+ enabled: boolean;
405
+ };
406
+ /**
407
+ * invoice payment
408
+ */
409
+ invoice?: {
410
+ /**
411
+ * enable invoice payment (only for amounts greater than 500 NOK)
412
+ */
413
+ enabled: boolean;
414
+ };
415
+ }
416
+ export interface VippsConfiguration {
417
+ /**
418
+ * enable vipps payment
419
+ */
420
+ enabled: boolean;
421
+ /**
422
+ * A short reference / descriptor that can be displayed to
423
+ * the end user
424
+ *
425
+ */
426
+ dynamic_descriptor?: string;
427
+ }
428
+ export interface CollectorConfiguration {
429
+ /**
430
+ * A textual description max 40 characters of the purchase.
431
+ *
432
+ */
433
+ dynamic_descriptor?: string;
434
+ invoice?: {
435
+ /**
436
+ * enable Collector Bank Invoice Payment
437
+ */
438
+ enabled: boolean;
439
+ };
440
+ finance?: {
441
+ /**
442
+ * enable Collector Bank Finance Payment
443
+ */
444
+ enabled: boolean;
445
+ };
446
+ }
447
+ export interface SantanderConfiguration {
448
+ /**
449
+ * Denotes what kind of config parameter this is
450
+ */
451
+ type?: "payment_type";
452
+ debit_account?: {
453
+ /**
454
+ * Denotes what kind of config parameter this is
455
+ */
456
+ type?: "payment_product_type";
457
+ /**
458
+ * enable Santander Finance Debit Account
459
+ */
460
+ enabled: boolean;
461
+ /**
462
+ * The name of the chain
463
+ */
464
+ branding_name?: string;
465
+ /**
466
+ * Debit accounts belonging to the customer's phone number
467
+ */
468
+ accounts?: {
469
+ /**
470
+ * Token to represent the account number
471
+ */
472
+ account_number_token?: string;
473
+ /**
474
+ * Representation of the account number for display purposes
475
+ */
476
+ masked_account_number?: string;
477
+ }[];
478
+ };
479
+ }
480
+ export interface PayExConfiguration {
481
+ /**
482
+ * A textual description max 40 characters of the purchase.
483
+ *
484
+ */
485
+ dynamic_descriptor?: string;
486
+ swish?: {
487
+ /**
488
+ * enable Payex Swish Payment
489
+ */
490
+ enabled: boolean;
491
+ };
492
+ creditcard?: {
493
+ /**
494
+ * enable Credit Card Payment
495
+ */
496
+ enabled: boolean;
497
+ };
498
+ }
499
+ export interface Session {
500
+ url: {
501
+ /**
502
+ * URL to page where Checkout will redirect the
503
+ * customer to after the Checkout process has ended.
504
+ *
505
+ * If a transaction was completed successfully, a `transaction_id`
506
+ * will be appended to the URL as a `query` string parameter
507
+ *
508
+ * > A `transaction_id` will be appended to the URL if the
509
+ * > Checkout failed with `error=capture`
510
+ *
511
+ * *Example*:
512
+ *
513
+ * ```
514
+ * https://example.com/accept?transaction_id=T00000000.3YkJXSdSnUBXcmQSzn7uJj
515
+ * ```
516
+ *
517
+ * query name | type | description | required
518
+ * -------------- | :----------: | ----------- | :-----------:
519
+ * transaction_id | string | Transaction Id | false
520
+ * error | string | Error code identifying cause | false
521
+ * merchant_reference | string | The merchants reference | true
522
+ *
523
+ * In case of that something went wrong with the payment flow, an
524
+ * `error` query parameter will be appended to the URL. The value
525
+ * of the error is a code identifying the cause.
526
+ *
527
+ * error | Description
528
+ * ------------- | ------------
529
+ * cancelled | Customer cancelled the checkout payment
530
+ * authorization | Customer failed to authorize the payment
531
+ * capture | The transaction capture operation failed during auto-capture
532
+ * failed | The transaction has been rejected by us, or an error has occurred during transaction processing
533
+ *
534
+ * example:
535
+ * https://example.com/accept
536
+ */
537
+ return_url: string;
538
+ /**
539
+ * URL that Checkout will call when the session
540
+ * payment is complete and the transaction has been authorized/captured.
541
+ *
542
+ * > A session with `auto_capture` enabled will only receive the call
543
+ * > when the transaction is captured.
544
+ *
545
+ * Unlike the `return_url` the `callback_url` is system-to-system
546
+ * which means delivery is guaranteed.
547
+ *
548
+ * Once a session payment is complete the callback_url is invoked as a
549
+ * `GET` request to notify your system that the payment has been approved.
550
+ *
551
+ * A successful delivery to an HTTP/HTTPS callback_url sometimes requires
552
+ * more than one attempt. This can be the case, for example, if the server
553
+ * hosting the callback_url is down for maintenance or is experiencing
554
+ * heavy traffic.
555
+ *
556
+ * Dintero attempts a retry only after a failed delivery attempt, following
557
+ * situations is considered as failed delivery
558
+ *
559
+ * - HTTP status code 100 to 101 and 500 to 599 (inclusive)
560
+ * (HTTP status code 400 to 499 is considered as permanent failure)
561
+ * - A request timeout (10 seconds)
562
+ * - Any connection error such as connection timeout, bad certificate, etc
563
+ *
564
+ * Failed delivery will be retried 20 times.
565
+ *
566
+ * query name | type | description | required
567
+ * ------------- | :-----------: | -----------: | :-----------:
568
+ * transaction_id | string | Transaction Id | true
569
+ * session_id | string   | Session Id | true
570
+ * merchant_reference | string | The merchants reference | true
571
+ * time | string | ISO 8601 format | true
572
+ *
573
+ * example:
574
+ * https://example.com/callback
575
+ */
576
+ callback_url?: string;
577
+ };
578
+ customer?: {
579
+ /**
580
+ * Customer id
581
+ *
582
+ */
583
+ customer_id?: string;
584
+ /**
585
+ * Customer email address
586
+ *
587
+ * example:
588
+ * john.doe@example.com
589
+ */
590
+ email?: string;
591
+ /**
592
+ * Customer phone number, ITU/E.123 format with
593
+ * international prefix (+PPNNNNNNNNN...)
594
+ *
595
+ * example:
596
+ * +4799999999
597
+ */
598
+ phone_number?: string;
599
+ };
600
+ order: {
601
+ /**
602
+ * The amount to authorize/capture including VAT and discounts.
603
+ *
604
+ * example:
605
+ * 29990
606
+ */
607
+ amount: number;
608
+ /**
609
+ * The VAT of the `amount` parameter.
610
+ * Only used for display purposes.
611
+ *
612
+ * example:
613
+ * 6000
614
+ */
615
+ vat_amount?: number;
616
+ /**
617
+ * The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
618
+ * example:
619
+ * NOK
620
+ */
621
+ currency: string;
622
+ /**
623
+ * A reference by the merchant to identify the corresponding
624
+ * order for the Checkout Session
625
+ *
626
+ */
627
+ merchant_reference: string;
628
+ shipping_address?: OrderAddress;
629
+ billing_address?: OrderAddress;
630
+ /**
631
+ * This is a partial payment where the `order.amount` can be lower or
632
+ * equal to the sum of `order.items.amount`
633
+ *
634
+ */
635
+ partial_payment?: boolean;
636
+ /**
637
+ * Details about the order items.
638
+ *
639
+ * #### Instabank
640
+ * `required` if Instabank payment is configured in and partial_payment is false.
641
+ * All items must include a unique `line_id`, quantity and amount
642
+ *
643
+ * #### Collector Bank
644
+ * `required` if Collector Bank payment is configured in and partial_payment is false.
645
+ * All items must include a unique `line_id`, quantity and amount
646
+ *
647
+ */
648
+ items?: {
649
+ /**
650
+ * The ID or SKU of the product on the line
651
+ *
652
+ * example:
653
+ * item_01
654
+ */
655
+ id?: string;
656
+ /**
657
+ * The groups the product on the line belongs to
658
+ *
659
+ * example:
660
+ * [object Object]
661
+ */
662
+ groups?: {
663
+ /**
664
+ * Group ID
665
+ */
666
+ id: string;
667
+ /**
668
+ * Group name
669
+ */
670
+ name?: string;
671
+ }[];
672
+ /**
673
+ * the number of the line (or id), must be `unique` between
674
+ * all items. `required` when Instabank payment is configured.
675
+ *
676
+ * example:
677
+ * 1
678
+ */
679
+ line_id?: string;
680
+ /**
681
+ * A short, localized description of the line item
682
+ *
683
+ * example:
684
+ * Stablestol
685
+ */
686
+ description?: string;
687
+ /**
688
+ * The quantity of the product in the item line.
689
+ *
690
+ * example:
691
+ * 1
692
+ */
693
+ quantity?: number;
694
+ /**
695
+ * The total monetary amount of the line item
696
+ *
697
+ * example:
698
+ * 29990
699
+ */
700
+ amount?: number;
701
+ /**
702
+ * The VAT of the `amount` parameter. Only
703
+ * used for display purposes.
704
+ *
705
+ * example:
706
+ * 6000
707
+ */
708
+ vat_amount?: number;
709
+ /**
710
+ * The VAT percentage
711
+ *
712
+ * example:
713
+ * 25
714
+ */
715
+ vat?: number;
716
+ /**
717
+ * The volume of one item in m³ (cubic meters)
718
+ *
719
+ */
720
+ unit_volume?: number;
721
+ /**
722
+ * The volume of one item in kg (kilo grams)
723
+ *
724
+ */
725
+ unit_weight?: number;
726
+ /**
727
+ * The dimensional weight (also known as volumetric) value unit of one item. [Dimensional weight at Wikipedia](https://en.wikipedia.org/wiki/Dimensional_weight)
728
+ *
729
+ */
730
+ unit_dimensional_weight?: number;
731
+ /**
732
+ * The item is eligible for discount
733
+ *
734
+ */
735
+ eligible_for_discount?: boolean;
736
+ /**
737
+ * Discount applied to amount
738
+ *
739
+ */
740
+ is_changed?: boolean;
741
+ /**
742
+ * The origin item amount before any discount
743
+ *
744
+ */
745
+ readonly gross_amount?: number;
746
+ discount_lines?: DiscountItem[];
747
+ }[];
748
+ /**
749
+ * The origin amount to authorize/capture including VAT
750
+ * before any discount, only set if the session was updated
751
+ * when calculating discounts.
752
+ *
753
+ */
754
+ readonly gross_amount?: number;
755
+ /**
756
+ * The original order amount was changed by discount
757
+ * given.
758
+ *
759
+ */
760
+ readonly is_changed?: boolean;
761
+ shipping_option?: ShippingOption;
762
+ store?: Store;
763
+ };
764
+ /**
765
+ * The session expiration time after which the
766
+ * Checkout page wouldn't be available
767
+ *
768
+ */
769
+ expires_at?: string;
770
+ /**
771
+ * ### Present only for _Express Checkout_ sessions.
772
+ *
773
+ * An _Express Checkout_ session is a session where the end user will submit a
774
+ * shipping address and then select a shipping option before the before a
775
+ * payment method is selected and the payment is initiated.
776
+ *
777
+ * Endpoints used in the _Express Checkout_ flow.
778
+ * 1. [Set shipping address](/#operation/checkout_sid_json_order_shipping_address_put)
779
+ * 2. [Set shipping option](/#operation/checkout_sid_json_order_items_shipping_option_put)
780
+ *
781
+ */
782
+ express?: {
783
+ /**
784
+ * URL that Checkout will POST to when the end user has submitted/changed
785
+ * a shipping address for an express-session.
786
+ *
787
+ * Dintero will not attempt a retry after a failed delivery attempt.
788
+ * Following situations is considered as failed delivery
789
+ *
790
+ * - HTTP status codes that are not 200.
791
+ * - A request timeout (60 seconds)
792
+ * - Any connection error such as connection timeout, bad certificate, etc
793
+ *
794
+ * The request body of the POST request will be the
795
+ * [ExpressSession]((https://docs.dintero.com/specs/spec-checkout.yml))
796
+ * json object, containing a shipping address.
797
+ *
798
+ * The expected response has status code 200 and the response body contains a json object with a list of [ShippingOptions](https://docs.dintero.com/specs/spec-checkout.yml) that will replace the _`shipping_options`_ in the express-session.
799
+ * If the merchant is not able to ship the order to the end users shipping address, return an object with an empty array of _`shipping_options`_.
800
+ *
801
+ * <strong><small>Example callback response body:</small></strong>
802
+ * <pre>
803
+ * {
804
+ * "shipping_options": [
805
+ * {
806
+ * "id": "bring-pick-up-00001",
807
+ * "line_id": "bring-pick-up-00001-location-0a1f6b",
808
+ * "country": "NO",
809
+ * "amount": 3900,
810
+ * "vat_amount": 975,
811
+ * "vat": 25,
812
+ * "title": "Standard",
813
+ * "description": "Pick up at your nearest postal office",
814
+ * "delivery_method": "pick_up",
815
+ * "operator": "Bring",
816
+ * "operator_product_id": "pick-up-00001-location-0a1f6b",
817
+ * "eta": {
818
+ * "relative": {
819
+ * "minutes_min": 0,
820
+ * "minutes_max": 0
821
+ * },
822
+ * "absolute": {
823
+ * "starts_at": "2020-10-14T19:00:00Z",
824
+ * "ends_at": "2020-10-14T20:00:00Z"
825
+ * }
826
+ * },
827
+ * "time_slot": {
828
+ * "starts_at": "2020-10-14T19:00:00Z",
829
+ * "ends_at": "2020-10-14T20:00:00Z"
830
+ * },
831
+ * "pick_up_address": {
832
+ * "first_name": "John",
833
+ * "last_name": "Doe",
834
+ * "address_line": "string",
835
+ * "address_line_2": "string",
836
+ * "co_address": "Land Lord",
837
+ * "business_name": "string",
838
+ * "postal_code": "O349",
839
+ * "postal_place": "Oslo",
840
+ * "country": "NO",
841
+ * "phone_number": "string",
842
+ * "email": "string",
843
+ * "latitude": 0,
844
+ * "longitude": 0,
845
+ * "comment": "string"
846
+ * }
847
+ * }
848
+ * ]
849
+ * }
850
+ * </pre>
851
+ *
852
+ * example:
853
+ * https://example.com/order/00128110/address_updated
854
+ */
855
+ shipping_address_callback_url?: string;
856
+ /**
857
+ * Shipping options that will be presented to the end user after the
858
+ * end user has submitted a shipping address.
859
+ *
860
+ * To dynamically update the shipping_options when the _`order.shipping_address`_ is
861
+ * changed by the end user in the checkout, use the
862
+ * _`url.shipping_address_callback_url`_.
863
+ *
864
+ * If the merchant is not able to ship the order to the end users shipping address, use an empty array.
865
+ *
866
+ * If there is only one option, a free delivery, the order still has to contain one option with a _`price.amount`_ of 0.
867
+ *
868
+ */
869
+ shipping_options: ShippingOption[];
870
+ };
871
+ configuration: {
872
+ /**
873
+ * If `true` the transaction from the payment session will be captured
874
+ * automatically after the transaction has been `AUTHORIZED`. The checkout
875
+ * sessions `callback_url` will not be called until after the transaction
876
+ * has been `CAPTURED`.
877
+ *
878
+ * If `auto_capture` is not specified it defaults to `false`.
879
+ *
880
+ * A successful auto-capture of a transaction sometimes requires more
881
+ * than one capture attempt. This can be the case if the payment gateway
882
+ * is down or is experiencing heavy traffic.
883
+ *
884
+ * Dintero will attempts capture retries for 48 hours, the `callback_url`
885
+ * will be invoked when capture succeeds.
886
+ *
887
+ * Manual capture of a transaction that is pending auto-capture will
888
+ * stop the auto-capture process from completing the capture.
889
+ *
890
+ */
891
+ auto_capture?: boolean;
892
+ publish?: PublishConfiguration;
893
+ /**
894
+ * Configure the default payment type, the selected payment when
895
+ * loading the checkout window. The value must be an enabled payment type.
896
+ *
897
+ */
898
+ default_payment_type?: "instabank.finance" | "instabank.invoice" | "vipps" | "payex.creditcard" | "payex.swish" | "collector.finance" | "collector.invoice" | "santander.debit_account";
899
+ instabank?: InstabankConfiguration;
900
+ payex?: PayExConfiguration;
901
+ vipps?: VippsConfiguration;
902
+ collector?: CollectorConfiguration;
903
+ santander?: SantanderConfiguration;
904
+ discounts?: {
905
+ readonly type?: "discounts";
906
+ /**
907
+ * Enable discount calculation on order
908
+ * items eligible for discount
909
+ *
910
+ * - A session that has the `customer.customer_id` set will have
911
+ * its discounts calculated when the session is created.
912
+ *
913
+ * - A session with no customer_id will only have the discounts
914
+ * calculated when the customer is identified by the checkout
915
+ * page.
916
+ *
917
+ * - The autorized amount will be the net amount from the
918
+ * original session amount specified when the session was
919
+ * created.
920
+ *
921
+ */
922
+ enabled: boolean;
923
+ };
924
+ };
925
+ /**
926
+ * The ID of the Checkout
927
+ */
928
+ id?: string;
929
+ /**
930
+ * Time when the Checkout was created
931
+ */
932
+ created_at?: string;
933
+ /**
934
+ * Last time when the Checkout was updated
935
+ */
936
+ transaction_id?: string;
937
+ }