dodopayments 2.43.0 → 2.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/checkout-sessions.d.mts +7 -0
  10. package/resources/checkout-sessions.d.mts.map +1 -1
  11. package/resources/checkout-sessions.d.ts +7 -0
  12. package/resources/checkout-sessions.d.ts.map +1 -1
  13. package/resources/index.d.mts +1 -1
  14. package/resources/index.d.mts.map +1 -1
  15. package/resources/index.d.ts +1 -1
  16. package/resources/index.d.ts.map +1 -1
  17. package/resources/index.js.map +1 -1
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/misc.d.mts +1 -1
  20. package/resources/misc.d.mts.map +1 -1
  21. package/resources/misc.d.ts +1 -1
  22. package/resources/misc.d.ts.map +1 -1
  23. package/resources/payments.d.mts +3 -47
  24. package/resources/payments.d.mts.map +1 -1
  25. package/resources/payments.d.ts +3 -47
  26. package/resources/payments.d.ts.map +1 -1
  27. package/resources/webhook-events.d.mts +69 -2
  28. package/resources/webhook-events.d.mts.map +1 -1
  29. package/resources/webhook-events.d.ts +69 -2
  30. package/resources/webhook-events.d.ts.map +1 -1
  31. package/resources/webhook-events.js.map +1 -1
  32. package/resources/webhook-events.mjs.map +1 -1
  33. package/resources/webhooks/index.d.mts +1 -1
  34. package/resources/webhooks/index.d.mts.map +1 -1
  35. package/resources/webhooks/index.d.ts +1 -1
  36. package/resources/webhooks/index.d.ts.map +1 -1
  37. package/resources/webhooks/index.js.map +1 -1
  38. package/resources/webhooks/index.mjs.map +1 -1
  39. package/resources/webhooks/webhooks.d.mts +824 -3
  40. package/resources/webhooks/webhooks.d.mts.map +1 -1
  41. package/resources/webhooks/webhooks.d.ts +824 -3
  42. package/resources/webhooks/webhooks.d.ts.map +1 -1
  43. package/resources/webhooks/webhooks.js.map +1 -1
  44. package/resources/webhooks/webhooks.mjs.map +1 -1
  45. package/src/client.ts +10 -0
  46. package/src/resources/checkout-sessions.ts +8 -0
  47. package/src/resources/index.ts +5 -0
  48. package/src/resources/misc.ts +1 -1
  49. package/src/resources/payments.ts +3 -82
  50. package/src/resources/webhook-events.ts +85 -1
  51. package/src/resources/webhooks/index.ts +5 -0
  52. package/src/resources/webhooks/webhooks.ts +1101 -75
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as DisputesAPI from "../disputes.mjs";
3
3
  import * as LicenseKeysAPI from "../license-keys.mjs";
4
+ import * as MiscAPI from "../misc.mjs";
4
5
  import * as PaymentsAPI from "../payments.mjs";
5
6
  import * as RefundsAPI from "../refunds.mjs";
6
7
  import * as SubscriptionsAPI from "../subscriptions.mjs";
@@ -714,6 +715,416 @@ export interface PaymentSucceededWebhookEvent {
714
715
  */
715
716
  type: 'payment.succeeded';
716
717
  }
