/
checkout_session.go
2792 lines (2532 loc) · 209 KB
/
checkout_session.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
//
// File generated from our OpenAPI spec
//
//
package stripe
// Type of the account referenced.
type CheckoutSessionAutomaticTaxLiabilityType string
// List of values that CheckoutSessionAutomaticTaxLiabilityType can take
const (
CheckoutSessionAutomaticTaxLiabilityTypeAccount CheckoutSessionAutomaticTaxLiabilityType = "account"
CheckoutSessionAutomaticTaxLiabilityTypeSelf CheckoutSessionAutomaticTaxLiabilityType = "self"
)
// The status of the most recent automated tax calculation for this session.
type CheckoutSessionAutomaticTaxStatus string
// List of values that CheckoutSessionAutomaticTaxStatus can take
const (
CheckoutSessionAutomaticTaxStatusComplete CheckoutSessionAutomaticTaxStatus = "complete"
CheckoutSessionAutomaticTaxStatusFailed CheckoutSessionAutomaticTaxStatus = "failed"
CheckoutSessionAutomaticTaxStatusRequiresLocationInputs CheckoutSessionAutomaticTaxStatus = "requires_location_inputs"
)
// Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
type CheckoutSessionBillingAddressCollection string
// List of values that CheckoutSessionBillingAddressCollection can take
const (
CheckoutSessionBillingAddressCollectionAuto CheckoutSessionBillingAddressCollection = "auto"
CheckoutSessionBillingAddressCollectionRequired CheckoutSessionBillingAddressCollection = "required"
)
// If `opt_in`, the customer consents to receiving promotional communications
// from the merchant about this Checkout Session.
type CheckoutSessionConsentPromotions string
// List of values that CheckoutSessionConsentPromotions can take
const (
CheckoutSessionConsentPromotionsOptIn CheckoutSessionConsentPromotions = "opt_in"
CheckoutSessionConsentPromotionsOptOut CheckoutSessionConsentPromotions = "opt_out"
)
// If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
type CheckoutSessionConsentTermsOfService string
// List of values that CheckoutSessionConsentTermsOfService can take
const (
CheckoutSessionConsentTermsOfServiceAccepted CheckoutSessionConsentTermsOfService = "accepted"
)
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
//
// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string
// List of values that CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition can take
const (
CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)
// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
type CheckoutSessionConsentCollectionPromotions string
// List of values that CheckoutSessionConsentCollectionPromotions can take
const (
CheckoutSessionConsentCollectionPromotionsAuto CheckoutSessionConsentCollectionPromotions = "auto"
CheckoutSessionConsentCollectionPromotionsNone CheckoutSessionConsentCollectionPromotions = "none"
)
// If set to `required`, it requires customers to accept the terms of service before being able to pay.
type CheckoutSessionConsentCollectionTermsOfService string
// List of values that CheckoutSessionConsentCollectionTermsOfService can take
const (
CheckoutSessionConsentCollectionTermsOfServiceNone CheckoutSessionConsentCollectionTermsOfService = "none"
CheckoutSessionConsentCollectionTermsOfServiceRequired CheckoutSessionConsentCollectionTermsOfService = "required"
)
// The type of the label.
type CheckoutSessionCustomFieldLabelType string
// List of values that CheckoutSessionCustomFieldLabelType can take
const (
CheckoutSessionCustomFieldLabelTypeCustom CheckoutSessionCustomFieldLabelType = "custom"
)
// The type of the field.
type CheckoutSessionCustomFieldType string
// List of values that CheckoutSessionCustomFieldType can take
const (
CheckoutSessionCustomFieldTypeDropdown CheckoutSessionCustomFieldType = "dropdown"
CheckoutSessionCustomFieldTypeNumeric CheckoutSessionCustomFieldType = "numeric"
CheckoutSessionCustomFieldTypeText CheckoutSessionCustomFieldType = "text"
)
// Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
type CheckoutSessionCustomerCreation string
// List of values that CheckoutSessionCustomerCreation can take
const (
CheckoutSessionCustomerCreationAlways CheckoutSessionCustomerCreation = "always"
CheckoutSessionCustomerCreationIfRequired CheckoutSessionCustomerCreation = "if_required"
)
// The customer's tax exempt status after a completed Checkout Session.
type CheckoutSessionCustomerDetailsTaxExempt string
// List of values that CheckoutSessionCustomerDetailsTaxExempt can take
const (
CheckoutSessionCustomerDetailsTaxExemptExempt CheckoutSessionCustomerDetailsTaxExempt = "exempt"
CheckoutSessionCustomerDetailsTaxExemptNone CheckoutSessionCustomerDetailsTaxExempt = "none"
CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse"
)
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`
type CheckoutSessionCustomerDetailsTaxIDType string
// List of values that CheckoutSessionCustomerDetailsTaxIDType can take
const (
CheckoutSessionCustomerDetailsTaxIDTypeADNRT CheckoutSessionCustomerDetailsTaxIDType = "ad_nrt"
CheckoutSessionCustomerDetailsTaxIDTypeAETRN CheckoutSessionCustomerDetailsTaxIDType = "ae_trn"
CheckoutSessionCustomerDetailsTaxIDTypeARCUIT CheckoutSessionCustomerDetailsTaxIDType = "ar_cuit"
CheckoutSessionCustomerDetailsTaxIDTypeAUABN CheckoutSessionCustomerDetailsTaxIDType = "au_abn"
CheckoutSessionCustomerDetailsTaxIDTypeAUARN CheckoutSessionCustomerDetailsTaxIDType = "au_arn"
CheckoutSessionCustomerDetailsTaxIDTypeBGUIC CheckoutSessionCustomerDetailsTaxIDType = "bg_uic"
CheckoutSessionCustomerDetailsTaxIDTypeBOTIN CheckoutSessionCustomerDetailsTaxIDType = "bo_tin"
CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj"
CheckoutSessionCustomerDetailsTaxIDTypeBRCPF CheckoutSessionCustomerDetailsTaxIDType = "br_cpf"
CheckoutSessionCustomerDetailsTaxIDTypeCABN CheckoutSessionCustomerDetailsTaxIDType = "ca_bn"
CheckoutSessionCustomerDetailsTaxIDTypeCAGSTHST CheckoutSessionCustomerDetailsTaxIDType = "ca_gst_hst"
CheckoutSessionCustomerDetailsTaxIDTypeCAPSTBC CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_bc"
CheckoutSessionCustomerDetailsTaxIDTypeCAPSTMB CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_mb"
CheckoutSessionCustomerDetailsTaxIDTypeCAPSTSK CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_sk"
CheckoutSessionCustomerDetailsTaxIDTypeCAQST CheckoutSessionCustomerDetailsTaxIDType = "ca_qst"
CheckoutSessionCustomerDetailsTaxIDTypeCHVAT CheckoutSessionCustomerDetailsTaxIDType = "ch_vat"
CheckoutSessionCustomerDetailsTaxIDTypeCLTIN CheckoutSessionCustomerDetailsTaxIDType = "cl_tin"
CheckoutSessionCustomerDetailsTaxIDTypeCNTIN CheckoutSessionCustomerDetailsTaxIDType = "cn_tin"
CheckoutSessionCustomerDetailsTaxIDTypeCONIT CheckoutSessionCustomerDetailsTaxIDType = "co_nit"
CheckoutSessionCustomerDetailsTaxIDTypeCRTIN CheckoutSessionCustomerDetailsTaxIDType = "cr_tin"
CheckoutSessionCustomerDetailsTaxIDTypeDORCN CheckoutSessionCustomerDetailsTaxIDType = "do_rcn"
CheckoutSessionCustomerDetailsTaxIDTypeECRUC CheckoutSessionCustomerDetailsTaxIDType = "ec_ruc"
CheckoutSessionCustomerDetailsTaxIDTypeEGTIN CheckoutSessionCustomerDetailsTaxIDType = "eg_tin"
CheckoutSessionCustomerDetailsTaxIDTypeESCIF CheckoutSessionCustomerDetailsTaxIDType = "es_cif"
CheckoutSessionCustomerDetailsTaxIDTypeEUOSSVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_oss_vat"
CheckoutSessionCustomerDetailsTaxIDTypeEUVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_vat"
CheckoutSessionCustomerDetailsTaxIDTypeGBVAT CheckoutSessionCustomerDetailsTaxIDType = "gb_vat"
CheckoutSessionCustomerDetailsTaxIDTypeGEVAT CheckoutSessionCustomerDetailsTaxIDType = "ge_vat"
CheckoutSessionCustomerDetailsTaxIDTypeHKBR CheckoutSessionCustomerDetailsTaxIDType = "hk_br"
CheckoutSessionCustomerDetailsTaxIDTypeHUTIN CheckoutSessionCustomerDetailsTaxIDType = "hu_tin"
CheckoutSessionCustomerDetailsTaxIDTypeIDNPWP CheckoutSessionCustomerDetailsTaxIDType = "id_npwp"
CheckoutSessionCustomerDetailsTaxIDTypeILVAT CheckoutSessionCustomerDetailsTaxIDType = "il_vat"
CheckoutSessionCustomerDetailsTaxIDTypeINGST CheckoutSessionCustomerDetailsTaxIDType = "in_gst"
CheckoutSessionCustomerDetailsTaxIDTypeISVAT CheckoutSessionCustomerDetailsTaxIDType = "is_vat"
CheckoutSessionCustomerDetailsTaxIDTypeJPCN CheckoutSessionCustomerDetailsTaxIDType = "jp_cn"
CheckoutSessionCustomerDetailsTaxIDTypeJPRN CheckoutSessionCustomerDetailsTaxIDType = "jp_rn"
CheckoutSessionCustomerDetailsTaxIDTypeJPTRN CheckoutSessionCustomerDetailsTaxIDType = "jp_trn"
CheckoutSessionCustomerDetailsTaxIDTypeKEPIN CheckoutSessionCustomerDetailsTaxIDType = "ke_pin"
CheckoutSessionCustomerDetailsTaxIDTypeKRBRN CheckoutSessionCustomerDetailsTaxIDType = "kr_brn"
CheckoutSessionCustomerDetailsTaxIDTypeLIUID CheckoutSessionCustomerDetailsTaxIDType = "li_uid"
CheckoutSessionCustomerDetailsTaxIDTypeMXRFC CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc"
CheckoutSessionCustomerDetailsTaxIDTypeMYFRP CheckoutSessionCustomerDetailsTaxIDType = "my_frp"
CheckoutSessionCustomerDetailsTaxIDTypeMYITN CheckoutSessionCustomerDetailsTaxIDType = "my_itn"
CheckoutSessionCustomerDetailsTaxIDTypeMYSST CheckoutSessionCustomerDetailsTaxIDType = "my_sst"
CheckoutSessionCustomerDetailsTaxIDTypeNOVAT CheckoutSessionCustomerDetailsTaxIDType = "no_vat"
CheckoutSessionCustomerDetailsTaxIDTypeNOVOEC CheckoutSessionCustomerDetailsTaxIDType = "no_voec"
CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst"
CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc"
CheckoutSessionCustomerDetailsTaxIDTypePHTIN CheckoutSessionCustomerDetailsTaxIDType = "ph_tin"
CheckoutSessionCustomerDetailsTaxIDTypeROTIN CheckoutSessionCustomerDetailsTaxIDType = "ro_tin"
CheckoutSessionCustomerDetailsTaxIDTypeRSPIB CheckoutSessionCustomerDetailsTaxIDType = "rs_pib"
CheckoutSessionCustomerDetailsTaxIDTypeRUINN CheckoutSessionCustomerDetailsTaxIDType = "ru_inn"
CheckoutSessionCustomerDetailsTaxIDTypeRUKPP CheckoutSessionCustomerDetailsTaxIDType = "ru_kpp"
CheckoutSessionCustomerDetailsTaxIDTypeSAVAT CheckoutSessionCustomerDetailsTaxIDType = "sa_vat"
CheckoutSessionCustomerDetailsTaxIDTypeSGGST CheckoutSessionCustomerDetailsTaxIDType = "sg_gst"
CheckoutSessionCustomerDetailsTaxIDTypeSGUEN CheckoutSessionCustomerDetailsTaxIDType = "sg_uen"
CheckoutSessionCustomerDetailsTaxIDTypeSITIN CheckoutSessionCustomerDetailsTaxIDType = "si_tin"
CheckoutSessionCustomerDetailsTaxIDTypeSVNIT CheckoutSessionCustomerDetailsTaxIDType = "sv_nit"
CheckoutSessionCustomerDetailsTaxIDTypeTHVAT CheckoutSessionCustomerDetailsTaxIDType = "th_vat"
CheckoutSessionCustomerDetailsTaxIDTypeTRTIN CheckoutSessionCustomerDetailsTaxIDType = "tr_tin"
CheckoutSessionCustomerDetailsTaxIDTypeTWVAT CheckoutSessionCustomerDetailsTaxIDType = "tw_vat"
CheckoutSessionCustomerDetailsTaxIDTypeUAVAT CheckoutSessionCustomerDetailsTaxIDType = "ua_vat"
CheckoutSessionCustomerDetailsTaxIDTypeUnknown CheckoutSessionCustomerDetailsTaxIDType = "unknown"
CheckoutSessionCustomerDetailsTaxIDTypeUSEIN CheckoutSessionCustomerDetailsTaxIDType = "us_ein"
CheckoutSessionCustomerDetailsTaxIDTypeUYRUC CheckoutSessionCustomerDetailsTaxIDType = "uy_ruc"
CheckoutSessionCustomerDetailsTaxIDTypeVERIF CheckoutSessionCustomerDetailsTaxIDType = "ve_rif"
CheckoutSessionCustomerDetailsTaxIDTypeVNTIN CheckoutSessionCustomerDetailsTaxIDType = "vn_tin"
CheckoutSessionCustomerDetailsTaxIDTypeZAVAT CheckoutSessionCustomerDetailsTaxIDType = "za_vat"
)
// Type of the account referenced.
type CheckoutSessionInvoiceCreationInvoiceDataIssuerType string
// List of values that CheckoutSessionInvoiceCreationInvoiceDataIssuerType can take
const (
CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeAccount CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "account"
CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeSelf CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "self"
)
// The mode of the Checkout Session.
type CheckoutSessionMode string
// List of values that CheckoutSessionMode can take
const (
CheckoutSessionModePayment CheckoutSessionMode = "payment"
CheckoutSessionModeSetup CheckoutSessionMode = "setup"
CheckoutSessionModeSubscription CheckoutSessionMode = "subscription"
)
// Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
type CheckoutSessionPaymentMethodCollection string
// List of values that CheckoutSessionPaymentMethodCollection can take
const (
CheckoutSessionPaymentMethodCollectionAlways CheckoutSessionPaymentMethodCollection = "always"
CheckoutSessionPaymentMethodCollectionIfRequired CheckoutSessionPaymentMethodCollection = "if_required"
)
// List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string
// List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take
const (
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice"
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription"
)
// Payment schedule for the mandate.
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string
// List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take
const (
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined"
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval"
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic"
)
// Transaction type of the mandate.
type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
// List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
const (
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "on_session"
)
// Bank account verification method.
type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod string
// List of values that CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod can take
const (
CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodAutomatic CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodInstant CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "on_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "on_session"
)
// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
type CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure string
// List of values that CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure can take
const (
CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureAny CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "any"
CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureAutomatic CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureChallenge CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "challenge"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "on_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage = "none"
)
// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
//
// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType string
// List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType can take
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeABA CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "aba"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSwift CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "swift"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeZengin CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "zengin"
)
// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType string
// List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType can take
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer"
CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeUSBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "us_bank_transfer"
)
// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType string
// List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType can take
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "on_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "off_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsP24SetupFutureUsageNone CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage = "none"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)
// Controls when the funds will be captured from the customer's account.
type CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod string
// List of values that CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod can take
const (
CheckoutSessionPaymentMethodOptionsPaypalCaptureMethodManual CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod = "manual"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "off_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage = "none"
)
// The list of permissions to request. The `payment_method` permission must be included.
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership"
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)
// Data features requested to be retrieved upon account creation.
type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions"
)
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage string
// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "off_session"
CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "on_session"
)
// Bank account verification method.
type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod string
// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod can take
const (
CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodInstant CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
)
// The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
// You can use this value to decide when to fulfill your customer's order.
type CheckoutSessionPaymentStatus string
// List of values that CheckoutSessionPaymentStatus can take
const (
CheckoutSessionPaymentStatusNoPaymentRequired CheckoutSessionPaymentStatus = "no_payment_required"
CheckoutSessionPaymentStatusPaid CheckoutSessionPaymentStatus = "paid"
CheckoutSessionPaymentStatusUnpaid CheckoutSessionPaymentStatus = "unpaid"
)
// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
type CheckoutSessionRedirectOnCompletion string
// List of values that CheckoutSessionRedirectOnCompletion can take
const (
CheckoutSessionRedirectOnCompletionAlways CheckoutSessionRedirectOnCompletion = "always"
CheckoutSessionRedirectOnCompletionIfRequired CheckoutSessionRedirectOnCompletion = "if_required"
CheckoutSessionRedirectOnCompletionNever CheckoutSessionRedirectOnCompletion = "never"
)
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
type CheckoutSessionShippingCostTaxTaxabilityReason string
// List of values that CheckoutSessionShippingCostTaxTaxabilityReason can take
const (
CheckoutSessionShippingCostTaxTaxabilityReasonCustomerExempt CheckoutSessionShippingCostTaxTaxabilityReason = "customer_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonNotCollecting CheckoutSessionShippingCostTaxTaxabilityReason = "not_collecting"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSubjectToTax CheckoutSessionShippingCostTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionShippingCostTaxTaxabilityReasonNotSupported CheckoutSessionShippingCostTaxTaxabilityReason = "not_supported"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonPortionStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt"
CheckoutSessionShippingCostTaxTaxabilityReasonProductExemptHoliday CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionShippingCostTaxTaxabilityReasonProportionallyRated CheckoutSessionShippingCostTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReducedRated CheckoutSessionShippingCostTaxTaxabilityReason = "reduced_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonReverseCharge CheckoutSessionShippingCostTaxTaxabilityReason = "reverse_charge"
CheckoutSessionShippingCostTaxTaxabilityReasonStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "standard_rated"
CheckoutSessionShippingCostTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionShippingCostTaxTaxabilityReasonZeroRated CheckoutSessionShippingCostTaxTaxabilityReason = "zero_rated"
)
// The status of the Checkout Session, one of `open`, `complete`, or `expired`.
type CheckoutSessionStatus string
// List of values that CheckoutSessionStatus can take
const (
CheckoutSessionStatusComplete CheckoutSessionStatus = "complete"
CheckoutSessionStatusExpired CheckoutSessionStatus = "expired"
CheckoutSessionStatusOpen CheckoutSessionStatus = "open"
)
// Describes the type of transaction being performed by Checkout in order to customize
// relevant text on the page, such as the submit button. `submit_type` can only be
// specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
type CheckoutSessionSubmitType string
// List of values that CheckoutSessionSubmitType can take
const (
CheckoutSessionSubmitTypeAuto CheckoutSessionSubmitType = "auto"
CheckoutSessionSubmitTypeBook CheckoutSessionSubmitType = "book"
CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate"
CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay"
)
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason string
// List of values that CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason can take
const (
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSupported CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_supported"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReducedRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced"
CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated"
)
// The UI mode of the Session. Defaults to `hosted`.
type CheckoutSessionUIMode string
// List of values that CheckoutSessionUIMode can take
const (
CheckoutSessionUIModeEmbedded CheckoutSessionUIMode = "embedded"
CheckoutSessionUIModeHosted CheckoutSessionUIMode = "hosted"
)
// Only return the Checkout Sessions for the Customer details specified.
type CheckoutSessionListCustomerDetailsParams struct {
// Customer's email address.
Email *string `form:"email"`
}
// Returns a list of Checkout Sessions.
type CheckoutSessionListParams struct {
ListParams `form:"*"`
// Only return Checkout Sessions that were created during the given date interval.
Created *int64 `form:"created"`
// Only return Checkout Sessions that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Only return the Checkout Sessions for the Customer specified.
Customer *string `form:"customer"`
// Only return the Checkout Sessions for the Customer details specified.
CustomerDetails *CheckoutSessionListCustomerDetailsParams `form:"customer_details"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// Only return the Checkout Session for the PaymentIntent specified.
PaymentIntent *string `form:"payment_intent"`
// Only return the Checkout Sessions for the Payment Link specified.
PaymentLink *string `form:"payment_link"`
// Only return the Checkout Sessions matching the given status.
Status *string `form:"status"`
// Only return the Checkout Session for the subscription specified.
Subscription *string `form:"subscription"`
}
// AddExpand appends a new field to expand.
func (p *CheckoutSessionListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
// Configure a Checkout Session that can be used to recover an expired session.
type CheckoutSessionAfterExpirationRecoveryParams struct {
// Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
AllowPromotionCodes *bool `form:"allow_promotion_codes"`
// If `true`, a recovery URL will be generated to recover this Checkout Session if it
// expires before a successful transaction is completed. It will be attached to the
// Checkout Session object upon expiration.
Enabled *bool `form:"enabled"`
}
// Configure actions after a Checkout Session has expired.
type CheckoutSessionAfterExpirationParams struct {
// Configure a Checkout Session that can be used to recover an expired session.
Recovery *CheckoutSessionAfterExpirationRecoveryParams `form:"recovery"`
}
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
type CheckoutSessionAutomaticTaxLiabilityParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}
// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
type CheckoutSessionAutomaticTaxParams struct {
// Set to true to enable automatic taxes.
Enabled *bool `form:"enabled"`
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
Liability *CheckoutSessionAutomaticTaxLiabilityParams `form:"liability"`
}
// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams struct {
// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
// defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
Position *string `form:"position"`
}
// Configure fields for the Checkout Session to gather active consent from customers.
type CheckoutSessionConsentCollectionParams struct {
// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"`
// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
// Session will determine whether to display an option to opt into promotional communication
// from the merchant depending on the customer's locale. Only available to US merchants.
Promotions *string `form:"promotions"`
// If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
// There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
TermsOfService *string `form:"terms_of_service"`
}
// The options available for the customer to select. Up to 200 options allowed.
type CheckoutSessionCustomFieldDropdownOptionParams struct {
// The label for the option, displayed to the customer. Up to 100 characters.
Label *string `form:"label"`
// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
Value *string `form:"value"`
}
// Configuration for `type=dropdown` fields.
type CheckoutSessionCustomFieldDropdownParams struct {
// The options available for the customer to select. Up to 200 options allowed.
Options []*CheckoutSessionCustomFieldDropdownOptionParams `form:"options"`
}
// The label for the field, displayed to the customer.
type CheckoutSessionCustomFieldLabelParams struct {
// Custom text for the label, displayed to the customer. Up to 50 characters.
Custom *string `form:"custom"`
// The type of the label.
Type *string `form:"type"`
}
// Configuration for `type=numeric` fields.
type CheckoutSessionCustomFieldNumericParams struct {
// The maximum character length constraint for the customer's input.
MaximumLength *int64 `form:"maximum_length"`
// The minimum character length requirement for the customer's input.
MinimumLength *int64 `form:"minimum_length"`
}
// Configuration for `type=text` fields.
type CheckoutSessionCustomFieldTextParams struct {
// The maximum character length constraint for the customer's input.
MaximumLength *int64 `form:"maximum_length"`
// The minimum character length requirement for the customer's input.
MinimumLength *int64 `form:"minimum_length"`
}
// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
type CheckoutSessionCustomFieldParams struct {
// Configuration for `type=dropdown` fields.
Dropdown *CheckoutSessionCustomFieldDropdownParams `form:"dropdown"`
// String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
Key *string `form:"key"`
// The label for the field, displayed to the customer.
Label *CheckoutSessionCustomFieldLabelParams `form:"label"`
// Configuration for `type=numeric` fields.
Numeric *CheckoutSessionCustomFieldNumericParams `form:"numeric"`
// Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
Optional *bool `form:"optional"`
// Configuration for `type=text` fields.
Text *CheckoutSessionCustomFieldTextParams `form:"text"`
// The type of the field.
Type *string `form:"type"`
}
// Custom text that should be displayed after the payment confirmation button.
type CheckoutSessionCustomTextAfterSubmitParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}
// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddressParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}
// Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmitParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}
// Custom text that should be displayed in place of the default terms of service agreement text.
type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}
// Display additional text for your customers using custom text.
type CheckoutSessionCustomTextParams struct {
// Custom text that should be displayed after the payment confirmation button.
AfterSubmit *CheckoutSessionCustomTextAfterSubmitParams `form:"after_submit"`
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Submit *CheckoutSessionCustomTextSubmitParams `form:"submit"`
// Custom text that should be displayed in place of the default terms of service agreement text.
TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
}
// Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
type CheckoutSessionCustomerUpdateParams struct {
// Describes whether Checkout saves the billing address onto `customer.address`.
// To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
Address *string `form:"address"`
// Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
Name *string `form:"name"`
// Describes whether Checkout saves shipping information onto `customer.shipping`.
// To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
Shipping *string `form:"shipping"`
}
// The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
type CheckoutSessionDiscountParams struct {
// The ID of the coupon to apply to this Session.
Coupon *string `form:"coupon"`
// The ID of a promotion code to apply to this Session.
PromotionCode *string `form:"promotion_code"`
}
// Default custom fields to be displayed on invoices for this customer.
type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams struct {
// The name of the custom field. This may be up to 40 characters.
Name *string `form:"name"`
// The value of the custom field. This may be up to 140 characters.
Value *string `form:"value"`
}
// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
type CheckoutSessionInvoiceCreationInvoiceDataIssuerParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}
// Default options for invoice PDF rendering for this customer.
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
AmountTaxDisplay *string `form:"amount_tax_display"`
}
// Parameters passed when creating invoices for payment-mode Checkout Sessions.
type CheckoutSessionInvoiceCreationInvoiceDataParams struct {
// The account tax IDs associated with the invoice.
AccountTaxIDs []*string `form:"account_tax_ids"`
// Default custom fields to be displayed on invoices for this customer.
CustomFields []*CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams `form:"custom_fields"`
// An arbitrary string attached to the object. Often useful for displaying to users.
Description *string `form:"description"`
// Default footer to be displayed on invoices for this customer.