@whop/elements 1.0.0-beta.1 → 1.0.0-beta.2
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/ads.d.cts +1 -1
- package/ads.d.ts +1 -1
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/payments.d.cts +6 -6
- package/payments.d.ts +6 -6
- package/wallet.d.cts +156 -4
- package/wallet.d.ts +156 -4
package/ads.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ export interface AdsOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
accountId?: string;
|
|
18
18
|
/**
|
|
19
|
-
* A scoped token every surface under this handle reads and writes with. **Mint one token for the whole handle, not one per element.** Work out the scopes of every element you are going to mount, request them on a single token, and set it here — the handle projects that one credential into each element's frame, so a second token per surface buys nothing and leaves you several expiration dates to track instead of one. Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one with `update({ accessToken })` before it expires. Mounting everything needs `ad_campaign:read`/`:create`, `ad_group:read`, `ad:read`, `stats:read`, the `:update`/`:delete` scopes the table's row actions use, `company:basic:read` for the pixel checks `campaign-creator` runs, and `payment:charge` plus `user:email:read` to add an ad-spend card
|
|
19
|
+
* A scoped token every surface under this handle reads and writes with. **Mint one token for the whole handle, not one per element.** Work out the scopes of every element you are going to mount, request them on a single token, and set it here — the handle projects that one credential into each element's frame, so a second token per surface buys nothing and leaves you several expiration dates to track instead of one. Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one with `update({ accessToken })` before it expires. Mounting everything needs `ad_campaign:read`/`:create`, `ad_group:read`, `ad:read`, `stats:read`, the `:update`/`:delete` scopes the table's row actions use, `company:basic:read` for the pixel checks `campaign-creator` runs, and `payment:charge` plus `user:email:read` to add an ad-spend card; the billing slots list stored cards and spendable wallets with `member:payment_methods:read`. Mounting fewer surfaces can ask for fewer scopes — still on the one token. Omitted, the calls carry the viewer's own session, which only answers same-origin.
|
|
20
20
|
*/
|
|
21
21
|
accessToken?: string;
|
|
22
22
|
/**
|
package/ads.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface AdsOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
accountId?: string;
|
|
18
18
|
/**
|
|
19
|
-
* A scoped token every surface under this handle reads and writes with. **Mint one token for the whole handle, not one per element.** Work out the scopes of every element you are going to mount, request them on a single token, and set it here — the handle projects that one credential into each element's frame, so a second token per surface buys nothing and leaves you several expiration dates to track instead of one. Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one with `update({ accessToken })` before it expires. Mounting everything needs `ad_campaign:read`/`:create`, `ad_group:read`, `ad:read`, `stats:read`, the `:update`/`:delete` scopes the table's row actions use, `company:basic:read` for the pixel checks `campaign-creator` runs, and `payment:charge` plus `user:email:read` to add an ad-spend card
|
|
19
|
+
* A scoped token every surface under this handle reads and writes with. **Mint one token for the whole handle, not one per element.** Work out the scopes of every element you are going to mount, request them on a single token, and set it here — the handle projects that one credential into each element's frame, so a second token per surface buys nothing and leaves you several expiration dates to track instead of one. Mint it on your server with `POST /api/v1/access_tokens` and set a fresh one with `update({ accessToken })` before it expires. Mounting everything needs `ad_campaign:read`/`:create`, `ad_group:read`, `ad:read`, `stats:read`, the `:update`/`:delete` scopes the table's row actions use, `company:basic:read` for the pixel checks `campaign-creator` runs, and `payment:charge` plus `user:email:read` to add an ad-spend card; the billing slots list stored cards and spendable wallets with `member:payment_methods:read`. Mounting fewer surfaces can ask for fewer scopes — still on the one token. Omitted, the calls carry the viewer's own session, which only answers same-origin.
|
|
20
20
|
*/
|
|
21
21
|
accessToken?: string;
|
|
22
22
|
/**
|
package/index.d.cts
CHANGED
|
@@ -28,7 +28,7 @@ export interface Whop {
|
|
|
28
28
|
*/
|
|
29
29
|
tracking: { create(options: TrackingOptions): TrackingHandle } & TrackingStatics;
|
|
30
30
|
/**
|
|
31
|
-
* Drives an account's money surfaces. `deposit` returns live funding rails; `send` moves money to a recipient or creates a public claim link; `withdraw` collects a payout request; `balances` holds two faces — the holdings list, and the balance block drawing value over a window; `cards` lists issued cards; and `activity` lists ledger movements. Every surface but `deposit` can use the viewer's session when no token is provided.
|
|
31
|
+
* Drives an account's money surfaces. `actions` renders the Deposit, Accept, and Send controls from Whop's balance dashboard: Deposit and Send open their Wallet overlays, while Accept opens Whop's checkout-link creator for a business account or company creation for a personal account. `deposit` returns live funding rails; `send` moves money to a recipient or creates a public claim link; `withdraw` collects a payout request; `balances` holds two faces — the holdings list, and the balance block drawing value over a window; `cards` lists issued cards; and `activity` lists ledger movements. Every data-backed surface but `deposit` can use the viewer's session when no token is provided.
|
|
32
32
|
*/
|
|
33
33
|
wallet: { create(options: WalletOptions): WalletHandle } & WalletStatics;
|
|
34
34
|
/**
|
package/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface Whop {
|
|
|
28
28
|
*/
|
|
29
29
|
tracking: { create(options: TrackingOptions): TrackingHandle } & TrackingStatics;
|
|
30
30
|
/**
|
|
31
|
-
* Drives an account's money surfaces. `deposit` returns live funding rails; `send` moves money to a recipient or creates a public claim link; `withdraw` collects a payout request; `balances` holds two faces — the holdings list, and the balance block drawing value over a window; `cards` lists issued cards; and `activity` lists ledger movements. Every surface but `deposit` can use the viewer's session when no token is provided.
|
|
31
|
+
* Drives an account's money surfaces. `actions` renders the Deposit, Accept, and Send controls from Whop's balance dashboard: Deposit and Send open their Wallet overlays, while Accept opens Whop's checkout-link creator for a business account or company creation for a personal account. `deposit` returns live funding rails; `send` moves money to a recipient or creates a public claim link; `withdraw` collects a payout request; `balances` holds two faces — the holdings list, and the balance block drawing value over a window; `cards` lists issued cards; and `activity` lists ledger movements. Every data-backed surface but `deposit` can use the viewer's session when no token is provided.
|
|
32
32
|
*/
|
|
33
33
|
wallet: { create(options: WalletOptions): WalletHandle } & WalletStatics;
|
|
34
34
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whop/elements",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Whop Elements — vanilla-js loader + types. Loads the hosted SDK and exposes the typed WhopElements factory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"checkout",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"whopElementsApiHash": "
|
|
84
|
+
"whopElementsApiHash": "264824707d32bdd5fc8a44718baa5f440c771bb22528f2e5b50391b1e5b80366"
|
|
85
85
|
}
|
package/payments.d.cts
CHANGED
|
@@ -246,7 +246,7 @@ export interface PaymentElementCreateOptions {
|
|
|
246
246
|
*/
|
|
247
247
|
autoSelect?: boolean;
|
|
248
248
|
/**
|
|
249
|
-
* Fires when selection changes. `complete: true` means the buyer selected a method and completed its card fields or required inputs. Use it to enable confirmation. `method` provides category, per-currency countries, and amount bounds for dependent UI such as country fields. `supportsBuyerFee` indicates whether to include Whop's buyer service fee in the displayed total.
|
|
249
|
+
* Fires when selection changes. `complete: true` means the buyer selected a method and completed its card fields or required inputs. Use it to enable confirmation. `method` provides category, per-currency countries, and amount bounds for dependent UI such as country fields; when the buyer picks a card installment plan, `countries` narrows to the countries that plan serves for the payment currency. `supportsBuyerFee` indicates whether to include Whop's buyer service fee in the displayed total.
|
|
250
250
|
*/
|
|
251
251
|
onChange?: ((payload: { complete: boolean; type?: string | undefined; supportsBuyerFee?: boolean | undefined; method?: { type: string; category: string; template: string; display_name: string; countries: ({ country: string; min_amount: number | null; max_amount: number | null; })[]; min_amount: number | null; max_amount: number | null; } | undefined; }) => void);
|
|
252
252
|
/**
|
|
@@ -490,9 +490,9 @@ export interface CardElementCreateOptions {
|
|
|
490
490
|
*/
|
|
491
491
|
layout?: "compact" | "stacked";
|
|
492
492
|
/**
|
|
493
|
-
* Fires when card fields change. `complete` becomes true after the buyer fills all three. Use it to enable confirmation. `brand` is the detected card network.
|
|
493
|
+
* Fires when card fields change. `complete` becomes true after the buyer fills all three. Use it to enable confirmation. `brand` is the detected card network. `funding` is the detected funding type (`credit`, `debit`, or `prepaid`), `null` until the number identifies one.
|
|
494
494
|
*/
|
|
495
|
-
onChange?: ((payload: { complete: boolean; brand: string; }) => void);
|
|
495
|
+
onChange?: ((payload: { complete: boolean; brand: string; funding: string | null; }) => void);
|
|
496
496
|
/**
|
|
497
497
|
* Runs after the loading skeleton first paints and before `onReady`.
|
|
498
498
|
*/
|
|
@@ -751,9 +751,9 @@ export interface CardFieldsSubOptions {
|
|
|
751
751
|
*/
|
|
752
752
|
networks?: CardNetworkArt[];
|
|
753
753
|
/**
|
|
754
|
-
* Fires when completeness changes. `complete` becomes true after the buyer fills all three fields. Use it to enable confirmation. `brand` is the detected card network.
|
|
754
|
+
* Fires when completeness changes. `complete` becomes true after the buyer fills all three fields. Use it to enable confirmation. `brand` is the detected card network. `funding` is the detected funding type (`credit`, `debit`, or `prepaid`), `null` until the number identifies one.
|
|
755
755
|
*/
|
|
756
|
-
onChange?: ((payload: { complete: boolean; brand: string; }) => void);
|
|
756
|
+
onChange?: ((payload: { complete: boolean; brand: string; funding: string | null; }) => void);
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
/**
|
|
@@ -1041,7 +1041,7 @@ export interface PaymentsHandle {
|
|
|
1041
1041
|
*/
|
|
1042
1042
|
create(name: "taxId", options?: TaxIdElementCreateOptions): TaxIdElementHandle;
|
|
1043
1043
|
/**
|
|
1044
|
-
* Whop's merchant-of-record notice: the Whop wordmark with links to the buyer terms and privacy policy.
|
|
1044
|
+
* Whop's merchant-of-record notice: the Whop wordmark with links to the buyer terms and privacy policy. Mount it alongside every payment collection surface.
|
|
1045
1045
|
*/
|
|
1046
1046
|
create(name: "branding", options?: BrandingElementCreateOptions): BrandingElementHandle;
|
|
1047
1047
|
/**
|
package/payments.d.ts
CHANGED
|
@@ -246,7 +246,7 @@ export interface PaymentElementCreateOptions {
|
|
|
246
246
|
*/
|
|
247
247
|
autoSelect?: boolean;
|
|
248
248
|
/**
|
|
249
|
-
* Fires when selection changes. `complete: true` means the buyer selected a method and completed its card fields or required inputs. Use it to enable confirmation. `method` provides category, per-currency countries, and amount bounds for dependent UI such as country fields. `supportsBuyerFee` indicates whether to include Whop's buyer service fee in the displayed total.
|
|
249
|
+
* Fires when selection changes. `complete: true` means the buyer selected a method and completed its card fields or required inputs. Use it to enable confirmation. `method` provides category, per-currency countries, and amount bounds for dependent UI such as country fields; when the buyer picks a card installment plan, `countries` narrows to the countries that plan serves for the payment currency. `supportsBuyerFee` indicates whether to include Whop's buyer service fee in the displayed total.
|
|
250
250
|
*/
|
|
251
251
|
onChange?: ((payload: { complete: boolean; type?: string | undefined; supportsBuyerFee?: boolean | undefined; method?: { type: string; category: string; template: string; display_name: string; countries: ({ country: string; min_amount: number | null; max_amount: number | null; })[]; min_amount: number | null; max_amount: number | null; } | undefined; }) => void);
|
|
252
252
|
/**
|
|
@@ -490,9 +490,9 @@ export interface CardElementCreateOptions {
|
|
|
490
490
|
*/
|
|
491
491
|
layout?: "compact" | "stacked";
|
|
492
492
|
/**
|
|
493
|
-
* Fires when card fields change. `complete` becomes true after the buyer fills all three. Use it to enable confirmation. `brand` is the detected card network.
|
|
493
|
+
* Fires when card fields change. `complete` becomes true after the buyer fills all three. Use it to enable confirmation. `brand` is the detected card network. `funding` is the detected funding type (`credit`, `debit`, or `prepaid`), `null` until the number identifies one.
|
|
494
494
|
*/
|
|
495
|
-
onChange?: ((payload: { complete: boolean; brand: string; }) => void);
|
|
495
|
+
onChange?: ((payload: { complete: boolean; brand: string; funding: string | null; }) => void);
|
|
496
496
|
/**
|
|
497
497
|
* Runs after the loading skeleton first paints and before `onReady`.
|
|
498
498
|
*/
|
|
@@ -751,9 +751,9 @@ export interface CardFieldsSubOptions {
|
|
|
751
751
|
*/
|
|
752
752
|
networks?: CardNetworkArt[];
|
|
753
753
|
/**
|
|
754
|
-
* Fires when completeness changes. `complete` becomes true after the buyer fills all three fields. Use it to enable confirmation. `brand` is the detected card network.
|
|
754
|
+
* Fires when completeness changes. `complete` becomes true after the buyer fills all three fields. Use it to enable confirmation. `brand` is the detected card network. `funding` is the detected funding type (`credit`, `debit`, or `prepaid`), `null` until the number identifies one.
|
|
755
755
|
*/
|
|
756
|
-
onChange?: ((payload: { complete: boolean; brand: string; }) => void);
|
|
756
|
+
onChange?: ((payload: { complete: boolean; brand: string; funding: string | null; }) => void);
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
/**
|
|
@@ -1041,7 +1041,7 @@ export interface PaymentsHandle {
|
|
|
1041
1041
|
*/
|
|
1042
1042
|
create(name: "taxId", options?: TaxIdElementCreateOptions): TaxIdElementHandle;
|
|
1043
1043
|
/**
|
|
1044
|
-
* Whop's merchant-of-record notice: the Whop wordmark with links to the buyer terms and privacy policy.
|
|
1044
|
+
* Whop's merchant-of-record notice: the Whop wordmark with links to the buyer terms and privacy policy. Mount it alongside every payment collection surface.
|
|
1045
1045
|
*/
|
|
1046
1046
|
create(name: "branding", options?: BrandingElementCreateOptions): BrandingElementHandle;
|
|
1047
1047
|
/**
|
package/wallet.d.cts
CHANGED
|
@@ -133,13 +133,135 @@ export interface ActivityElementCreateOptions {
|
|
|
133
133
|
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Consumer props for the "actions" element. Set at create (or as `<ActionsElement />` JSX props), and updatable live via `update()`.
|
|
138
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
139
|
+
*/
|
|
140
|
+
export interface ActionsElementProps {
|
|
141
|
+
/**
|
|
142
|
+
* Show the Deposit button.
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
145
|
+
showDeposit?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Show the Accept button.
|
|
148
|
+
* @default true
|
|
149
|
+
*/
|
|
150
|
+
showAccept?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Show the Send button.
|
|
153
|
+
* @default true
|
|
154
|
+
*/
|
|
155
|
+
showSend?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Disable the Deposit button while keeping it visible.
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
depositDisabled?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Disable the Accept button while keeping it visible.
|
|
163
|
+
* @default false
|
|
164
|
+
*/
|
|
165
|
+
acceptDisabled?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Disable the Send button while keeping it visible.
|
|
168
|
+
* @default false
|
|
169
|
+
*/
|
|
170
|
+
sendDisabled?: boolean;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The live handle for a mounted "actions" element. Returned by `create("actions")`; in React, the component's `ref`.
|
|
175
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
176
|
+
*/
|
|
177
|
+
export interface ActionsElementHandle {
|
|
178
|
+
/**
|
|
179
|
+
* Mounts the element in `target` and starts loading. React components mount themselves.
|
|
180
|
+
*/
|
|
181
|
+
mount: (target: string | HTMLElement) => void;
|
|
182
|
+
/**
|
|
183
|
+
* Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
|
|
184
|
+
*/
|
|
185
|
+
destroy: () => void;
|
|
186
|
+
/**
|
|
187
|
+
* Merges new props into the mounted element. In React, change the component props instead.
|
|
188
|
+
*/
|
|
189
|
+
update: (options: Partial<ActionsElementProps>) => void;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Options for `create("actions")`: the consumer props plus event callbacks and lifecycle hooks.
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* const actions = wallet.create("actions", {}); // this interface: props + on<Event> callbacks
|
|
197
|
+
* actions.mount("#wallet-actions");
|
|
198
|
+
* ```
|
|
199
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
200
|
+
*/
|
|
201
|
+
export interface ActionsElementCreateOptions {
|
|
202
|
+
/**
|
|
203
|
+
* Show the Deposit button.
|
|
204
|
+
* @default true
|
|
205
|
+
*/
|
|
206
|
+
showDeposit?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Show the Accept button.
|
|
209
|
+
* @default true
|
|
210
|
+
*/
|
|
211
|
+
showAccept?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Show the Send button.
|
|
214
|
+
* @default true
|
|
215
|
+
*/
|
|
216
|
+
showSend?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Disable the Deposit button while keeping it visible.
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
depositDisabled?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Disable the Accept button while keeping it visible.
|
|
224
|
+
* @default false
|
|
225
|
+
*/
|
|
226
|
+
acceptDisabled?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Disable the Send button while keeping it visible.
|
|
229
|
+
* @default false
|
|
230
|
+
*/
|
|
231
|
+
sendDisabled?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* The Deposit button was pressed and the Wallet controller opened its deposit overlay.
|
|
234
|
+
*/
|
|
235
|
+
onDepositRequested?: ((payload: Record<string, never>) => void);
|
|
236
|
+
/**
|
|
237
|
+
* The Accept button was pressed and the Wallet controller opened the corresponding Whop setup page.
|
|
238
|
+
*/
|
|
239
|
+
onAcceptRequested?: ((payload: Record<string, never>) => void);
|
|
240
|
+
/**
|
|
241
|
+
* The Send button was pressed and the Wallet controller opened its send overlay.
|
|
242
|
+
*/
|
|
243
|
+
onSendRequested?: ((payload: Record<string, never>) => void);
|
|
244
|
+
/**
|
|
245
|
+
* Runs after the loading skeleton first paints and before `onReady`.
|
|
246
|
+
*/
|
|
247
|
+
onLoaderStart?: (() => void);
|
|
248
|
+
/**
|
|
249
|
+
* Runs after the element's first complete paint.
|
|
250
|
+
*/
|
|
251
|
+
onReady?: (() => void);
|
|
252
|
+
/**
|
|
253
|
+
* Runs when the element fails to load or crashes. The fallback remains visible. Use `code` for programmatic handling. `sourceKey` identifies a failed host-state source.
|
|
254
|
+
*/
|
|
255
|
+
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
256
|
+
}
|
|
257
|
+
|
|
136
258
|
/**
|
|
137
259
|
* Consumer props for the "deposit" element. Set at create (or as `<DepositElement />` JSX props), and updatable live via `update()`.
|
|
138
260
|
* @see https://docs.whop.com/elements/latest/wallet/deposit
|
|
139
261
|
*/
|
|
140
262
|
export interface DepositElementProps {
|
|
141
263
|
/**
|
|
142
|
-
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero,
|
|
264
|
+
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero is ignored, as is one longer than 12 whole digits; the rest is rounded to the currency’s decimal places.
|
|
143
265
|
* @default ""
|
|
144
266
|
*/
|
|
145
267
|
amount?: string;
|
|
@@ -233,7 +355,7 @@ export interface DepositElementHandle {
|
|
|
233
355
|
*/
|
|
234
356
|
export interface DepositElementCreateOptions {
|
|
235
357
|
/**
|
|
236
|
-
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero,
|
|
358
|
+
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero is ignored, as is one longer than 12 whole digits; the rest is rounded to the currency’s decimal places.
|
|
237
359
|
* @default ""
|
|
238
360
|
*/
|
|
239
361
|
amount?: string;
|
|
@@ -1190,6 +1312,10 @@ export interface WalletHandle {
|
|
|
1190
1312
|
* An account's ledger activity: every movement of money in or out, newest first. The list pages as the viewer scrolls, and rows report which one was tapped instead of navigating, so you can open your own detail screen.
|
|
1191
1313
|
*/
|
|
1192
1314
|
create(name: "activity", options?: ActivityElementCreateOptions): ActivityElementHandle;
|
|
1315
|
+
/**
|
|
1316
|
+
* The account action row from Whop's balance dashboard. Deposit and Send open the Wallet controller's built-in overlays. Accept opens Whop's checkout-link creator for a business account or company creation for a personal account. Each button also emits its requested event so the embedding page can observe the action.
|
|
1317
|
+
*/
|
|
1318
|
+
create(name: "actions", options?: ActionsElementCreateOptions): ActionsElementHandle;
|
|
1193
1319
|
/**
|
|
1194
1320
|
* Funds a Whop account. Renders an amount field and the account's live funding rails — crypto (a per-network deposit address with its QR) and bank transfer (the wire fields for each settlement currency) — resolved from the account ID with no credentials, so it works on any page. Cards and platform balance are opt-in: pass `savedCards`, `allowNewCard`, or `showPlatformBalance` and the element collects the amount and the choice, then emits `cardDepositRequested` / `addCardRequested` / `platformBalanceSelected` and waits for you to call `showStep({ step: 'amount' })` when your own screen is done.
|
|
1195
1321
|
*/
|
|
@@ -1251,6 +1377,28 @@ export interface ActivityDateRangeOverride {
|
|
|
1251
1377
|
displayPostedBefore?: string | undefined;
|
|
1252
1378
|
}
|
|
1253
1379
|
|
|
1380
|
+
/**
|
|
1381
|
+
* Declared from the app's `Money`, referenced by a host-capability surface.
|
|
1382
|
+
*/
|
|
1383
|
+
export interface Money {
|
|
1384
|
+
/**
|
|
1385
|
+
* Three-letter ISO 4217 currency code, lowercase.
|
|
1386
|
+
*/
|
|
1387
|
+
currency: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
|
|
1390
|
+
*/
|
|
1391
|
+
amount: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* How many decimal places the amount CARRIES — the precision the charge itself runs at.
|
|
1394
|
+
*/
|
|
1395
|
+
decimals: number;
|
|
1396
|
+
/**
|
|
1397
|
+
* How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
|
|
1398
|
+
*/
|
|
1399
|
+
display_decimals: number;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1254
1402
|
/**
|
|
1255
1403
|
* Declared from the app's `LedgerActivity`, referenced by a host-capability surface.
|
|
1256
1404
|
*/
|
|
@@ -1263,7 +1411,7 @@ export interface LedgerActivity {
|
|
|
1263
1411
|
/**
|
|
1264
1412
|
* The ledger line category this activity was posted under.
|
|
1265
1413
|
*/
|
|
1266
|
-
line_type: "ad_budget_release" | "ad_campaign_budget" | "ad_publisher_payout" | "ad_publisher_payout_received" | "ad_spend_charge" | "affiliate_fee" | "airdrop" | "airdrop_link_created" | "airdrop_link_redeemed" | "airdrop_link_returned" | "airdrop_reversal" | "application_fee" | "application_fee_payout" | "bank_transfer" | "billing_percentage_fee" | "buyer_fee" | "card_spend_authorization" | "card_spend_authorization_void" | "card_spend_refund" | "company_referral" | "cross_border_percentage_fee" | "currency_conversion_incoming" | "currency_conversion_outgoing" | "dispute_alert_fee" | "dispute_hold_adjustment" | "dispute_representment_fee" | "fraud_prevention_fee" | "fx_percentage_fee" | "high_risk_merchant_fee" | "installment_default" | "internal_balance_transfer_incoming" | "internal_balance_transfer_outgoing" | "internal_withdrawal" | "internal_withdrawal_reversal" | "legacy_crypto_payment" | "legacy_payment" | "legacy_payment_refund" | "license_sale" | "license_sale_commission" | "license_sale_revenue" | "misc_purchase" | "misc_refund" | "misc_reversal" | "onchain_deposit" | "onchain_swap_target" | "onchain_wallet_transfer_incoming" | "onchain_wallet_transfer_outgoing" | "orchestration_percentage_fee" | "passthrough_gmv" | "payment_dispute" | "payment_dispute_adjustment" | "payment_dispute_fee" | "payment_dispute_reversal" | "payment_gross" | "payment_gross_reversal" | "payment_processing_fixed_fee" | "payment_processing_percentage_fee" | "payment_referral" | "payment_referral_reversal" | "payment_refund" | "payment_refund_reversal" | "payment_revshare" | "payment_revshare_payout" | "payment_revshare_refund" | "payment_revshare_reversal" | "payout_fee" | "platform_affiliate_payment" | "platform_affiliate_payment_reversal" | "platform_balance_payment" | "platform_balance_payment_refund" | "platform_balance_transfer_incoming" | "platform_balance_transfer_outgoing" | "platform_covered_dispute" | "promo_reversal" | "referral_bonus" | "resolution_center_refund" | "revshare_percentage_fee" | "sales_tax_fee" | "sales_tax_remittance" | "sales_tax_remittance_reversal" | "software_rental_revshare" | "software_rental_transaction" | "stripe_domestic_processing_fee" | "stripe_international_processing_fee" | "three_ds_fixed_fee" | "topup" | "topup_fee" | "topup_reversal" | "treasury_payin" | "whop_processing_fee" | "withdrawal" | "withdrawal_clawback" | "withdrawal_clawback_reversal" | "withdrawal_reclassification" | "withdrawal_reversal";
|
|
1414
|
+
line_type: "ad_budget_release" | "ad_campaign_budget" | "ad_publisher_payout" | "ad_publisher_payout_received" | "ad_spend_charge" | "affiliate_fee" | "airdrop" | "airdrop_link_created" | "airdrop_link_redeemed" | "airdrop_link_returned" | "airdrop_reversal" | "application_fee" | "application_fee_payout" | "balance_reservation" | "balance_reservation_reversal" | "bank_transfer" | "billing_percentage_fee" | "buyer_fee" | "card_spend_authorization" | "card_spend_authorization_void" | "card_spend_refund" | "company_referral" | "cross_border_percentage_fee" | "currency_conversion_incoming" | "currency_conversion_outgoing" | "dispute_alert_fee" | "dispute_hold_adjustment" | "dispute_representment_fee" | "fraud_prevention_fee" | "fx_percentage_fee" | "high_risk_merchant_fee" | "installment_default" | "internal_balance_transfer_incoming" | "internal_balance_transfer_outgoing" | "internal_withdrawal" | "internal_withdrawal_reversal" | "legacy_crypto_payment" | "legacy_payment" | "legacy_payment_refund" | "license_sale" | "license_sale_commission" | "license_sale_revenue" | "misc_purchase" | "misc_refund" | "misc_reversal" | "onchain_deposit" | "onchain_swap_target" | "onchain_wallet_transfer_incoming" | "onchain_wallet_transfer_outgoing" | "orchestration_percentage_fee" | "passthrough_gmv" | "payment_dispute" | "payment_dispute_adjustment" | "payment_dispute_fee" | "payment_dispute_reversal" | "payment_gross" | "payment_gross_reversal" | "payment_processing_fixed_fee" | "payment_processing_percentage_fee" | "payment_referral" | "payment_referral_reversal" | "payment_refund" | "payment_refund_reversal" | "payment_revshare" | "payment_revshare_payout" | "payment_revshare_refund" | "payment_revshare_reversal" | "payout_fee" | "platform_affiliate_payment" | "platform_affiliate_payment_reversal" | "platform_balance_payment" | "platform_balance_payment_refund" | "platform_balance_transfer_incoming" | "platform_balance_transfer_outgoing" | "platform_covered_dispute" | "promo_reversal" | "referral_bonus" | "resolution_center_refund" | "revshare_percentage_fee" | "sales_tax_fee" | "sales_tax_remittance" | "sales_tax_remittance_reversal" | "software_rental_revshare" | "software_rental_transaction" | "stripe_domestic_processing_fee" | "stripe_international_processing_fee" | "three_ds_fixed_fee" | "topup" | "topup_fee" | "topup_reversal" | "treasury_payin" | "whop_processing_fee" | "withdrawal" | "withdrawal_clawback" | "withdrawal_clawback_reversal" | "withdrawal_reclassification" | "withdrawal_reversal";
|
|
1267
1415
|
/**
|
|
1268
1416
|
* Signed amount in the currency's smallest precision units.
|
|
1269
1417
|
*/
|
|
@@ -1291,7 +1439,11 @@ export interface LedgerActivity {
|
|
|
1291
1439
|
/**
|
|
1292
1440
|
* Source of this ledger activity.
|
|
1293
1441
|
*/
|
|
1294
|
-
source: { object: string; id: string; status?: string | null | undefined; reason?: string | null | undefined; claim_url?: string | null | undefined; amount_float?: number | null | undefined; created_at?: string | null | undefined; estimated_arrival?: string | null | undefined; payer_name?: string | null | undefined; payout_token_nickname?: string | null | undefined; tx_hash?: string | null | undefined; sender_address?: string | null | undefined; chain?: string | null | undefined; from_amount?: string | null | undefined; from_currency?: string | null | undefined; to_amount?: string | null | undefined; to_currency?: string | null | undefined; payout_destination?: { payer_name?: string | null | undefined; icon_url?: string | null | undefined; } | null | undefined; [key: string]: unknown; } | null;
|
|
1442
|
+
source: { object: string; id: string; status?: string | null | undefined; payment_amount?: Money | null | undefined; payment_method_type?: string | null | undefined; payment_processor?: string | null | undefined; card_brand?: string | null | undefined; reason?: string | null | undefined; claim_url?: string | null | undefined; amount_float?: number | null | undefined; created_at?: string | null | undefined; estimated_arrival?: string | null | undefined; payer_name?: string | null | undefined; payout_token_nickname?: string | null | undefined; tx_hash?: string | null | undefined; sender_address?: string | null | undefined; chain?: string | null | undefined; from_amount?: string | null | undefined; from_currency?: string | null | undefined; to_amount?: string | null | undefined; to_currency?: string | null | undefined; payout_destination?: { payer_name?: string | null | undefined; icon_url?: string | null | undefined; } | null | undefined; [key: string]: unknown; } | null;
|
|
1443
|
+
/**
|
|
1444
|
+
* Payment related to this ledger activity. Included when rich resource hydration is enabled and the movement is tied to a payment.
|
|
1445
|
+
*/
|
|
1446
|
+
payment?: { object: "payment"; id: string; amount: Money | null; payment_method_type: string | null; payment_processor: string | null; card_brand: string | null; card_last4: string | null; created_at: string; } | null | undefined;
|
|
1295
1447
|
/**
|
|
1296
1448
|
* The viewer account that owns this row's ledger. Present only when the response aggregates owned accounts (include_owned_accounts=true); omitted otherwise.
|
|
1297
1449
|
*/
|
package/wallet.d.ts
CHANGED
|
@@ -133,13 +133,135 @@ export interface ActivityElementCreateOptions {
|
|
|
133
133
|
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Consumer props for the "actions" element. Set at create (or as `<ActionsElement />` JSX props), and updatable live via `update()`.
|
|
138
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
139
|
+
*/
|
|
140
|
+
export interface ActionsElementProps {
|
|
141
|
+
/**
|
|
142
|
+
* Show the Deposit button.
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
145
|
+
showDeposit?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Show the Accept button.
|
|
148
|
+
* @default true
|
|
149
|
+
*/
|
|
150
|
+
showAccept?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Show the Send button.
|
|
153
|
+
* @default true
|
|
154
|
+
*/
|
|
155
|
+
showSend?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Disable the Deposit button while keeping it visible.
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
depositDisabled?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Disable the Accept button while keeping it visible.
|
|
163
|
+
* @default false
|
|
164
|
+
*/
|
|
165
|
+
acceptDisabled?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Disable the Send button while keeping it visible.
|
|
168
|
+
* @default false
|
|
169
|
+
*/
|
|
170
|
+
sendDisabled?: boolean;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The live handle for a mounted "actions" element. Returned by `create("actions")`; in React, the component's `ref`.
|
|
175
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
176
|
+
*/
|
|
177
|
+
export interface ActionsElementHandle {
|
|
178
|
+
/**
|
|
179
|
+
* Mounts the element in `target` and starts loading. React components mount themselves.
|
|
180
|
+
*/
|
|
181
|
+
mount: (target: string | HTMLElement) => void;
|
|
182
|
+
/**
|
|
183
|
+
* Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
|
|
184
|
+
*/
|
|
185
|
+
destroy: () => void;
|
|
186
|
+
/**
|
|
187
|
+
* Merges new props into the mounted element. In React, change the component props instead.
|
|
188
|
+
*/
|
|
189
|
+
update: (options: Partial<ActionsElementProps>) => void;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Options for `create("actions")`: the consumer props plus event callbacks and lifecycle hooks.
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* const actions = wallet.create("actions", {}); // this interface: props + on<Event> callbacks
|
|
197
|
+
* actions.mount("#wallet-actions");
|
|
198
|
+
* ```
|
|
199
|
+
* @see https://docs.whop.com/elements/latest/wallet/actions
|
|
200
|
+
*/
|
|
201
|
+
export interface ActionsElementCreateOptions {
|
|
202
|
+
/**
|
|
203
|
+
* Show the Deposit button.
|
|
204
|
+
* @default true
|
|
205
|
+
*/
|
|
206
|
+
showDeposit?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Show the Accept button.
|
|
209
|
+
* @default true
|
|
210
|
+
*/
|
|
211
|
+
showAccept?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Show the Send button.
|
|
214
|
+
* @default true
|
|
215
|
+
*/
|
|
216
|
+
showSend?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Disable the Deposit button while keeping it visible.
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
depositDisabled?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Disable the Accept button while keeping it visible.
|
|
224
|
+
* @default false
|
|
225
|
+
*/
|
|
226
|
+
acceptDisabled?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Disable the Send button while keeping it visible.
|
|
229
|
+
* @default false
|
|
230
|
+
*/
|
|
231
|
+
sendDisabled?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* The Deposit button was pressed and the Wallet controller opened its deposit overlay.
|
|
234
|
+
*/
|
|
235
|
+
onDepositRequested?: ((payload: Record<string, never>) => void);
|
|
236
|
+
/**
|
|
237
|
+
* The Accept button was pressed and the Wallet controller opened the corresponding Whop setup page.
|
|
238
|
+
*/
|
|
239
|
+
onAcceptRequested?: ((payload: Record<string, never>) => void);
|
|
240
|
+
/**
|
|
241
|
+
* The Send button was pressed and the Wallet controller opened its send overlay.
|
|
242
|
+
*/
|
|
243
|
+
onSendRequested?: ((payload: Record<string, never>) => void);
|
|
244
|
+
/**
|
|
245
|
+
* Runs after the loading skeleton first paints and before `onReady`.
|
|
246
|
+
*/
|
|
247
|
+
onLoaderStart?: (() => void);
|
|
248
|
+
/**
|
|
249
|
+
* Runs after the element's first complete paint.
|
|
250
|
+
*/
|
|
251
|
+
onReady?: (() => void);
|
|
252
|
+
/**
|
|
253
|
+
* Runs when the element fails to load or crashes. The fallback remains visible. Use `code` for programmatic handling. `sourceKey` identifies a failed host-state source.
|
|
254
|
+
*/
|
|
255
|
+
onError?: ((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void);
|
|
256
|
+
}
|
|
257
|
+
|
|
136
258
|
/**
|
|
137
259
|
* Consumer props for the "deposit" element. Set at create (or as `<DepositElement />` JSX props), and updatable live via `update()`.
|
|
138
260
|
* @see https://docs.whop.com/elements/latest/wallet/deposit
|
|
139
261
|
*/
|
|
140
262
|
export interface DepositElementProps {
|
|
141
263
|
/**
|
|
142
|
-
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero,
|
|
264
|
+
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero is ignored, as is one longer than 12 whole digits; the rest is rounded to the currency’s decimal places.
|
|
143
265
|
* @default ""
|
|
144
266
|
*/
|
|
145
267
|
amount?: string;
|
|
@@ -233,7 +355,7 @@ export interface DepositElementHandle {
|
|
|
233
355
|
*/
|
|
234
356
|
export interface DepositElementCreateOptions {
|
|
235
357
|
/**
|
|
236
|
-
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero,
|
|
358
|
+
* Prefill the amount and make it read-only — for flows that already know what is owed. An amount at or below zero is ignored, as is one longer than 12 whole digits; the rest is rounded to the currency’s decimal places.
|
|
237
359
|
* @default ""
|
|
238
360
|
*/
|
|
239
361
|
amount?: string;
|
|
@@ -1190,6 +1312,10 @@ export interface WalletHandle {
|
|
|
1190
1312
|
* An account's ledger activity: every movement of money in or out, newest first. The list pages as the viewer scrolls, and rows report which one was tapped instead of navigating, so you can open your own detail screen.
|
|
1191
1313
|
*/
|
|
1192
1314
|
create(name: "activity", options?: ActivityElementCreateOptions): ActivityElementHandle;
|
|
1315
|
+
/**
|
|
1316
|
+
* The account action row from Whop's balance dashboard. Deposit and Send open the Wallet controller's built-in overlays. Accept opens Whop's checkout-link creator for a business account or company creation for a personal account. Each button also emits its requested event so the embedding page can observe the action.
|
|
1317
|
+
*/
|
|
1318
|
+
create(name: "actions", options?: ActionsElementCreateOptions): ActionsElementHandle;
|
|
1193
1319
|
/**
|
|
1194
1320
|
* Funds a Whop account. Renders an amount field and the account's live funding rails — crypto (a per-network deposit address with its QR) and bank transfer (the wire fields for each settlement currency) — resolved from the account ID with no credentials, so it works on any page. Cards and platform balance are opt-in: pass `savedCards`, `allowNewCard`, or `showPlatformBalance` and the element collects the amount and the choice, then emits `cardDepositRequested` / `addCardRequested` / `platformBalanceSelected` and waits for you to call `showStep({ step: 'amount' })` when your own screen is done.
|
|
1195
1321
|
*/
|
|
@@ -1251,6 +1377,28 @@ export interface ActivityDateRangeOverride {
|
|
|
1251
1377
|
displayPostedBefore?: string | undefined;
|
|
1252
1378
|
}
|
|
1253
1379
|
|
|
1380
|
+
/**
|
|
1381
|
+
* Declared from the app's `Money`, referenced by a host-capability surface.
|
|
1382
|
+
*/
|
|
1383
|
+
export interface Money {
|
|
1384
|
+
/**
|
|
1385
|
+
* Three-letter ISO 4217 currency code, lowercase.
|
|
1386
|
+
*/
|
|
1387
|
+
currency: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* The amount in major units, as an exact decimal string — `"10.00"` is ten dollars. A string so no float rounds it in transit.
|
|
1390
|
+
*/
|
|
1391
|
+
amount: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* How many decimal places the amount CARRIES — the precision the charge itself runs at.
|
|
1394
|
+
*/
|
|
1395
|
+
decimals: number;
|
|
1396
|
+
/**
|
|
1397
|
+
* How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
|
|
1398
|
+
*/
|
|
1399
|
+
display_decimals: number;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1254
1402
|
/**
|
|
1255
1403
|
* Declared from the app's `LedgerActivity`, referenced by a host-capability surface.
|
|
1256
1404
|
*/
|
|
@@ -1263,7 +1411,7 @@ export interface LedgerActivity {
|
|
|
1263
1411
|
/**
|
|
1264
1412
|
* The ledger line category this activity was posted under.
|
|
1265
1413
|
*/
|
|
1266
|
-
line_type: "ad_budget_release" | "ad_campaign_budget" | "ad_publisher_payout" | "ad_publisher_payout_received" | "ad_spend_charge" | "affiliate_fee" | "airdrop" | "airdrop_link_created" | "airdrop_link_redeemed" | "airdrop_link_returned" | "airdrop_reversal" | "application_fee" | "application_fee_payout" | "bank_transfer" | "billing_percentage_fee" | "buyer_fee" | "card_spend_authorization" | "card_spend_authorization_void" | "card_spend_refund" | "company_referral" | "cross_border_percentage_fee" | "currency_conversion_incoming" | "currency_conversion_outgoing" | "dispute_alert_fee" | "dispute_hold_adjustment" | "dispute_representment_fee" | "fraud_prevention_fee" | "fx_percentage_fee" | "high_risk_merchant_fee" | "installment_default" | "internal_balance_transfer_incoming" | "internal_balance_transfer_outgoing" | "internal_withdrawal" | "internal_withdrawal_reversal" | "legacy_crypto_payment" | "legacy_payment" | "legacy_payment_refund" | "license_sale" | "license_sale_commission" | "license_sale_revenue" | "misc_purchase" | "misc_refund" | "misc_reversal" | "onchain_deposit" | "onchain_swap_target" | "onchain_wallet_transfer_incoming" | "onchain_wallet_transfer_outgoing" | "orchestration_percentage_fee" | "passthrough_gmv" | "payment_dispute" | "payment_dispute_adjustment" | "payment_dispute_fee" | "payment_dispute_reversal" | "payment_gross" | "payment_gross_reversal" | "payment_processing_fixed_fee" | "payment_processing_percentage_fee" | "payment_referral" | "payment_referral_reversal" | "payment_refund" | "payment_refund_reversal" | "payment_revshare" | "payment_revshare_payout" | "payment_revshare_refund" | "payment_revshare_reversal" | "payout_fee" | "platform_affiliate_payment" | "platform_affiliate_payment_reversal" | "platform_balance_payment" | "platform_balance_payment_refund" | "platform_balance_transfer_incoming" | "platform_balance_transfer_outgoing" | "platform_covered_dispute" | "promo_reversal" | "referral_bonus" | "resolution_center_refund" | "revshare_percentage_fee" | "sales_tax_fee" | "sales_tax_remittance" | "sales_tax_remittance_reversal" | "software_rental_revshare" | "software_rental_transaction" | "stripe_domestic_processing_fee" | "stripe_international_processing_fee" | "three_ds_fixed_fee" | "topup" | "topup_fee" | "topup_reversal" | "treasury_payin" | "whop_processing_fee" | "withdrawal" | "withdrawal_clawback" | "withdrawal_clawback_reversal" | "withdrawal_reclassification" | "withdrawal_reversal";
|
|
1414
|
+
line_type: "ad_budget_release" | "ad_campaign_budget" | "ad_publisher_payout" | "ad_publisher_payout_received" | "ad_spend_charge" | "affiliate_fee" | "airdrop" | "airdrop_link_created" | "airdrop_link_redeemed" | "airdrop_link_returned" | "airdrop_reversal" | "application_fee" | "application_fee_payout" | "balance_reservation" | "balance_reservation_reversal" | "bank_transfer" | "billing_percentage_fee" | "buyer_fee" | "card_spend_authorization" | "card_spend_authorization_void" | "card_spend_refund" | "company_referral" | "cross_border_percentage_fee" | "currency_conversion_incoming" | "currency_conversion_outgoing" | "dispute_alert_fee" | "dispute_hold_adjustment" | "dispute_representment_fee" | "fraud_prevention_fee" | "fx_percentage_fee" | "high_risk_merchant_fee" | "installment_default" | "internal_balance_transfer_incoming" | "internal_balance_transfer_outgoing" | "internal_withdrawal" | "internal_withdrawal_reversal" | "legacy_crypto_payment" | "legacy_payment" | "legacy_payment_refund" | "license_sale" | "license_sale_commission" | "license_sale_revenue" | "misc_purchase" | "misc_refund" | "misc_reversal" | "onchain_deposit" | "onchain_swap_target" | "onchain_wallet_transfer_incoming" | "onchain_wallet_transfer_outgoing" | "orchestration_percentage_fee" | "passthrough_gmv" | "payment_dispute" | "payment_dispute_adjustment" | "payment_dispute_fee" | "payment_dispute_reversal" | "payment_gross" | "payment_gross_reversal" | "payment_processing_fixed_fee" | "payment_processing_percentage_fee" | "payment_referral" | "payment_referral_reversal" | "payment_refund" | "payment_refund_reversal" | "payment_revshare" | "payment_revshare_payout" | "payment_revshare_refund" | "payment_revshare_reversal" | "payout_fee" | "platform_affiliate_payment" | "platform_affiliate_payment_reversal" | "platform_balance_payment" | "platform_balance_payment_refund" | "platform_balance_transfer_incoming" | "platform_balance_transfer_outgoing" | "platform_covered_dispute" | "promo_reversal" | "referral_bonus" | "resolution_center_refund" | "revshare_percentage_fee" | "sales_tax_fee" | "sales_tax_remittance" | "sales_tax_remittance_reversal" | "software_rental_revshare" | "software_rental_transaction" | "stripe_domestic_processing_fee" | "stripe_international_processing_fee" | "three_ds_fixed_fee" | "topup" | "topup_fee" | "topup_reversal" | "treasury_payin" | "whop_processing_fee" | "withdrawal" | "withdrawal_clawback" | "withdrawal_clawback_reversal" | "withdrawal_reclassification" | "withdrawal_reversal";
|
|
1267
1415
|
/**
|
|
1268
1416
|
* Signed amount in the currency's smallest precision units.
|
|
1269
1417
|
*/
|
|
@@ -1291,7 +1439,11 @@ export interface LedgerActivity {
|
|
|
1291
1439
|
/**
|
|
1292
1440
|
* Source of this ledger activity.
|
|
1293
1441
|
*/
|
|
1294
|
-
source: { object: string; id: string; status?: string | null | undefined; reason?: string | null | undefined; claim_url?: string | null | undefined; amount_float?: number | null | undefined; created_at?: string | null | undefined; estimated_arrival?: string | null | undefined; payer_name?: string | null | undefined; payout_token_nickname?: string | null | undefined; tx_hash?: string | null | undefined; sender_address?: string | null | undefined; chain?: string | null | undefined; from_amount?: string | null | undefined; from_currency?: string | null | undefined; to_amount?: string | null | undefined; to_currency?: string | null | undefined; payout_destination?: { payer_name?: string | null | undefined; icon_url?: string | null | undefined; } | null | undefined; [key: string]: unknown; } | null;
|
|
1442
|
+
source: { object: string; id: string; status?: string | null | undefined; payment_amount?: Money | null | undefined; payment_method_type?: string | null | undefined; payment_processor?: string | null | undefined; card_brand?: string | null | undefined; reason?: string | null | undefined; claim_url?: string | null | undefined; amount_float?: number | null | undefined; created_at?: string | null | undefined; estimated_arrival?: string | null | undefined; payer_name?: string | null | undefined; payout_token_nickname?: string | null | undefined; tx_hash?: string | null | undefined; sender_address?: string | null | undefined; chain?: string | null | undefined; from_amount?: string | null | undefined; from_currency?: string | null | undefined; to_amount?: string | null | undefined; to_currency?: string | null | undefined; payout_destination?: { payer_name?: string | null | undefined; icon_url?: string | null | undefined; } | null | undefined; [key: string]: unknown; } | null;
|
|
1443
|
+
/**
|
|
1444
|
+
* Payment related to this ledger activity. Included when rich resource hydration is enabled and the movement is tied to a payment.
|
|
1445
|
+
*/
|
|
1446
|
+
payment?: { object: "payment"; id: string; amount: Money | null; payment_method_type: string | null; payment_processor: string | null; card_brand: string | null; card_last4: string | null; created_at: string; } | null | undefined;
|
|
1295
1447
|
/**
|
|
1296
1448
|
* The viewer account that owns this row's ledger. Present only when the response aggregates owned accounts (include_owned_accounts=true); omitted otherwise.
|
|
1297
1449
|
*/
|