718
+ export interface PayoutCreatedWebhookEvent {
719
+ /**
720
+ * The business identifier
721
+ */
722
+ business_id: string;
723
+ data: PayoutCreatedWebhookEvent.Data;
724
+ /**
725
+ * The timestamp of when the event occurred
726
+ */
727
+ timestamp: string;
728
+ /**
729
+ * The event type
730
+ */
731
+ type: 'payout.created';
732
+ }
733
+ export declare namespace PayoutCreatedWebhookEvent {
734
+ interface Data {
735
+ /**
736
+ * The total amount of the payout.
737
+ */
738
+ amount: number;
739
+ /**
740
+ * The unique identifier of the business associated with the payout.
741
+ */
742
+ business_id: string;
743
+ /**
744
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
745
+ * future release.
746
+ */
747
+ chargebacks: number;
748
+ /**
749
+ * The timestamp when the payout was created, in UTC.
750
+ */
751
+ created_at: string;
752
+ /**
753
+ * The currency of the payout, represented as an ISO 4217 currency code.
754
+ */
755
+ currency: MiscAPI.Currency;
756
+ /**
757
+ * The fee charged for processing the payout.
758
+ */
759
+ fee: number;
760
+ /**
761
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
762
+ */
763
+ payment_method: string;
764
+ /**
765
+ * The unique identifier of the payout.
766
+ */
767
+ payout_id: string;
768
+ /**
769
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
770
+ * future release.
771
+ */
772
+ refunds: number;
773
+ /**
774
+ * The current status of the payout.
775
+ */
776
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
777
+ /**
778
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
779
+ * future release.
780
+ */
781
+ tax: number;
782
+ /**
783
+ * The timestamp when the payout was last updated, in UTC.
784
+ */
785
+ updated_at: string;
786
+ /**
787
+ * The name of the payout recipient or purpose.
788
+ */
789
+ name?: string | null;
790
+ /**
791
+ * The URL of the document associated with the payout.
792
+ */
793
+ payout_document_url?: string | null;
794
+ /**
795
+ * Any additional remarks or notes associated with the payout.
796
+ */
797
+ remarks?: string | null;
798
+ }
799
+ }
800
+ export interface PayoutFailedWebhookEvent {
801
+ /**
802
+ * The business identifier
803
+ */
804
+ business_id: string;
805
+ data: PayoutFailedWebhookEvent.Data;
806
+ /**
807
+ * The timestamp of when the event occurred
808
+ */
809
+ timestamp: string;
810
+ /**
811
+ * The event type
812
+ */
813
+ type: 'payout.failed';
814
+ }
815
+ export declare namespace PayoutFailedWebhookEvent {
816
+ interface Data {
817
+ /**
818
+ * The total amount of the payout.
819
+ */
820
+ amount: number;
821
+ /**
822
+ * The unique identifier of the business associated with the payout.
823
+ */
824
+ business_id: string;
825
+ /**
826
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
827
+ * future release.
828
+ */
829
+ chargebacks: number;
830
+ /**
831
+ * The timestamp when the payout was created, in UTC.
832
+ */
833
+ created_at: string;
834
+ /**
835
+ * The currency of the payout, represented as an ISO 4217 currency code.
836
+ */
837
+ currency: MiscAPI.Currency;
838
+ /**
839
+ * The fee charged for processing the payout.
840
+ */
841
+ fee: number;
842
+ /**
843
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
844
+ */
845
+ payment_method: string;
846
+ /**
847
+ * The unique identifier of the payout.
848
+ */
849
+ payout_id: string;
850
+ /**
851
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
852
+ * future release.
853
+ */
854
+ refunds: number;
855
+ /**
856
+ * The current status of the payout.
857
+ */
858
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
859
+ /**
860
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
861
+ * future release.
862
+ */
863
+ tax: number;
864
+ /**
865
+ * The timestamp when the payout was last updated, in UTC.
866
+ */
867
+ updated_at: string;
868
+ /**
869
+ * The name of the payout recipient or purpose.
870
+ */
871
+ name?: string | null;
872
+ /**
873
+ * The URL of the document associated with the payout.
874
+ */
875
+ payout_document_url?: string | null;
876
+ /**
877
+ * Any additional remarks or notes associated with the payout.
878
+ */
879
+ remarks?: string | null;
880
+ }
881
+ }
882
+ export interface PayoutInProgressWebhookEvent {
883
+ /**
884
+ * The business identifier
885
+ */
886
+ business_id: string;
887
+ data: PayoutInProgressWebhookEvent.Data;
888
+ /**
889
+ * The timestamp of when the event occurred
890
+ */
891
+ timestamp: string;
892
+ /**
893
+ * The event type
894
+ */
895
+ type: 'payout.in_progress';
896
+ }
897
+ export declare namespace PayoutInProgressWebhookEvent {
898
+ interface Data {
899
+ /**
900
+ * The total amount of the payout.
901
+ */
902
+ amount: number;
903
+ /**
904
+ * The unique identifier of the business associated with the payout.
905
+ */
906
+ business_id: string;
907
+ /**
908
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
909
+ * future release.
910
+ */
911
+ chargebacks: number;
912
+ /**
913
+ * The timestamp when the payout was created, in UTC.
914
+ */
915
+ created_at: string;
916
+ /**
917
+ * The currency of the payout, represented as an ISO 4217 currency code.
918
+ */
919
+ currency: MiscAPI.Currency;
920
+ /**
921
+ * The fee charged for processing the payout.
922
+ */
923
+ fee: number;
924
+ /**
925
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
926
+ */
927
+ payment_method: string;
928
+ /**
929
+ * The unique identifier of the payout.
930
+ */
931
+ payout_id: string;
932
+ /**
933
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
934
+ * future release.
935
+ */
936
+ refunds: number;
937
+ /**
938
+ * The current status of the payout.
939
+ */
940
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
941
+ /**
942
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
943
+ * future release.
944
+ */
945
+ tax: number;
946
+ /**
947
+ * The timestamp when the payout was last updated, in UTC.
948
+ */
949
+ updated_at: string;
950
+ /**
951
+ * The name of the payout recipient or purpose.
952
+ */
953
+ name?: string | null;
954
+ /**
955
+ * The URL of the document associated with the payout.
956
+ */
957
+ payout_document_url?: string | null;
958
+ /**
959
+ * Any additional remarks or notes associated with the payout.
960
+ */
961
+ remarks?: string | null;
962
+ }
963
+ }
964
+ export interface PayoutOnHoldWebhookEvent {
965
+ /**
966
+ * The business identifier
967
+ */
968
+ business_id: string;
969
+ data: PayoutOnHoldWebhookEvent.Data;
970
+ /**
971
+ * The timestamp of when the event occurred
972
+ */
973
+ timestamp: string;
974
+ /**
975
+ * The event type
976
+ */
977
+ type: 'payout.on_hold';
978
+ }
979
+ export declare namespace PayoutOnHoldWebhookEvent {
980
+ interface Data {
981
+ /**
982
+ * The total amount of the payout.
983
+ */
984
+ amount: number;
985
+ /**
986
+ * The unique identifier of the business associated with the payout.
987
+ */
988
+ business_id: string;
989
+ /**
990
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
991
+ * future release.
992
+ */
993
+ chargebacks: number;
994
+ /**
995
+ * The timestamp when the payout was created, in UTC.
996
+ */
997
+ created_at: string;
998
+ /**
999
+ * The currency of the payout, represented as an ISO 4217 currency code.
1000
+ */
1001
+ currency: MiscAPI.Currency;
1002
+ /**
1003
+ * The fee charged for processing the payout.
1004
+ */
1005
+ fee: number;
1006
+ /**
1007
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
1008
+ */
1009
+ payment_method: string;
1010
+ /**
1011
+ * The unique identifier of the payout.
1012
+ */
1013
+ payout_id: string;
1014
+ /**
1015
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1016
+ * future release.
1017
+ */
1018
+ refunds: number;
1019
+ /**
1020
+ * The current status of the payout.
1021
+ */
1022
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
1023
+ /**
1024
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1025
+ * future release.
1026
+ */
1027
+ tax: number;
1028
+ /**
1029
+ * The timestamp when the payout was last updated, in UTC.
1030
+ */
1031
+ updated_at: string;
1032
+ /**
1033
+ * The name of the payout recipient or purpose.
1034
+ */
1035
+ name?: string | null;
1036
+ /**
1037
+ * The URL of the document associated with the payout.
1038
+ */
1039
+ payout_document_url?: string | null;
1040
+ /**
1041
+ * Any additional remarks or notes associated with the payout.
1042
+ */
1043
+ remarks?: string | null;
1044
+ }
1045
+ }
1046
+ export interface PayoutSuccessWebhookEvent {
1047
+ /**
1048
+ * The business identifier
1049
+ */
1050
+ business_id: string;
1051
+ data: PayoutSuccessWebhookEvent.Data;
1052
+ /**
1053
+ * The timestamp of when the event occurred
1054
+ */
1055
+ timestamp: string;
1056
+ /**
1057
+ * The event type
1058
+ */
1059
+ type: 'payout.success';
1060
+ }
1061
+ export declare namespace PayoutSuccessWebhookEvent {
1062
+ interface Data {
1063
+ /**
1064
+ * The total amount of the payout.
1065
+ */
1066
+ amount: number;
1067
+ /**
1068
+ * The unique identifier of the business associated with the payout.
1069
+ */
1070
+ business_id: string;
1071
+ /**
1072
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1073
+ * future release.
1074
+ */
1075
+ chargebacks: number;
1076
+ /**
1077
+ * The timestamp when the payout was created, in UTC.
1078
+ */
1079
+ created_at: string;
1080
+ /**
1081
+ * The currency of the payout, represented as an ISO 4217 currency code.
1082
+ */
1083
+ currency: MiscAPI.Currency;
1084
+ /**
1085
+ * The fee charged for processing the payout.
1086
+ */
1087
+ fee: number;
1088
+ /**
1089
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
1090
+ */
1091
+ payment_method: string;
1092
+ /**
1093
+ * The unique identifier of the payout.
1094
+ */
1095
+ payout_id: string;
1096
+ /**
1097
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1098
+ * future release.
1099
+ */
1100
+ refunds: number;
1101
+ /**
1102
+ * The current status of the payout.
1103
+ */
1104
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
1105
+ /**
1106
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1107
+ * future release.
1108
+ */
1109
+ tax: number;
1110
+ /**
1111
+ * The timestamp when the payout was last updated, in UTC.
1112
+ */
1113
+ updated_at: string;
1114
+ /**
1115
+ * The name of the payout recipient or purpose.
1116
+ */
1117
+ name?: string | null;
1118
+ /**
1119
+ * The URL of the document associated with the payout.
1120
+ */
1121
+ payout_document_url?: string | null;
1122
+ /**
1123
+ * Any additional remarks or notes associated with the payout.
1124
+ */
1125
+ remarks?: string | null;
1126
+ }
1127
+ }
717
1128
  export interface RefundFailedWebhookEvent {
718
1129
  /**
719
1130
  * The business identifier
@@ -1487,6 +1898,416 @@ export interface PaymentSucceededWebhookEvent {
1487
1898
  */
1488
1899
  type: 'payment.succeeded';
1489
1900
  }
