@whop/sdk 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/checkout-configurations.d.mts +16 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +16 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/courses.d.mts +33 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +33 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/experiences.d.mts +12 -0
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +12 -0
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +179 -0
- package/resources/fee-markups.d.mts.map +1 -0
- package/resources/fee-markups.d.ts +179 -0
- package/resources/fee-markups.d.ts.map +1 -0
- package/resources/fee-markups.js +64 -0
- package/resources/fee-markups.js.map +1 -0
- package/resources/fee-markups.mjs +60 -0
- package/resources/fee-markups.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payment-methods.d.mts +202 -54
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +202 -54
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payments.d.mts +55 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +55 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +78 -0
- package/resources/payout-methods.d.mts.map +1 -0
- package/resources/payout-methods.d.ts +78 -0
- package/resources/payout-methods.d.ts.map +1 -0
- package/resources/payout-methods.js +23 -0
- package/resources/payout-methods.js.map +1 -0
- package/resources/payout-methods.mjs +19 -0
- package/resources/payout-methods.mjs.map +1 -0
- package/resources/shared.d.mts +38 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +38 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/withdrawals.d.mts +170 -1
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +170 -1
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +38 -0
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +38 -0
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +48 -0
- package/src/resources/checkout-configurations.ts +20 -0
- package/src/resources/courses.ts +38 -0
- package/src/resources/experiences.ts +15 -0
- package/src/resources/fee-markups.ts +232 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/payment-methods.ts +236 -54
- package/src/resources/payments.ts +105 -0
- package/src/resources/payout-methods.ts +105 -0
- package/src/resources/shared.ts +44 -0
- package/src/resources/withdrawals.ts +247 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -97,6 +97,34 @@ export class Payments extends APIResource {
|
|
|
97
97
|
return this._client.getAPIList('/payments', CursorPage<PaymentListResponse>, { query, ...options });
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Lists fees for a payment
|
|
102
|
+
*
|
|
103
|
+
* Required permissions:
|
|
104
|
+
*
|
|
105
|
+
* - `payment:basic:read`
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* // Automatically fetches more pages as needed.
|
|
110
|
+
* for await (const paymentListFeesResponse of client.payments.listFees(
|
|
111
|
+
* 'pay_xxxxxxxxxxxxxx',
|
|
112
|
+
* )) {
|
|
113
|
+
* // ...
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
listFees(
|
|
118
|
+
id: string,
|
|
119
|
+
query: PaymentListFeesParams | null | undefined = {},
|
|
120
|
+
options?: RequestOptions,
|
|
121
|
+
): PagePromise<PaymentListFeesResponsesCursorPage, PaymentListFeesResponse> {
|
|
122
|
+
return this._client.getAPIList(path`/payments/${id}/fees`, CursorPage<PaymentListFeesResponse>, {
|
|
123
|
+
query,
|
|
124
|
+
...options,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
100
128
|
/**
|
|
101
129
|
* Refunds a payment
|
|
102
130
|
*
|
|
@@ -176,6 +204,8 @@ export class Payments extends APIResource {
|
|
|
176
204
|
|
|
177
205
|
export type PaymentListResponsesCursorPage = CursorPage<PaymentListResponse>;
|
|
178
206
|
|
|
207
|
+
export type PaymentListFeesResponsesCursorPage = CursorPage<PaymentListFeesResponse>;
|
|
208
|
+
|
|
179
209
|
/**
|
|
180
210
|
* The reason why a specific payment was billed
|
|
181
211
|
*/
|
|
@@ -709,6 +739,61 @@ export namespace PaymentListResponse {
|
|
|
709
739
|
}
|
|
710
740
|
}
|
|
711
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Represents a fee related to a payment
|
|
744
|
+
*/
|
|
745
|
+
export interface PaymentListFeesResponse {
|
|
746
|
+
/**
|
|
747
|
+
* The value or amount to display for the fee.
|
|
748
|
+
*/
|
|
749
|
+
amount: number;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* The currency of the fee.
|
|
753
|
+
*/
|
|
754
|
+
currency: Shared.Currency;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* The label to display for the fee.
|
|
758
|
+
*/
|
|
759
|
+
name: string;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* The specific origin of the fee, if applicable.
|
|
763
|
+
*/
|
|
764
|
+
type:
|
|
765
|
+
| 'stripe_domestic_processing_fee'
|
|
766
|
+
| 'stripe_international_processing_fee'
|
|
767
|
+
| 'stripe_fixed_processing_fee'
|
|
768
|
+
| 'stripe_billing_fee'
|
|
769
|
+
| 'stripe_radar_fee'
|
|
770
|
+
| 'sales_tax_remittance'
|
|
771
|
+
| 'sales_tax_remittance_reversal'
|
|
772
|
+
| 'stripe_sales_tax_fee'
|
|
773
|
+
| 'whop_processing_fee'
|
|
774
|
+
| 'marketplace_affiliate_fee'
|
|
775
|
+
| 'affiliate_fee'
|
|
776
|
+
| 'crypto_fee'
|
|
777
|
+
| 'stripe_standard_processing_fee'
|
|
778
|
+
| 'paypal_fee'
|
|
779
|
+
| 'stripe_payout_fee'
|
|
780
|
+
| 'dispute_fee'
|
|
781
|
+
| 'dispute_alert_fee'
|
|
782
|
+
| 'apple_processing_fee'
|
|
783
|
+
| 'buyer_fee'
|
|
784
|
+
| 'sezzle_processing_fee'
|
|
785
|
+
| 'splitit_processing_fee'
|
|
786
|
+
| 'platform_balance_processing_fee'
|
|
787
|
+
| 'payment_processing_percentage_fee'
|
|
788
|
+
| 'payment_processing_fixed_fee'
|
|
789
|
+
| 'cross_border_percentage_fee'
|
|
790
|
+
| 'fx_percentage_fee'
|
|
791
|
+
| 'orchestration_percentage_fee'
|
|
792
|
+
| 'three_ds_fixed_fee'
|
|
793
|
+
| 'billing_percentage_fee'
|
|
794
|
+
| 'revshare_percentage_fee';
|
|
795
|
+
}
|
|
796
|
+
|
|
712
797
|
export type PaymentCreateParams =
|
|
713
798
|
| PaymentCreateParams.CreatePaymentInputWithPlan
|
|
714
799
|
| PaymentCreateParams.CreatePaymentInputWithPlanID;
|
|
@@ -999,6 +1084,23 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
999
1084
|
substatuses?: Array<Shared.FriendlyReceiptStatus> | null;
|
|
1000
1085
|
}
|
|
1001
1086
|
|
|
1087
|
+
export interface PaymentListFeesParams extends CursorPageParams {
|
|
1088
|
+
/**
|
|
1089
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
1090
|
+
*/
|
|
1091
|
+
before?: string | null;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Returns the first _n_ elements from the list.
|
|
1095
|
+
*/
|
|
1096
|
+
first?: number | null;
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Returns the last _n_ elements from the list.
|
|
1100
|
+
*/
|
|
1101
|
+
last?: number | null;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1002
1104
|
export interface PaymentRefundParams {
|
|
1003
1105
|
/**
|
|
1004
1106
|
* An amount if the refund is supposed to be partial.
|
|
@@ -1012,9 +1114,12 @@ export declare namespace Payments {
|
|
|
1012
1114
|
type CardBrands as CardBrands,
|
|
1013
1115
|
type PaymentMethodTypes as PaymentMethodTypes,
|
|
1014
1116
|
type PaymentListResponse as PaymentListResponse,
|
|
1117
|
+
type PaymentListFeesResponse as PaymentListFeesResponse,
|
|
1015
1118
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
1119
|
+
type PaymentListFeesResponsesCursorPage as PaymentListFeesResponsesCursorPage,
|
|
1016
1120
|
type PaymentCreateParams as PaymentCreateParams,
|
|
1017
1121
|
type PaymentListParams as PaymentListParams,
|
|
1122
|
+
type PaymentListFeesParams as PaymentListFeesParams,
|
|
1018
1123
|
type PaymentRefundParams as PaymentRefundParams,
|
|
1019
1124
|
};
|
|
1020
1125
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class PayoutMethods extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Lists payout destinations for a company
|
|
10
|
+
*
|
|
11
|
+
* Required permissions:
|
|
12
|
+
*
|
|
13
|
+
* - `payout:destination:read`
|
|
14
|
+
*/
|
|
15
|
+
list(
|
|
16
|
+
query: PayoutMethodListParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): PagePromise<PayoutMethodListResponsesCursorPage, PayoutMethodListResponse> {
|
|
19
|
+
return this._client.getAPIList('/payout_methods', CursorPage<PayoutMethodListResponse>, {
|
|
20
|
+
query,
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type PayoutMethodListResponsesCursorPage = CursorPage<PayoutMethodListResponse>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An object representing an user's setup payout destination.
|
|
30
|
+
*/
|
|
31
|
+
export interface PayoutMethodListResponse {
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the payout token
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
39
|
+
* will be made in for this token.
|
|
40
|
+
*/
|
|
41
|
+
currency: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The payout destination associated with the payout token
|
|
45
|
+
*/
|
|
46
|
+
destination: PayoutMethodListResponse.Destination | null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
50
|
+
* not used by the provider and is only for the user's reference.
|
|
51
|
+
*/
|
|
52
|
+
nickname: string | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace PayoutMethodListResponse {
|
|
56
|
+
/**
|
|
57
|
+
* The payout destination associated with the payout token
|
|
58
|
+
*/
|
|
59
|
+
export interface Destination {
|
|
60
|
+
/**
|
|
61
|
+
* The category of the payout destination
|
|
62
|
+
*/
|
|
63
|
+
category: 'crypto' | 'rtp' | 'next_day_bank' | 'bank_wire' | 'digital_wallet' | 'unknown';
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The country code of the payout destination
|
|
67
|
+
*/
|
|
68
|
+
country_code: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The name of the payer associated with the payout destination
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface PayoutMethodListParams extends CursorPageParams {
|
|
78
|
+
/**
|
|
79
|
+
* The company ID to list payout methods for.
|
|
80
|
+
*/
|
|
81
|
+
company_id: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
85
|
+
*/
|
|
86
|
+
before?: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns the first _n_ elements from the list.
|
|
90
|
+
*/
|
|
91
|
+
first?: number | null;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Returns the last _n_ elements from the list.
|
|
95
|
+
*/
|
|
96
|
+
last?: number | null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare namespace PayoutMethods {
|
|
100
|
+
export {
|
|
101
|
+
type PayoutMethodListResponse as PayoutMethodListResponse,
|
|
102
|
+
type PayoutMethodListResponsesCursorPage as PayoutMethodListResponsesCursorPage,
|
|
103
|
+
type PayoutMethodListParams as PayoutMethodListParams,
|
|
104
|
+
};
|
|
105
|
+
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -442,6 +442,11 @@ export interface CheckoutConfiguration {
|
|
|
442
442
|
*/
|
|
443
443
|
company_id: string;
|
|
444
444
|
|
|
445
|
+
/**
|
|
446
|
+
* The available currencies on the platform
|
|
447
|
+
*/
|
|
448
|
+
currency: Currency | null;
|
|
449
|
+
|
|
445
450
|
/**
|
|
446
451
|
* The metadata to use for the checkout configuration
|
|
447
452
|
*/
|
|
@@ -791,12 +796,29 @@ export namespace CourseLessonInteraction {
|
|
|
791
796
|
*/
|
|
792
797
|
id: string;
|
|
793
798
|
|
|
799
|
+
/**
|
|
800
|
+
* The chapter this lesson belongs to
|
|
801
|
+
*/
|
|
802
|
+
chapter: Lesson.Chapter;
|
|
803
|
+
|
|
794
804
|
/**
|
|
795
805
|
* The title of the lesson
|
|
796
806
|
*/
|
|
797
807
|
title: string;
|
|
798
808
|
}
|
|
799
809
|
|
|
810
|
+
export namespace Lesson {
|
|
811
|
+
/**
|
|
812
|
+
* The chapter this lesson belongs to
|
|
813
|
+
*/
|
|
814
|
+
export interface Chapter {
|
|
815
|
+
/**
|
|
816
|
+
* The ID of the chapter. Looks like chap_XXX
|
|
817
|
+
*/
|
|
818
|
+
id: string;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
800
822
|
/**
|
|
801
823
|
* The user who interacted with the lesson
|
|
802
824
|
*/
|
|
@@ -858,12 +880,29 @@ export namespace CourseLessonInteractionListItem {
|
|
|
858
880
|
*/
|
|
859
881
|
id: string;
|
|
860
882
|
|
|
883
|
+
/**
|
|
884
|
+
* The chapter this lesson belongs to
|
|
885
|
+
*/
|
|
886
|
+
chapter: Lesson.Chapter;
|
|
887
|
+
|
|
861
888
|
/**
|
|
862
889
|
* The title of the lesson
|
|
863
890
|
*/
|
|
864
891
|
title: string;
|
|
865
892
|
}
|
|
866
893
|
|
|
894
|
+
export namespace Lesson {
|
|
895
|
+
/**
|
|
896
|
+
* The chapter this lesson belongs to
|
|
897
|
+
*/
|
|
898
|
+
export interface Chapter {
|
|
899
|
+
/**
|
|
900
|
+
* The ID of the chapter. Looks like chap_XXX
|
|
901
|
+
*/
|
|
902
|
+
id: string;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
|
|
867
906
|
/**
|
|
868
907
|
* The user who interacted with the lesson
|
|
869
908
|
*/
|
|
@@ -1154,6 +1193,11 @@ export interface Experience {
|
|
|
1154
1193
|
*/
|
|
1155
1194
|
image: Experience.Image | null;
|
|
1156
1195
|
|
|
1196
|
+
/**
|
|
1197
|
+
* Whether the experience is visible to the public
|
|
1198
|
+
*/
|
|
1199
|
+
is_public: boolean;
|
|
1200
|
+
|
|
1157
1201
|
/**
|
|
1158
1202
|
* The written name of the description.
|
|
1159
1203
|
*/
|
|
@@ -8,12 +8,41 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
10
|
export class Withdrawals extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a withdrawal request for a ledger account
|
|
13
|
+
*
|
|
14
|
+
* Required permissions:
|
|
15
|
+
*
|
|
16
|
+
* - `payout:withdraw_funds`
|
|
17
|
+
* - `payout:destination:read`
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const withdrawal = await client.withdrawals.create({
|
|
22
|
+
* amount: 6.9,
|
|
23
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
24
|
+
* currency: 'usd',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
create(body: WithdrawalCreateParams, options?: RequestOptions): APIPromise<WithdrawalCreateResponse> {
|
|
29
|
+
return this._client.post('/withdrawals', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
11
32
|
/**
|
|
12
33
|
* Retrieves a withdrawal by ID
|
|
13
34
|
*
|
|
14
35
|
* Required permissions:
|
|
15
36
|
*
|
|
16
37
|
* - `payout:withdrawal:read`
|
|
38
|
+
* - `payout:destination:read`
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const withdrawal = await client.withdrawals.retrieve(
|
|
43
|
+
* 'wdrl_xxxxxxxxxxxxx',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
17
46
|
*/
|
|
18
47
|
retrieve(id: string, options?: RequestOptions): APIPromise<WithdrawalRetrieveResponse> {
|
|
19
48
|
return this._client.get(path`/withdrawals/${id}`, options);
|
|
@@ -25,6 +54,16 @@ export class Withdrawals extends APIResource {
|
|
|
25
54
|
* Required permissions:
|
|
26
55
|
*
|
|
27
56
|
* - `payout:withdrawal:read`
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* // Automatically fetches more pages as needed.
|
|
61
|
+
* for await (const withdrawalListResponse of client.withdrawals.list(
|
|
62
|
+
* { company_id: 'biz_xxxxxxxxxxxxxx' },
|
|
63
|
+
* )) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
28
67
|
*/
|
|
29
68
|
list(
|
|
30
69
|
query: WithdrawalListParams,
|
|
@@ -63,6 +102,190 @@ export type WithdrawalStatus =
|
|
|
63
102
|
*/
|
|
64
103
|
export type WithdrawalTypes = 'regular' | 'clawback';
|
|
65
104
|
|
|
105
|
+
/**
|
|
106
|
+
* A withdrawal request.
|
|
107
|
+
*/
|
|
108
|
+
export interface WithdrawalCreateResponse {
|
|
109
|
+
/**
|
|
110
|
+
* Internal ID of the withdrawal request.
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* How much money was attempted to be withdrawn, in a float type.
|
|
116
|
+
*/
|
|
117
|
+
amount: number;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* When the withdrawal request was created.
|
|
121
|
+
*/
|
|
122
|
+
created_at: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The currency of the withdrawal request.
|
|
126
|
+
*/
|
|
127
|
+
currency: Shared.Currency;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The different error codes a payout can be in.
|
|
131
|
+
*/
|
|
132
|
+
error_code:
|
|
133
|
+
| 'account_closed'
|
|
134
|
+
| 'account_does_not_exist'
|
|
135
|
+
| 'account_information_invalid'
|
|
136
|
+
| 'account_number_invalid_region'
|
|
137
|
+
| 'account_frozen'
|
|
138
|
+
| 'account_lookup_failed'
|
|
139
|
+
| 'account_not_found'
|
|
140
|
+
| 'amount_out_of_bounds'
|
|
141
|
+
| 'attributes_not_validated'
|
|
142
|
+
| 'b2b_payments_prohibited'
|
|
143
|
+
| 'bank_statement_required'
|
|
144
|
+
| 'compliance_review'
|
|
145
|
+
| 'currency_not_supported'
|
|
146
|
+
| 'deposit_canceled'
|
|
147
|
+
| 'deposit_failed'
|
|
148
|
+
| 'deposit_rejected'
|
|
149
|
+
| 'destination_unavailable'
|
|
150
|
+
| 'exceeded_account_limit'
|
|
151
|
+
| 'expired_quote'
|
|
152
|
+
| 'generic_payout_error'
|
|
153
|
+
| 'technical_problem'
|
|
154
|
+
| 'identification_number_invalid'
|
|
155
|
+
| 'invalid_account_number'
|
|
156
|
+
| 'invalid_bank_code'
|
|
157
|
+
| 'invalid_beneficiary'
|
|
158
|
+
| 'invalid_branch_number'
|
|
159
|
+
| 'invalid_branch_code'
|
|
160
|
+
| 'invalid_phone_number'
|
|
161
|
+
| 'invalid_routing_number'
|
|
162
|
+
| 'invalid_swift_code'
|
|
163
|
+
| 'invalid_company_details'
|
|
164
|
+
| 'manual_cancelation'
|
|
165
|
+
| 'misc_error'
|
|
166
|
+
| 'missing_city_and_country'
|
|
167
|
+
| 'missing_phone_number'
|
|
168
|
+
| 'missing_remittance_info'
|
|
169
|
+
| 'payee_name_invalid'
|
|
170
|
+
| 'receiving_account_locked'
|
|
171
|
+
| 'rejected_by_compliance'
|
|
172
|
+
| 'rtp_not_supported'
|
|
173
|
+
| 'non_transaction_account'
|
|
174
|
+
| 'source_token_insufficient_funds'
|
|
175
|
+
| 'ssn_invalid'
|
|
176
|
+
| 'wallet_screenshot_required'
|
|
177
|
+
| 'unsupported_region'
|
|
178
|
+
| null;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The error message for the withdrawal, if any.
|
|
182
|
+
*/
|
|
183
|
+
error_message: string | null;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The estimated availability date for the withdrawal, if any.
|
|
187
|
+
*/
|
|
188
|
+
estimated_availability: string | null;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The fee amount that was charged for the withdrawal. This is in the same currency
|
|
192
|
+
* as the withdrawal amount.
|
|
193
|
+
*/
|
|
194
|
+
fee_amount: number;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The different fee types for a withdrawal.
|
|
198
|
+
*/
|
|
199
|
+
fee_type: WithdrawalFeeTypes | null;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The ledger account associated with the withdrawal.
|
|
203
|
+
*/
|
|
204
|
+
ledger_account: WithdrawalCreateResponse.LedgerAccount;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The markup fee that was charged for the withdrawal. This is in the same currency
|
|
208
|
+
* as the withdrawal amount. This only applies to platform accounts using Whop
|
|
209
|
+
* Rails.
|
|
210
|
+
*/
|
|
211
|
+
markup_fee: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The payout token used for the withdrawal, if applicable.
|
|
215
|
+
*/
|
|
216
|
+
payout_token: WithdrawalCreateResponse.PayoutToken | null;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The speed of the withdrawal.
|
|
220
|
+
*/
|
|
221
|
+
speed: WithdrawalSpeeds;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Status of the withdrawal.
|
|
225
|
+
*/
|
|
226
|
+
status: WithdrawalStatus;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The trace code for the payout, if applicable. Provided on ACH transactions when
|
|
230
|
+
* available.
|
|
231
|
+
*/
|
|
232
|
+
trace_code: string | null;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The type of withdrawal.
|
|
236
|
+
*/
|
|
237
|
+
withdrawal_type: WithdrawalTypes;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export namespace WithdrawalCreateResponse {
|
|
241
|
+
/**
|
|
242
|
+
* The ledger account associated with the withdrawal.
|
|
243
|
+
*/
|
|
244
|
+
export interface LedgerAccount {
|
|
245
|
+
/**
|
|
246
|
+
* The ID of the LedgerAccount.
|
|
247
|
+
*/
|
|
248
|
+
id: string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The ID of the company associated with this ledger account.
|
|
252
|
+
*/
|
|
253
|
+
company_id: string | null;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* The payout token used for the withdrawal, if applicable.
|
|
258
|
+
*/
|
|
259
|
+
export interface PayoutToken {
|
|
260
|
+
/**
|
|
261
|
+
* The ID of the payout token
|
|
262
|
+
*/
|
|
263
|
+
id: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The date and time the payout token was created
|
|
267
|
+
*/
|
|
268
|
+
created_at: string;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The currency code of the payout destination. This is the currency that payouts
|
|
272
|
+
* will be made in for this token.
|
|
273
|
+
*/
|
|
274
|
+
destination_currency_code: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* An optional nickname for the payout token to help the user identify it. This is
|
|
278
|
+
* not used by the provider and is only for the user's reference.
|
|
279
|
+
*/
|
|
280
|
+
nickname: string | null;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The name of the payer associated with the payout token.
|
|
284
|
+
*/
|
|
285
|
+
payer_name: string | null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
66
289
|
/**
|
|
67
290
|
* A withdrawal request.
|
|
68
291
|
*/
|
|
@@ -305,6 +528,28 @@ export interface WithdrawalListResponse {
|
|
|
305
528
|
withdrawal_type: WithdrawalTypes;
|
|
306
529
|
}
|
|
307
530
|
|
|
531
|
+
export interface WithdrawalCreateParams {
|
|
532
|
+
/**
|
|
533
|
+
* The amount to withdraw in the specified currency
|
|
534
|
+
*/
|
|
535
|
+
amount: number;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* The ID of the company to withdraw from.
|
|
539
|
+
*/
|
|
540
|
+
company_id: string;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* The currency that is being withdrawn.
|
|
544
|
+
*/
|
|
545
|
+
currency: Shared.Currency;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* The ID of the payout method to use for the withdrawal.
|
|
549
|
+
*/
|
|
550
|
+
payout_method_id?: string | null;
|
|
551
|
+
}
|
|
552
|
+
|
|
308
553
|
export interface WithdrawalListParams extends CursorPageParams {
|
|
309
554
|
/**
|
|
310
555
|
* The ID of the company to list withdrawals for
|
|
@@ -348,9 +593,11 @@ export declare namespace Withdrawals {
|
|
|
348
593
|
type WithdrawalSpeeds as WithdrawalSpeeds,
|
|
349
594
|
type WithdrawalStatus as WithdrawalStatus,
|
|
350
595
|
type WithdrawalTypes as WithdrawalTypes,
|
|
596
|
+
type WithdrawalCreateResponse as WithdrawalCreateResponse,
|
|
351
597
|
type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse,
|
|
352
598
|
type WithdrawalListResponse as WithdrawalListResponse,
|
|
353
599
|
type WithdrawalListResponsesCursorPage as WithdrawalListResponsesCursorPage,
|
|
600
|
+
type WithdrawalCreateParams as WithdrawalCreateParams,
|
|
354
601
|
type WithdrawalListParams as WithdrawalListParams,
|
|
355
602
|
};
|
|
356
603
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.16'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.16";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.16";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.16'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|