1901
+ export interface PayoutCreatedWebhookEvent {
1902
+ /**
1903
+ * The business identifier
1904
+ */
1905
+ business_id: string;
1906
+ data: PayoutCreatedWebhookEvent.Data;
1907
+ /**
1908
+ * The timestamp of when the event occurred
1909
+ */
1910
+ timestamp: string;
1911
+ /**
1912
+ * The event type
1913
+ */
1914
+ type: 'payout.created';
1915
+ }
1916
+ export declare namespace PayoutCreatedWebhookEvent {
1917
+ interface Data {
1918
+ /**
1919
+ * The total amount of the payout.
1920
+ */
1921
+ amount: number;
1922
+ /**
1923
+ * The unique identifier of the business associated with the payout.
1924
+ */
1925
+ business_id: string;
1926
+ /**
1927
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1928
+ * future release.
1929
+ */
1930
+ chargebacks: number;
1931
+ /**
1932
+ * The timestamp when the payout was created, in UTC.
1933
+ */
1934
+ created_at: string;
1935
+ /**
1936
+ * The currency of the payout, represented as an ISO 4217 currency code.
1937
+ */
1938
+ currency: MiscAPI.Currency;
1939
+ /**
1940
+ * The fee charged for processing the payout.
1941
+ */
1942
+ fee: number;
1943
+ /**
1944
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
1945
+ */
1946
+ payment_method: string;
1947
+ /**
1948
+ * The unique identifier of the payout.
1949
+ */
1950
+ payout_id: string;
1951
+ /**
1952
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1953
+ * future release.
1954
+ */
1955
+ refunds: number;
1956
+ /**
1957
+ * The current status of the payout.
1958
+ */
1959
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
1960
+ /**
1961
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
1962
+ * future release.
1963
+ */
1964
+ tax: number;
1965
+ /**
1966
+ * The timestamp when the payout was last updated, in UTC.
1967
+ */
1968
+ updated_at: string;
1969
+ /**
1970
+ * The name of the payout recipient or purpose.
1971
+ */
1972
+ name?: string | null;
1973
+ /**
1974
+ * The URL of the document associated with the payout.
1975
+ */
1976
+ payout_document_url?: string | null;
1977
+ /**
1978
+ * Any additional remarks or notes associated with the payout.
1979
+ */
1980
+ remarks?: string | null;
1981
+ }
1982
+ }
1983
+ export interface PayoutFailedWebhookEvent {
1984
+ /**
1985
+ * The business identifier
1986
+ */
1987
+ business_id: string;
1988
+ data: PayoutFailedWebhookEvent.Data;
1989
+ /**
1990
+ * The timestamp of when the event occurred
1991
+ */
1992
+ timestamp: string;
1993
+ /**
1994
+ * The event type
1995
+ */
1996
+ type: 'payout.failed';
1997
+ }
1998
+ export declare namespace PayoutFailedWebhookEvent {
1999
+ interface Data {
2000
+ /**
2001
+ * The total amount of the payout.
2002
+ */
2003
+ amount: number;
2004
+ /**
2005
+ * The unique identifier of the business associated with the payout.
2006
+ */
2007
+ business_id: string;
2008
+ /**
2009
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2010
+ * future release.
2011
+ */
2012
+ chargebacks: number;
2013
+ /**
2014
+ * The timestamp when the payout was created, in UTC.
2015
+ */
2016
+ created_at: string;
2017
+ /**
2018
+ * The currency of the payout, represented as an ISO 4217 currency code.
2019
+ */
2020
+ currency: MiscAPI.Currency;
2021
+ /**
2022
+ * The fee charged for processing the payout.
2023
+ */
2024
+ fee: number;
2025
+ /**
2026
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
2027
+ */
2028
+ payment_method: string;
2029
+ /**
2030
+ * The unique identifier of the payout.
2031
+ */
2032
+ payout_id: string;
2033
+ /**
2034
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2035
+ * future release.
2036
+ */
2037
+ refunds: number;
2038
+ /**
2039
+ * The current status of the payout.
2040
+ */
2041
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
2042
+ /**
2043
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2044
+ * future release.
2045
+ */
2046
+ tax: number;
2047
+ /**
2048
+ * The timestamp when the payout was last updated, in UTC.
2049
+ */
2050
+ updated_at: string;
2051
+ /**
2052
+ * The name of the payout recipient or purpose.
2053
+ */
2054
+ name?: string | null;
2055
+ /**
2056
+ * The URL of the document associated with the payout.
2057
+ */
2058
+ payout_document_url?: string | null;
2059
+ /**
2060
+ * Any additional remarks or notes associated with the payout.
2061
+ */
2062
+ remarks?: string | null;
2063
+ }
2064
+ }
2065
+ export interface PayoutInProgressWebhookEvent {
2066
+ /**
2067
+ * The business identifier
2068
+ */
2069
+ business_id: string;
2070
+ data: PayoutInProgressWebhookEvent.Data;
2071
+ /**
2072
+ * The timestamp of when the event occurred
2073
+ */
2074
+ timestamp: string;
2075
+ /**
2076
+ * The event type
2077
+ */
2078
+ type: 'payout.in_progress';
2079
+ }
2080
+ export declare namespace PayoutInProgressWebhookEvent {
2081
+ interface Data {
2082
+ /**
2083
+ * The total amount of the payout.
2084
+ */
2085
+ amount: number;
2086
+ /**
2087
+ * The unique identifier of the business associated with the payout.
2088
+ */
2089
+ business_id: string;
2090
+ /**
2091
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2092
+ * future release.
2093
+ */
2094
+ chargebacks: number;
2095
+ /**
2096
+ * The timestamp when the payout was created, in UTC.
2097
+ */
2098
+ created_at: string;
2099
+ /**
2100
+ * The currency of the payout, represented as an ISO 4217 currency code.
2101
+ */
2102
+ currency: MiscAPI.Currency;
2103
+ /**
2104
+ * The fee charged for processing the payout.
2105
+ */
2106
+ fee: number;
2107
+ /**
2108
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
2109
+ */
2110
+ payment_method: string;
2111
+ /**
2112
+ * The unique identifier of the payout.
2113
+ */
2114
+ payout_id: string;
2115
+ /**
2116
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2117
+ * future release.
2118
+ */
2119
+ refunds: number;
2120
+ /**
2121
+ * The current status of the payout.
2122
+ */
2123
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
2124
+ /**
2125
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2126
+ * future release.
2127
+ */
2128
+ tax: number;
2129
+ /**
2130
+ * The timestamp when the payout was last updated, in UTC.
2131
+ */
2132
+ updated_at: string;
2133
+ /**
2134
+ * The name of the payout recipient or purpose.
2135
+ */
2136
+ name?: string | null;
2137
+ /**
2138
+ * The URL of the document associated with the payout.
2139
+ */
2140
+ payout_document_url?: string | null;
2141
+ /**
2142
+ * Any additional remarks or notes associated with the payout.
2143
+ */
2144
+ remarks?: string | null;
2145
+ }
2146
+ }
2147
+ export interface PayoutOnHoldWebhookEvent {
2148
+ /**
2149
+ * The business identifier
2150
+ */
2151
+ business_id: string;
2152
+ data: PayoutOnHoldWebhookEvent.Data;
2153
+ /**
2154
+ * The timestamp of when the event occurred
2155
+ */
2156
+ timestamp: string;
2157
+ /**
2158
+ * The event type
2159
+ */
2160
+ type: 'payout.on_hold';
2161
+ }
2162
+ export declare namespace PayoutOnHoldWebhookEvent {
2163
+ interface Data {
2164
+ /**
2165
+ * The total amount of the payout.
2166
+ */
2167
+ amount: number;
2168
+ /**
2169
+ * The unique identifier of the business associated with the payout.
2170
+ */
2171
+ business_id: string;
2172
+ /**
2173
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2174
+ * future release.
2175
+ */
2176
+ chargebacks: number;
2177
+ /**
2178
+ * The timestamp when the payout was created, in UTC.
2179
+ */
2180
+ created_at: string;
2181
+ /**
2182
+ * The currency of the payout, represented as an ISO 4217 currency code.
2183
+ */
2184
+ currency: MiscAPI.Currency;
2185
+ /**
2186
+ * The fee charged for processing the payout.
2187
+ */
2188
+ fee: number;
2189
+ /**
2190
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
2191
+ */
2192
+ payment_method: string;
2193
+ /**
2194
+ * The unique identifier of the payout.
2195
+ */
2196
+ payout_id: string;
2197
+ /**
2198
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2199
+ * future release.
2200
+ */
2201
+ refunds: number;
2202
+ /**
2203
+ * The current status of the payout.
2204
+ */
2205
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
2206
+ /**
2207
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2208
+ * future release.
2209
+ */
2210
+ tax: number;
2211
+ /**
2212
+ * The timestamp when the payout was last updated, in UTC.
2213
+ */
2214
+ updated_at: string;
2215
+ /**
2216
+ * The name of the payout recipient or purpose.
2217
+ */
2218
+ name?: string | null;
2219
+ /**
2220
+ * The URL of the document associated with the payout.
2221
+ */
2222
+ payout_document_url?: string | null;
2223
+ /**
2224
+ * Any additional remarks or notes associated with the payout.
2225
+ */
2226
+ remarks?: string | null;
2227
+ }
2228
+ }
2229
+ export interface PayoutSuccessWebhookEvent {
2230
+ /**
2231
+ * The business identifier
2232
+ */
2233
+ business_id: string;
2234
+ data: PayoutSuccessWebhookEvent.Data;
2235
+ /**
2236
+ * The timestamp of when the event occurred
2237
+ */
2238
+ timestamp: string;
2239
+ /**
2240
+ * The event type
2241
+ */
2242
+ type: 'payout.success';
2243
+ }
2244
+ export declare namespace PayoutSuccessWebhookEvent {
2245
+ interface Data {
2246
+ /**
2247
+ * The total amount of the payout.
2248
+ */
2249
+ amount: number;
2250
+ /**
2251
+ * The unique identifier of the business associated with the payout.
2252
+ */
2253
+ business_id: string;
2254
+ /**
2255
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2256
+ * future release.
2257
+ */
2258
+ chargebacks: number;
2259
+ /**
2260
+ * The timestamp when the payout was created, in UTC.
2261
+ */
2262
+ created_at: string;
2263
+ /**
2264
+ * The currency of the payout, represented as an ISO 4217 currency code.
2265
+ */
2266
+ currency: MiscAPI.Currency;
2267
+ /**
2268
+ * The fee charged for processing the payout.
2269
+ */
2270
+ fee: number;
2271
+ /**
2272
+ * The payment method used for the payout (e.g., bank transfer, card, etc.).
2273
+ */
2274
+ payment_method: string;
2275
+ /**
2276
+ * The unique identifier of the payout.
2277
+ */
2278
+ payout_id: string;
2279
+ /**
2280
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2281
+ * future release.
2282
+ */
2283
+ refunds: number;
2284
+ /**
2285
+ * The current status of the payout.
2286
+ */
2287
+ status: 'not_initiated' | 'in_progress' | 'on_hold' | 'failed' | 'success';
2288
+ /**
2289
+ * @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a
2290
+ * future release.
2291
+ */
2292
+ tax: number;
2293
+ /**
2294
+ * The timestamp when the payout was last updated, in UTC.
2295
+ */
2296
+ updated_at: string;
2297
+ /**
2298
+ * The name of the payout recipient or purpose.
2299
+ */
2300
+ name?: string | null;
2301
+ /**
2302
+ * The URL of the document associated with the payout.
2303
+ */
2304
+ payout_document_url?: string | null;
2305
+ /**
2306
+ * Any additional remarks or notes associated with the payout.
2307
+ */
2308
+ remarks?: string | null;
2309
+ }
2310
+ }
1490
2311
  export interface RefundFailedWebhookEvent {
1491
2312
  /**
1492
2313
  * The business identifier
@@ -1679,8 +2500,8 @@ export interface SubscriptionUpdatedWebhookEvent {
1679
2500
  */
1680
2501
  type: 'subscription.updated';
1681
2502
  }
1682
- export type UnsafeUnwrapWebhookEvent = AbandonedCheckoutDetectedWebhookEvent | AbandonedCheckoutRecoveredWebhookEvent | CreditAddedWebhookEvent | CreditBalanceLowWebhookEvent | CreditDeductedWebhookEvent | CreditExpiredWebhookEvent | CreditManualAdjustmentWebhookEvent | CreditOverageChargedWebhookEvent | CreditOverageResetWebhookEvent | CreditRolledOverWebhookEvent | CreditRolloverForfeitedWebhookEvent | DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | DunningRecoveredWebhookEvent | DunningStartedWebhookEvent | EntitlementGrantCreatedWebhookEvent | EntitlementGrantDeliveredWebhookEvent | EntitlementGrantFailedWebhookEvent | EntitlementGrantRevokedWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent | SubscriptionUpdatePaymentMethodWebhookEvent | SubscriptionUpdatedWebhookEvent;
1683
- export type UnwrapWebhookEvent = AbandonedCheckoutDetectedWebhookEvent | AbandonedCheckoutRecoveredWebhookEvent | CreditAddedWebhookEvent | CreditBalanceLowWebhookEvent | CreditDeductedWebhookEvent | CreditExpiredWebhookEvent | CreditManualAdjustmentWebhookEvent | CreditOverageChargedWebhookEvent | CreditOverageResetWebhookEvent | CreditRolledOverWebhookEvent | CreditRolloverForfeitedWebhookEvent | DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | DunningRecoveredWebhookEvent | DunningStartedWebhookEvent | EntitlementGrantCreatedWebhookEvent | EntitlementGrantDeliveredWebhookEvent | EntitlementGrantFailedWebhookEvent | EntitlementGrantRevokedWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent | SubscriptionUpdatePaymentMethodWebhookEvent | SubscriptionUpdatedWebhookEvent;
2503
+ export type UnsafeUnwrapWebhookEvent = AbandonedCheckoutDetectedWebhookEvent | AbandonedCheckoutRecoveredWebhookEvent | CreditAddedWebhookEvent | CreditBalanceLowWebhookEvent | CreditDeductedWebhookEvent | CreditExpiredWebhookEvent | CreditManualAdjustmentWebhookEvent | CreditOverageChargedWebhookEvent | CreditOverageResetWebhookEvent | CreditRolledOverWebhookEvent | CreditRolloverForfeitedWebhookEvent | DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | DunningRecoveredWebhookEvent | DunningStartedWebhookEvent | EntitlementGrantCreatedWebhookEvent | EntitlementGrantDeliveredWebhookEvent | EntitlementGrantFailedWebhookEvent | EntitlementGrantRevokedWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | PayoutCreatedWebhookEvent | PayoutFailedWebhookEvent | PayoutInProgressWebhookEvent | PayoutOnHoldWebhookEvent | PayoutSuccessWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent | SubscriptionUpdatePaymentMethodWebhookEvent | SubscriptionUpdatedWebhookEvent;
2504
+ export type UnwrapWebhookEvent = AbandonedCheckoutDetectedWebhookEvent | AbandonedCheckoutRecoveredWebhookEvent | CreditAddedWebhookEvent | CreditBalanceLowWebhookEvent | CreditDeductedWebhookEvent | CreditExpiredWebhookEvent | CreditManualAdjustmentWebhookEvent | CreditOverageChargedWebhookEvent | CreditOverageResetWebhookEvent | CreditRolledOverWebhookEvent | CreditRolloverForfeitedWebhookEvent | DisputeAcceptedWebhookEvent | DisputeCancelledWebhookEvent | DisputeChallengedWebhookEvent | DisputeExpiredWebhookEvent | DisputeLostWebhookEvent | DisputeOpenedWebhookEvent | DisputeWonWebhookEvent | DunningRecoveredWebhookEvent | DunningStartedWebhookEvent | EntitlementGrantCreatedWebhookEvent | EntitlementGrantDeliveredWebhookEvent | EntitlementGrantFailedWebhookEvent | EntitlementGrantRevokedWebhookEvent | LicenseKeyCreatedWebhookEvent | PaymentCancelledWebhookEvent | PaymentFailedWebhookEvent | PaymentProcessingWebhookEvent | PaymentSucceededWebhookEvent | PayoutCreatedWebhookEvent | PayoutFailedWebhookEvent | PayoutInProgressWebhookEvent | PayoutOnHoldWebhookEvent | PayoutSuccessWebhookEvent | RefundFailedWebhookEvent | RefundSucceededWebhookEvent | SubscriptionActiveWebhookEvent | SubscriptionCancelledWebhookEvent | SubscriptionExpiredWebhookEvent | SubscriptionFailedWebhookEvent | SubscriptionOnHoldWebhookEvent | SubscriptionPlanChangedWebhookEvent | SubscriptionRenewedWebhookEvent | SubscriptionUpdatePaymentMethodWebhookEvent | SubscriptionUpdatedWebhookEvent;
1684
2505
  export interface WebhookListParams extends CursorPagePaginationParams {
1685
2506
  }
1686
2507
  export interface WebhookCreateParams {
@@ -1750,7 +2571,7 @@ export interface WebhookUpdateParams {
1750
2571
  url?: string | null;
1751
2572
  }
1752
2573
  export declare namespace Webhooks {
1753
- export { type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, type AbandonedCheckoutDetectedWebhookEvent as AbandonedCheckoutDetectedWebhookEvent, type AbandonedCheckoutRecoveredWebhookEvent as AbandonedCheckoutRecoveredWebhookEvent, type CreditAddedWebhookEvent as CreditAddedWebhookEvent, type CreditBalanceLowWebhookEvent as CreditBalanceLowWebhookEvent, type CreditDeductedWebhookEvent as CreditDeductedWebhookEvent, type CreditExpiredWebhookEvent as CreditExpiredWebhookEvent, type CreditManualAdjustmentWebhookEvent as CreditManualAdjustmentWebhookEvent, type CreditOverageChargedWebhookEvent as CreditOverageChargedWebhookEvent, type CreditOverageResetWebhookEvent as CreditOverageResetWebhookEvent, type CreditRolledOverWebhookEvent as CreditRolledOverWebhookEvent, type CreditRolloverForfeitedWebhookEvent as CreditRolloverForfeitedWebhookEvent, type DisputeAcceptedWebhookEvent as DisputeAcceptedWebhookEvent, type DisputeCancelledWebhookEvent as DisputeCancelledWebhookEvent, type DisputeChallengedWebhookEvent as DisputeChallengedWebhookEvent, type DisputeExpiredWebhookEvent as DisputeExpiredWebhookEvent, type DisputeLostWebhookEvent as DisputeLostWebhookEvent, type DisputeOpenedWebhookEvent as DisputeOpenedWebhookEvent, type DisputeWonWebhookEvent as DisputeWonWebhookEvent, type DunningRecoveredWebhookEvent as DunningRecoveredWebhookEvent, type DunningStartedWebhookEvent as DunningStartedWebhookEvent, type EntitlementGrantCreatedWebhookEvent as EntitlementGrantCreatedWebhookEvent, type EntitlementGrantDeliveredWebhookEvent as EntitlementGrantDeliveredWebhookEvent, type EntitlementGrantFailedWebhookEvent as EntitlementGrantFailedWebhookEvent, type EntitlementGrantRevokedWebhookEvent as EntitlementGrantRevokedWebhookEvent, type LicenseKeyCreatedWebhookEvent as LicenseKeyCreatedWebhookEvent, type PaymentCancelledWebhookEvent as PaymentCancelledWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentProcessingWebhookEvent as PaymentProcessingWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type RefundFailedWebhookEvent as RefundFailedWebhookEvent, type RefundSucceededWebhookEvent as RefundSucceededWebhookEvent, type SubscriptionActiveWebhookEvent as SubscriptionActiveWebhookEvent, type SubscriptionCancelledWebhookEvent as SubscriptionCancelledWebhookEvent, type SubscriptionExpiredWebhookEvent as SubscriptionExpiredWebhookEvent, type SubscriptionFailedWebhookEvent as SubscriptionFailedWebhookEvent, type SubscriptionOnHoldWebhookEvent as SubscriptionOnHoldWebhookEvent, type SubscriptionPlanChangedWebhookEvent as SubscriptionPlanChangedWebhookEvent, type SubscriptionRenewedWebhookEvent as SubscriptionRenewedWebhookEvent, type SubscriptionUpdatePaymentMethodWebhookEvent as SubscriptionUpdatePaymentMethodWebhookEvent, type SubscriptionUpdatedWebhookEvent as SubscriptionUpdatedWebhookEvent, type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookListParams as WebhookListParams, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
2574
+ export { type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, type AbandonedCheckoutDetectedWebhookEvent as AbandonedCheckoutDetectedWebhookEvent, type AbandonedCheckoutRecoveredWebhookEvent as AbandonedCheckoutRecoveredWebhookEvent, type CreditAddedWebhookEvent as CreditAddedWebhookEvent, type CreditBalanceLowWebhookEvent as CreditBalanceLowWebhookEvent, type CreditDeductedWebhookEvent as CreditDeductedWebhookEvent, type CreditExpiredWebhookEvent as CreditExpiredWebhookEvent, type CreditManualAdjustmentWebhookEvent as CreditManualAdjustmentWebhookEvent, type CreditOverageChargedWebhookEvent as CreditOverageChargedWebhookEvent, type CreditOverageResetWebhookEvent as CreditOverageResetWebhookEvent, type CreditRolledOverWebhookEvent as CreditRolledOverWebhookEvent, type CreditRolloverForfeitedWebhookEvent as CreditRolloverForfeitedWebhookEvent, type DisputeAcceptedWebhookEvent as DisputeAcceptedWebhookEvent, type DisputeCancelledWebhookEvent as DisputeCancelledWebhookEvent, type DisputeChallengedWebhookEvent as DisputeChallengedWebhookEvent, type DisputeExpiredWebhookEvent as DisputeExpiredWebhookEvent, type DisputeLostWebhookEvent as DisputeLostWebhookEvent, type DisputeOpenedWebhookEvent as DisputeOpenedWebhookEvent, type DisputeWonWebhookEvent as DisputeWonWebhookEvent, type DunningRecoveredWebhookEvent as DunningRecoveredWebhookEvent, type DunningStartedWebhookEvent as DunningStartedWebhookEvent, type EntitlementGrantCreatedWebhookEvent as EntitlementGrantCreatedWebhookEvent, type EntitlementGrantDeliveredWebhookEvent as EntitlementGrantDeliveredWebhookEvent, type EntitlementGrantFailedWebhookEvent as EntitlementGrantFailedWebhookEvent, type EntitlementGrantRevokedWebhookEvent as EntitlementGrantRevokedWebhookEvent, type LicenseKeyCreatedWebhookEvent as LicenseKeyCreatedWebhookEvent, type PaymentCancelledWebhookEvent as PaymentCancelledWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentProcessingWebhookEvent as PaymentProcessingWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PayoutCreatedWebhookEvent as PayoutCreatedWebhookEvent, type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent, type PayoutInProgressWebhookEvent as PayoutInProgressWebhookEvent, type PayoutOnHoldWebhookEvent as PayoutOnHoldWebhookEvent, type PayoutSuccessWebhookEvent as PayoutSuccessWebhookEvent, type RefundFailedWebhookEvent as RefundFailedWebhookEvent, type RefundSucceededWebhookEvent as RefundSucceededWebhookEvent, type SubscriptionActiveWebhookEvent as SubscriptionActiveWebhookEvent, type SubscriptionCancelledWebhookEvent as SubscriptionCancelledWebhookEvent, type SubscriptionExpiredWebhookEvent as SubscriptionExpiredWebhookEvent, type SubscriptionFailedWebhookEvent as SubscriptionFailedWebhookEvent, type SubscriptionOnHoldWebhookEvent as SubscriptionOnHoldWebhookEvent, type SubscriptionPlanChangedWebhookEvent as SubscriptionPlanChangedWebhookEvent, type SubscriptionRenewedWebhookEvent as SubscriptionRenewedWebhookEvent, type SubscriptionUpdatePaymentMethodWebhookEvent as SubscriptionUpdatePaymentMethodWebhookEvent, type SubscriptionUpdatedWebhookEvent as SubscriptionUpdatedWebhookEvent, type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookListParams as WebhookListParams, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
1754
2575
  export { Headers as Headers, type HeaderRetrieveResponse as HeaderRetrieveResponse, type HeaderUpdateParams as HeaderUpdateParams, };
1755
2576
  }
1756
2577
  //# sourceMappingURL=webhooks.d.mts.map