@paynow-gg/typescript-sdk 1.0.60 → 2.0.1
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/LICENSE +1 -1
- package/README.md +44 -5
- package/dist/cjs/generated/management/client.d.ts +895 -0
- package/dist/cjs/generated/management/client.d.ts.map +1 -0
- package/dist/cjs/generated/management/client.js +1568 -0
- package/dist/cjs/generated/management/client.js.map +1 -0
- package/dist/cjs/generated/management/types.d.ts +7566 -0
- package/dist/cjs/generated/management/types.d.ts.map +1 -0
- package/dist/cjs/generated/management/types.js +4 -0
- package/dist/cjs/generated/management/types.js.map +1 -0
- package/dist/cjs/generated/storefront/client.d.ts +229 -0
- package/dist/cjs/generated/storefront/client.d.ts.map +1 -0
- package/dist/cjs/generated/storefront/client.js +357 -0
- package/dist/cjs/generated/storefront/client.js.map +1 -0
- package/dist/cjs/generated/storefront/types.d.ts +3076 -0
- package/dist/cjs/generated/storefront/types.d.ts.map +1 -0
- package/dist/cjs/generated/storefront/types.js +4 -0
- package/dist/cjs/generated/storefront/types.js.map +1 -0
- package/dist/cjs/generated/webhooks/types.d.ts +3113 -0
- package/dist/cjs/generated/webhooks/types.d.ts.map +1 -0
- package/dist/cjs/generated/webhooks/types.js +4 -0
- package/dist/cjs/generated/webhooks/types.js.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/management.d.ts +3 -0
- package/dist/cjs/management.d.ts.map +1 -0
- package/dist/cjs/management.js +22 -0
- package/dist/cjs/management.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/runtime/errors.d.ts +18 -0
- package/dist/cjs/runtime/errors.d.ts.map +1 -0
- package/dist/cjs/runtime/errors.js +41 -0
- package/dist/cjs/runtime/errors.js.map +1 -0
- package/dist/cjs/runtime/http.d.ts +20 -0
- package/dist/cjs/runtime/http.d.ts.map +1 -0
- package/dist/cjs/runtime/http.js +121 -0
- package/dist/cjs/runtime/http.js.map +1 -0
- package/dist/cjs/runtime/options.d.ts +12 -0
- package/dist/cjs/runtime/options.d.ts.map +1 -0
- package/dist/{types.js → cjs/runtime/options.js} +1 -1
- package/dist/cjs/runtime/options.js.map +1 -0
- package/dist/cjs/storefront.d.ts +3 -0
- package/dist/cjs/storefront.d.ts.map +1 -0
- package/dist/cjs/storefront.js +22 -0
- package/dist/cjs/storefront.js.map +1 -0
- package/dist/cjs/webhooks.d.ts +2 -0
- package/dist/cjs/webhooks.d.ts.map +1 -0
- package/dist/cjs/webhooks.js +18 -0
- package/dist/cjs/webhooks.js.map +1 -0
- package/dist/esm/generated/management/client.d.ts +895 -0
- package/dist/esm/generated/management/client.d.ts.map +1 -0
- package/dist/esm/generated/management/client.js +1531 -0
- package/dist/esm/generated/management/client.js.map +1 -0
- package/dist/esm/generated/management/types.d.ts +7566 -0
- package/dist/esm/generated/management/types.d.ts.map +1 -0
- package/dist/esm/generated/management/types.js +3 -0
- package/dist/esm/generated/management/types.js.map +1 -0
- package/dist/esm/generated/storefront/client.d.ts +229 -0
- package/dist/esm/generated/storefront/client.d.ts.map +1 -0
- package/dist/esm/generated/storefront/client.js +340 -0
- package/dist/esm/generated/storefront/client.js.map +1 -0
- package/dist/esm/generated/storefront/types.d.ts +3076 -0
- package/dist/esm/generated/storefront/types.d.ts.map +1 -0
- package/dist/esm/generated/storefront/types.js +3 -0
- package/dist/esm/generated/storefront/types.js.map +1 -0
- package/dist/esm/generated/webhooks/types.d.ts +3113 -0
- package/dist/esm/generated/webhooks/types.d.ts.map +1 -0
- package/dist/esm/generated/webhooks/types.js +3 -0
- package/dist/esm/generated/webhooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/management.d.ts +3 -0
- package/dist/esm/management.d.ts.map +1 -0
- package/dist/esm/management.js +3 -0
- package/dist/esm/management.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/runtime/errors.d.ts +18 -0
- package/dist/esm/runtime/errors.d.ts.map +1 -0
- package/dist/esm/runtime/errors.js +36 -0
- package/dist/esm/runtime/errors.js.map +1 -0
- package/dist/esm/runtime/http.d.ts +20 -0
- package/dist/esm/runtime/http.d.ts.map +1 -0
- package/dist/esm/runtime/http.js +117 -0
- package/dist/esm/runtime/http.js.map +1 -0
- package/dist/esm/runtime/options.d.ts +12 -0
- package/dist/esm/runtime/options.d.ts.map +1 -0
- package/dist/esm/runtime/options.js +2 -0
- package/dist/esm/runtime/options.js.map +1 -0
- package/dist/esm/storefront.d.ts +3 -0
- package/dist/esm/storefront.d.ts.map +1 -0
- package/dist/esm/storefront.js +3 -0
- package/dist/esm/storefront.js.map +1 -0
- package/dist/esm/webhooks.d.ts +2 -0
- package/dist/esm/webhooks.d.ts.map +1 -0
- package/dist/esm/webhooks.js +2 -0
- package/dist/esm/webhooks.js.map +1 -0
- package/package.json +74 -15
- package/dist/client.d.ts +0 -73
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -55
- package/dist/client.js.map +0 -1
- package/dist/errors.d.ts +0 -7
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -14
- package/dist/errors.js.map +0 -1
- package/dist/generate.d.ts +0 -2
- package/dist/generate.d.ts.map +0 -1
- package/dist/generate.js +0 -102
- package/dist/generate.js.map +0 -1
- package/dist/generated/management.d.ts +0 -12769
- package/dist/generated/management.d.ts.map +0 -1
- package/dist/generated/management.js +0 -638
- package/dist/generated/management.js.map +0 -1
- package/dist/generated/storefront.d.ts +0 -3462
- package/dist/generated/storefront.d.ts.map +0 -1
- package/dist/generated/storefront.js +0 -90
- package/dist/generated/storefront.js.map +0 -1
- package/dist/generated/webhooks.d.ts +0 -3659
- package/dist/generated/webhooks.d.ts.map +0 -1
- package/dist/generated/webhooks.js +0 -5
- package/dist/generated/webhooks.js.map +0 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -10
- package/dist/index.js.map +0 -1
- package/dist/management.d.ts +0 -7
- package/dist/management.d.ts.map +0 -1
- package/dist/management.js +0 -12
- package/dist/management.js.map +0 -1
- package/dist/storefront.d.ts +0 -7
- package/dist/storefront.d.ts.map +0 -1
- package/dist/storefront.js +0 -13
- package/dist/storefront.js.map +0 -1
- package/dist/types.d.ts +0 -12
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,3076 @@
|
|
|
1
|
+
export interface ActorDto {
|
|
2
|
+
type: PayNowActorType;
|
|
3
|
+
id?: FlakeId;
|
|
4
|
+
}
|
|
5
|
+
export interface AuthenticateStorefrontCustomerRequestDto {
|
|
6
|
+
platform: CustomerProfilePlatform;
|
|
7
|
+
/**
|
|
8
|
+
* The account ID on the platform
|
|
9
|
+
* @example "76561198152492642"
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthenticateStorefrontCustomerResponseDto {
|
|
14
|
+
/**
|
|
15
|
+
* The token for the Customer
|
|
16
|
+
*/
|
|
17
|
+
customer_token: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Request headers
|
|
21
|
+
*/
|
|
22
|
+
export type CartAddLineHeaders = {
|
|
23
|
+
/**
|
|
24
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
25
|
+
* @format ipv4
|
|
26
|
+
*/
|
|
27
|
+
"x-paynow-customer-ip"?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
30
|
+
* @pattern ^[A-Z]{2}$
|
|
31
|
+
*/
|
|
32
|
+
"x-paynow-customer-countrycode"?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Query parameters
|
|
36
|
+
*/
|
|
37
|
+
export type CartAddLineQuery = {
|
|
38
|
+
/**
|
|
39
|
+
* The ID of the product that should be added to the cart.
|
|
40
|
+
*/
|
|
41
|
+
product_id: FlakeId;
|
|
42
|
+
/**
|
|
43
|
+
* The quantity to set or increment.
|
|
44
|
+
* @format int32
|
|
45
|
+
*/
|
|
46
|
+
quantity?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Set to either '1' or 'true' to store as a subscription line item.
|
|
49
|
+
*/
|
|
50
|
+
subscription?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Set to either '1' or 'true' to indicate if the line should be trialed.
|
|
53
|
+
*/
|
|
54
|
+
trial?: string;
|
|
55
|
+
/**
|
|
56
|
+
* A game server ID, required if single_game_server_only is enabled for the product.
|
|
57
|
+
*/
|
|
58
|
+
gameserver_id?: FlakeId;
|
|
59
|
+
/**
|
|
60
|
+
* Set to either '1' or 'true' to increment (add quantity instead of setting).
|
|
61
|
+
*/
|
|
62
|
+
increment?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Dictionary of product custom variables where each entry consists of a string key (identifier)
|
|
65
|
+
* and its corresponding selected value. Use the following URL parameter format:
|
|
66
|
+
* ?custom_variables[IDENTIFIER]=VALUE
|
|
67
|
+
*/
|
|
68
|
+
custom_variables?: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* The ID of the customer in which this line is a gift for.
|
|
71
|
+
*/
|
|
72
|
+
gift_to_customer_id?: FlakeId;
|
|
73
|
+
/**
|
|
74
|
+
* The platform type
|
|
75
|
+
*/
|
|
76
|
+
"gift_to.platform"?: CustomerProfilePlatform;
|
|
77
|
+
/**
|
|
78
|
+
* The account ID on the platform
|
|
79
|
+
* @example "76561198152492642"
|
|
80
|
+
*/
|
|
81
|
+
"gift_to.id"?: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Request headers
|
|
85
|
+
*/
|
|
86
|
+
export type CartClearCartHeaders = {
|
|
87
|
+
/**
|
|
88
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
89
|
+
* @format ipv4
|
|
90
|
+
*/
|
|
91
|
+
"x-paynow-customer-ip"?: string;
|
|
92
|
+
/**
|
|
93
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
94
|
+
* @pattern ^[A-Z]{2}$
|
|
95
|
+
*/
|
|
96
|
+
"x-paynow-customer-countrycode"?: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Request headers
|
|
100
|
+
*/
|
|
101
|
+
export type CartCreateCartCheckoutHeaders = {
|
|
102
|
+
/**
|
|
103
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
104
|
+
* @format ipv4
|
|
105
|
+
*/
|
|
106
|
+
"x-paynow-customer-ip"?: string;
|
|
107
|
+
/**
|
|
108
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
109
|
+
* @pattern ^[A-Z]{2}$
|
|
110
|
+
*/
|
|
111
|
+
"x-paynow-customer-countrycode"?: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Represents a customer's shopping cart
|
|
115
|
+
*/
|
|
116
|
+
export interface CartDto {
|
|
117
|
+
store_id: FlakeId;
|
|
118
|
+
customer_id: FlakeId;
|
|
119
|
+
/**
|
|
120
|
+
* The line items in the cart
|
|
121
|
+
*/
|
|
122
|
+
lines: Array<CartLineDto>;
|
|
123
|
+
/**
|
|
124
|
+
* The total price of all items in the cart in the smallest currency unit (e.g., cents)
|
|
125
|
+
* @format int64
|
|
126
|
+
*/
|
|
127
|
+
total: number;
|
|
128
|
+
/**
|
|
129
|
+
* The currency code (e.g., usd, eur, gbp)
|
|
130
|
+
*/
|
|
131
|
+
currency: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Request headers
|
|
135
|
+
*/
|
|
136
|
+
export type CartGetCartHeaders = {
|
|
137
|
+
/**
|
|
138
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
139
|
+
* @format ipv4
|
|
140
|
+
*/
|
|
141
|
+
"x-paynow-customer-ip"?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
144
|
+
* @pattern ^[A-Z]{2}$
|
|
145
|
+
*/
|
|
146
|
+
"x-paynow-customer-countrycode"?: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Query parameters
|
|
150
|
+
*/
|
|
151
|
+
export type CartGetCartQuery = {
|
|
152
|
+
/**
|
|
153
|
+
* The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) to display prices in. If not provided, the store's default currency will be used.
|
|
154
|
+
*/
|
|
155
|
+
currency?: string;
|
|
156
|
+
};
|
|
157
|
+
export interface CartLineCustomVariableDto {
|
|
158
|
+
id: FlakeId;
|
|
159
|
+
/**
|
|
160
|
+
* The display name of the custom variable
|
|
161
|
+
*/
|
|
162
|
+
name: string;
|
|
163
|
+
/**
|
|
164
|
+
* The unique identifier string for the custom variable
|
|
165
|
+
*/
|
|
166
|
+
identifier: string;
|
|
167
|
+
/**
|
|
168
|
+
* The description of the custom variable
|
|
169
|
+
*/
|
|
170
|
+
description: string;
|
|
171
|
+
type: CustomVariableType;
|
|
172
|
+
/**
|
|
173
|
+
* The selected value of the custom variable
|
|
174
|
+
*/
|
|
175
|
+
value: string;
|
|
176
|
+
/**
|
|
177
|
+
* The collection of available options for this custom variable. Only present for dropdown type
|
|
178
|
+
*/
|
|
179
|
+
options: Array<StorefrontCustomVariableOptionDto>;
|
|
180
|
+
selected_option?: StorefrontCustomVariableOptionDto;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Represents a line item in a cart
|
|
184
|
+
*/
|
|
185
|
+
export interface CartLineDto {
|
|
186
|
+
/**
|
|
187
|
+
* The unique key for this line item
|
|
188
|
+
*/
|
|
189
|
+
line_key: string;
|
|
190
|
+
product_id: FlakeId;
|
|
191
|
+
/**
|
|
192
|
+
* The name of the product
|
|
193
|
+
*/
|
|
194
|
+
name: string;
|
|
195
|
+
/**
|
|
196
|
+
* The slug of the product
|
|
197
|
+
*/
|
|
198
|
+
slug: string;
|
|
199
|
+
/**
|
|
200
|
+
* The price of the product in the smallest currency unit (e.g., cents)
|
|
201
|
+
* @format int64
|
|
202
|
+
*/
|
|
203
|
+
price: number;
|
|
204
|
+
/**
|
|
205
|
+
* The quantity of this product in the cart
|
|
206
|
+
* @format int32
|
|
207
|
+
*/
|
|
208
|
+
quantity: number;
|
|
209
|
+
/**
|
|
210
|
+
* Indicates whether this line item should be a subscription
|
|
211
|
+
*/
|
|
212
|
+
subscription: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Indicates whether this line will be trialied by the customer.
|
|
215
|
+
*/
|
|
216
|
+
trial: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* The URL to the product image
|
|
219
|
+
*/
|
|
220
|
+
image_url?: string | null;
|
|
221
|
+
selected_gameserver_id?: FlakeId;
|
|
222
|
+
selected_gameserver?: StorefrontGameServerDto;
|
|
223
|
+
pricing: StorefrontProductPricingDto;
|
|
224
|
+
/**
|
|
225
|
+
* Selected custom variables for this cart line.
|
|
226
|
+
*/
|
|
227
|
+
custom_variables: Array<CartLineCustomVariableDto>;
|
|
228
|
+
gift_to_customer?: StorefrontCustomerDto;
|
|
229
|
+
gift_to_customer_id?: FlakeId;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Request headers
|
|
233
|
+
*/
|
|
234
|
+
export type CheckoutCreateCheckoutSessionHeaders = {
|
|
235
|
+
/**
|
|
236
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
237
|
+
* @format ipv4
|
|
238
|
+
*/
|
|
239
|
+
"x-paynow-customer-ip"?: string;
|
|
240
|
+
/**
|
|
241
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
242
|
+
* @pattern ^[A-Z]{2}$
|
|
243
|
+
*/
|
|
244
|
+
"x-paynow-customer-countrycode"?: string;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Payment outcome information returned after a subscription change triggers an immediate charge.
|
|
248
|
+
*/
|
|
249
|
+
export interface CheckoutPaymentInfoDto {
|
|
250
|
+
/**
|
|
251
|
+
* Status string from the payment provider.
|
|
252
|
+
*/
|
|
253
|
+
status: string;
|
|
254
|
+
/**
|
|
255
|
+
* Indicates whether the payment was declined.
|
|
256
|
+
*/
|
|
257
|
+
declined: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* The customer readable decline reason, if the payment was declined.
|
|
260
|
+
*/
|
|
261
|
+
decline_message?: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* Checkout URL to redirect to for on-session payments.
|
|
264
|
+
*/
|
|
265
|
+
checkout_url?: string | null;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Request to create a new checkout session from a cart
|
|
269
|
+
*/
|
|
270
|
+
export interface CreateCartCheckoutSessionDto {
|
|
271
|
+
coupon_id?: FlakeId;
|
|
272
|
+
/**
|
|
273
|
+
* Optional array of promo codes (coupons, gift cards, affiliates) to apply.
|
|
274
|
+
* An invalid promo code will cause an error.
|
|
275
|
+
*/
|
|
276
|
+
promo_codes?: Array<string> | null;
|
|
277
|
+
/**
|
|
278
|
+
* Optional affiliate code to track referrals.
|
|
279
|
+
* An invalid affiliate code will NOT cause an error.
|
|
280
|
+
*/
|
|
281
|
+
affiliate_code?: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* Optional URL to redirect to after successful checkout
|
|
284
|
+
*/
|
|
285
|
+
return_url?: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* Optional URL to redirect to if checkout is canceled
|
|
288
|
+
*/
|
|
289
|
+
cancel_url?: string | null;
|
|
290
|
+
/**
|
|
291
|
+
* Whether to automatically redirect the customer (return_url must be set)
|
|
292
|
+
*/
|
|
293
|
+
auto_redirect?: boolean | null;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Represents a line item in a checkout session request
|
|
297
|
+
*/
|
|
298
|
+
export interface CreateCheckoutSessionLineDto {
|
|
299
|
+
product_id: FlakeId;
|
|
300
|
+
/**
|
|
301
|
+
* Determines whether this line should create a subscription
|
|
302
|
+
*/
|
|
303
|
+
subscription?: boolean | null;
|
|
304
|
+
/**
|
|
305
|
+
* Indicates whether the product should be trialed
|
|
306
|
+
*/
|
|
307
|
+
trial?: boolean | null;
|
|
308
|
+
gift_to?: CustomerPlatformAccountDto;
|
|
309
|
+
gift_to_customer_id?: FlakeId;
|
|
310
|
+
/**
|
|
311
|
+
* The quantity of this product to purchase
|
|
312
|
+
* @format int32
|
|
313
|
+
*/
|
|
314
|
+
quantity: number;
|
|
315
|
+
selected_gameserver_id?: FlakeId;
|
|
316
|
+
/**
|
|
317
|
+
* Key-value pair mapping custom variable identifiers to their selected values.
|
|
318
|
+
* Required only when the product includes custom variables.
|
|
319
|
+
*/
|
|
320
|
+
custom_variables?: Record<string, string> | null;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Request to create a new checkout session
|
|
324
|
+
*/
|
|
325
|
+
export interface CreateCheckoutSessionRequestDto {
|
|
326
|
+
/**
|
|
327
|
+
* The line items to include in the checkout.
|
|
328
|
+
*/
|
|
329
|
+
lines: Array<CreateCheckoutSessionLineDto>;
|
|
330
|
+
coupon_id?: FlakeId;
|
|
331
|
+
/**
|
|
332
|
+
* Optional array of promo codes (coupons, gift cards, affiliates) to apply.
|
|
333
|
+
* An invalid promo code will cause an error.
|
|
334
|
+
*/
|
|
335
|
+
promo_codes?: Array<string> | null;
|
|
336
|
+
/**
|
|
337
|
+
* Optional affiliate code to track referrals.
|
|
338
|
+
* An invalid affiliate code will NOT cause an error.
|
|
339
|
+
*/
|
|
340
|
+
affiliate_code?: string | null;
|
|
341
|
+
/**
|
|
342
|
+
* Optional URL to redirect to after successful checkout
|
|
343
|
+
*/
|
|
344
|
+
return_url?: string | null;
|
|
345
|
+
/**
|
|
346
|
+
* Optional URL to redirect to if checkout is canceled
|
|
347
|
+
*/
|
|
348
|
+
cancel_url?: string | null;
|
|
349
|
+
/**
|
|
350
|
+
* Whether to automatically redirect the customer (return_url must be set)
|
|
351
|
+
*/
|
|
352
|
+
auto_redirect?: boolean | null;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Response after creating a checkout session
|
|
356
|
+
*/
|
|
357
|
+
export interface CreateCheckoutSessionResponseDto {
|
|
358
|
+
id: FlakeId;
|
|
359
|
+
/**
|
|
360
|
+
* The token for the checkout session
|
|
361
|
+
*/
|
|
362
|
+
token: string;
|
|
363
|
+
/**
|
|
364
|
+
* The URL to redirect the customer to complete checkout
|
|
365
|
+
*/
|
|
366
|
+
url: string;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Request headers
|
|
370
|
+
*/
|
|
371
|
+
export type CustomerAuthenticateStorefrontCustomerHeaders = {
|
|
372
|
+
/**
|
|
373
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
374
|
+
* @format ipv4
|
|
375
|
+
*/
|
|
376
|
+
"x-paynow-customer-ip"?: string;
|
|
377
|
+
/**
|
|
378
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
379
|
+
* @pattern ^[A-Z]{2}$
|
|
380
|
+
*/
|
|
381
|
+
"x-paynow-customer-countrycode"?: string;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Represents a customer in the PayNow system with their associated profiles and metadata.
|
|
385
|
+
*/
|
|
386
|
+
export interface CustomerDto {
|
|
387
|
+
id: FlakeId;
|
|
388
|
+
store_id: FlakeId;
|
|
389
|
+
profile?: CustomerGenericProfileDto;
|
|
390
|
+
steam_id?: SteamId;
|
|
391
|
+
steam?: CustomerSteamProfileDto;
|
|
392
|
+
/**
|
|
393
|
+
* The customer's Minecraft UUID, if they have linked their Minecraft account.
|
|
394
|
+
* Not set for offline Minecraft stores. If the platform type is Minecraft - Geyser,
|
|
395
|
+
* and the profile is a bedrock account, this will be a UUID generated from the Xbox XUID.
|
|
396
|
+
* @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
|
|
397
|
+
*/
|
|
398
|
+
minecraft_uuid?: string | null;
|
|
399
|
+
minecraft?: CustomerMinecraftProfileDto;
|
|
400
|
+
/**
|
|
401
|
+
* The customer's Xbox XUID, if available.
|
|
402
|
+
*/
|
|
403
|
+
xbox_xuid?: string | null;
|
|
404
|
+
minecraft_platform?: CustomerMinecraftPlatform;
|
|
405
|
+
/**
|
|
406
|
+
* The display name for the customer.
|
|
407
|
+
* @example "m0uka"
|
|
408
|
+
*/
|
|
409
|
+
name?: string | null;
|
|
410
|
+
/**
|
|
411
|
+
* The date and time when the customer was created in the system.
|
|
412
|
+
* @format date-time
|
|
413
|
+
*/
|
|
414
|
+
created_at: string;
|
|
415
|
+
/**
|
|
416
|
+
* The date and time when the customer was last updated, if applicable.
|
|
417
|
+
* @format date-time
|
|
418
|
+
*/
|
|
419
|
+
updated_at?: string | null;
|
|
420
|
+
/**
|
|
421
|
+
* Additional custom data associated with the customer.
|
|
422
|
+
*/
|
|
423
|
+
metadata: Record<string, string>;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Represents a generic platform profile for a customer.
|
|
427
|
+
*/
|
|
428
|
+
export interface CustomerGenericProfileDto {
|
|
429
|
+
/**
|
|
430
|
+
* The platform-specific identifier for the profile.
|
|
431
|
+
*/
|
|
432
|
+
id: string;
|
|
433
|
+
/**
|
|
434
|
+
* The name of the platform this profile belongs to.
|
|
435
|
+
* @example "steam"
|
|
436
|
+
*/
|
|
437
|
+
platform: string;
|
|
438
|
+
/**
|
|
439
|
+
* The display name of the user on this platform.
|
|
440
|
+
*/
|
|
441
|
+
name: string;
|
|
442
|
+
/**
|
|
443
|
+
* The URL to the user's avatar image on this platform.
|
|
444
|
+
*/
|
|
445
|
+
avatar_url?: string | null;
|
|
446
|
+
}
|
|
447
|
+
export type CustomerMinecraftPlatform = "unknown" | "java" | "bedrock";
|
|
448
|
+
/**
|
|
449
|
+
* Represents a Minecraft profile for a customer.
|
|
450
|
+
*/
|
|
451
|
+
export interface CustomerMinecraftProfileDto {
|
|
452
|
+
/**
|
|
453
|
+
* The UUID of the Minecraft player.
|
|
454
|
+
* If the platform is Minecraft Offline, this will be the name itself.
|
|
455
|
+
* If the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID.
|
|
456
|
+
* @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
|
|
457
|
+
*/
|
|
458
|
+
id: string;
|
|
459
|
+
/**
|
|
460
|
+
* The username of the Minecraft player.
|
|
461
|
+
* @example "notch"
|
|
462
|
+
*/
|
|
463
|
+
name: string;
|
|
464
|
+
/**
|
|
465
|
+
* The URL to the player's Minecraft skin rendered as an avatar.
|
|
466
|
+
*/
|
|
467
|
+
avatar_url: string;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Represents a customer platform association, used for gifting
|
|
471
|
+
*/
|
|
472
|
+
export interface CustomerPlatformAccountDto {
|
|
473
|
+
platform: CustomerProfilePlatform;
|
|
474
|
+
/**
|
|
475
|
+
* The account ID on the platform
|
|
476
|
+
* @example "76561198152492642"
|
|
477
|
+
*/
|
|
478
|
+
id: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* - `steam`: Steam profile platform - the ID param must be a Steam ID 64.
|
|
482
|
+
* - `minecraft`: Minecraft profile platform - the ID param must be a Minecraft nick.
|
|
483
|
+
If your store platform is Geyser, this automatically sets the Minecraft platform based on the prefix configured in store settings.
|
|
484
|
+
* - `paynow_name`: PayNow name profile platform - the ID param must be a PayNow username.
|
|
485
|
+
* - `paynow`: PayNow name profile platform - the ID param must be a PayNow username.
|
|
486
|
+
* - `minecraft_java_name`: Minecraft Java Profile Platform - the ID param must be a Java minecraft nick.
|
|
487
|
+
* - `minecraft_bedrock_name`: Minecraft Bedrock Profile Platform - the ID param must be a Bedrock minecraft nick.
|
|
488
|
+
* - `xbox_xuid`: Minecraft Xbox XUID Profile Platform - the ID param must be an xbox xuid
|
|
489
|
+
* - `minecraft_uuid`: Minecraft profile platform - the ID param must be a Minecraft UUID.
|
|
490
|
+
*/
|
|
491
|
+
export type CustomerProfilePlatform = "invalid" | "steam" | "minecraft" | "paynow_name" | "paynow" | "minecraft_java_name" | "minecraft_bedrock_name" | "xbox_xuid" | "minecraft_uuid";
|
|
492
|
+
/**
|
|
493
|
+
* Represents a Steam profile for a customer.
|
|
494
|
+
*/
|
|
495
|
+
export interface CustomerSteamProfileDto {
|
|
496
|
+
id: SteamId;
|
|
497
|
+
/**
|
|
498
|
+
* The display name of the user on Steam.
|
|
499
|
+
*/
|
|
500
|
+
name: string;
|
|
501
|
+
/**
|
|
502
|
+
* The URL to the user's Steam avatar image.
|
|
503
|
+
*/
|
|
504
|
+
avatar_url: string;
|
|
505
|
+
}
|
|
506
|
+
export interface CustomerTierGroupDto {
|
|
507
|
+
tier_group_id: FlakeId;
|
|
508
|
+
active_product_id: FlakeId;
|
|
509
|
+
pending_change_product_id?: FlakeId;
|
|
510
|
+
/**
|
|
511
|
+
* The date and time of the next subscription renewal for this tier group.
|
|
512
|
+
* @format date-time
|
|
513
|
+
*/
|
|
514
|
+
next_renewal_at: string;
|
|
515
|
+
/**
|
|
516
|
+
* The next billing amount in the smallest currency unit (e.g., cents) in the settlement currency.
|
|
517
|
+
* @format int64
|
|
518
|
+
*/
|
|
519
|
+
next_billing_amount: number;
|
|
520
|
+
/**
|
|
521
|
+
* The next billing amount in the smallest currency unit (e.g., cents) in the customer-facing presentment currency.
|
|
522
|
+
* @format int64
|
|
523
|
+
*/
|
|
524
|
+
next_billing_presentment_amount: number;
|
|
525
|
+
/**
|
|
526
|
+
* The settlement currency code (e.g., "usd").
|
|
527
|
+
*/
|
|
528
|
+
currency: string;
|
|
529
|
+
/**
|
|
530
|
+
* The customer-facing presentment currency code (e.g., "eur").
|
|
531
|
+
*/
|
|
532
|
+
presentment_currency: string;
|
|
533
|
+
}
|
|
534
|
+
export interface CustomVariableLineItemDto {
|
|
535
|
+
id: FlakeId;
|
|
536
|
+
/**
|
|
537
|
+
* The identifier used to reference this custom variable (e.g., "color", "size").
|
|
538
|
+
*/
|
|
539
|
+
identifier: string;
|
|
540
|
+
/**
|
|
541
|
+
* The display name of the custom variable shown to users.
|
|
542
|
+
*/
|
|
543
|
+
name: string;
|
|
544
|
+
/**
|
|
545
|
+
* A detailed description of what this custom variable represents.
|
|
546
|
+
*/
|
|
547
|
+
description: string;
|
|
548
|
+
/**
|
|
549
|
+
* The price associated with this custom variable in the smallest currency unit (e.g., cents).
|
|
550
|
+
* @format int64
|
|
551
|
+
*/
|
|
552
|
+
price: number;
|
|
553
|
+
/**
|
|
554
|
+
* The selected value for this custom variable.
|
|
555
|
+
*/
|
|
556
|
+
value: string;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Defines the type of input method for a custom variable.
|
|
560
|
+
* - `dropdown`: Dropdown selection with predefined options.
|
|
561
|
+
Customers choose from a list of available options.
|
|
562
|
+
Allows for additional pricing based on the selected entry.
|
|
563
|
+
* - `text`: Free-form text input.
|
|
564
|
+
Customers can enter any text value (subject to validation).
|
|
565
|
+
* - `number`: Numeric input.
|
|
566
|
+
Customers can enter numeric values (subject to validation).
|
|
567
|
+
*/
|
|
568
|
+
export type CustomVariableType = "dropdown" | "text" | "number";
|
|
569
|
+
/**
|
|
570
|
+
* Query parameters
|
|
571
|
+
*/
|
|
572
|
+
export type DeliveryGetStorefrontCustomerDeliveryItemsQuery = {
|
|
573
|
+
/**
|
|
574
|
+
* The maximum number of items to return in a single request.
|
|
575
|
+
* @format int32
|
|
576
|
+
* @minimum 1
|
|
577
|
+
* @maximum 100
|
|
578
|
+
*/
|
|
579
|
+
limit?: number;
|
|
580
|
+
/**
|
|
581
|
+
* Returns items after the specified ID.
|
|
582
|
+
* Used for forward pagination through results.
|
|
583
|
+
*/
|
|
584
|
+
after?: FlakeId;
|
|
585
|
+
/**
|
|
586
|
+
* Returns items before the specified ID.
|
|
587
|
+
* Used for backward pagination through results.
|
|
588
|
+
*/
|
|
589
|
+
before?: FlakeId;
|
|
590
|
+
/**
|
|
591
|
+
* Determines the sort order of returned items.
|
|
592
|
+
* When true, items are returned in ascending order.
|
|
593
|
+
* When false, items are returned in descending order.
|
|
594
|
+
*/
|
|
595
|
+
asc?: boolean;
|
|
596
|
+
};
|
|
597
|
+
/**
|
|
598
|
+
* Represents the product information for a delivery item
|
|
599
|
+
*/
|
|
600
|
+
export interface DeliveryItemProductDto {
|
|
601
|
+
id: FlakeId;
|
|
602
|
+
/**
|
|
603
|
+
* The name of the product
|
|
604
|
+
* @example "Premium Membership"
|
|
605
|
+
*/
|
|
606
|
+
name: string;
|
|
607
|
+
/**
|
|
608
|
+
* The URL-friendly slug of the product
|
|
609
|
+
* @example "premium-membership"
|
|
610
|
+
*/
|
|
611
|
+
slug: string;
|
|
612
|
+
/**
|
|
613
|
+
* The version identifier of the product
|
|
614
|
+
* @example "v2.1.0"
|
|
615
|
+
*/
|
|
616
|
+
version_id: string;
|
|
617
|
+
}
|
|
618
|
+
export type DeliveryItemStateDto = "usable" | "active" | "used" | "revoked" | "renewed";
|
|
619
|
+
/**
|
|
620
|
+
* Query parameters
|
|
621
|
+
*/
|
|
622
|
+
export type DiscordDoProductsHaveDiscordActionsQuery = {
|
|
623
|
+
product_version_id?: Array<FlakeId>;
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* @format flake-id
|
|
627
|
+
* @example "411486491630370816"
|
|
628
|
+
*/
|
|
629
|
+
export type FlakeId = string;
|
|
630
|
+
/**
|
|
631
|
+
* Query parameters
|
|
632
|
+
*/
|
|
633
|
+
export type OrdersGetOrdersQuery = {
|
|
634
|
+
/**
|
|
635
|
+
* The maximum number of items to return in a single request.
|
|
636
|
+
* @format int32
|
|
637
|
+
* @minimum 1
|
|
638
|
+
* @maximum 100
|
|
639
|
+
*/
|
|
640
|
+
limit?: number;
|
|
641
|
+
/**
|
|
642
|
+
* Returns items after the specified ID.
|
|
643
|
+
* Used for forward pagination through results.
|
|
644
|
+
*/
|
|
645
|
+
after?: FlakeId;
|
|
646
|
+
/**
|
|
647
|
+
* Returns items before the specified ID.
|
|
648
|
+
* Used for backward pagination through results.
|
|
649
|
+
*/
|
|
650
|
+
before?: FlakeId;
|
|
651
|
+
/**
|
|
652
|
+
* Determines the sort order of returned items.
|
|
653
|
+
* When true, items are returned in ascending order.
|
|
654
|
+
* When false, items are returned in descending order.
|
|
655
|
+
*/
|
|
656
|
+
asc?: boolean;
|
|
657
|
+
};
|
|
658
|
+
export type OrderStatus = "created" | "completed" | "canceled" | "refunded" | "chargeback";
|
|
659
|
+
/**
|
|
660
|
+
* Defines the type of items contained in an order
|
|
661
|
+
* - `one_time`: Order contains only one-time purchase items
|
|
662
|
+
* - `subscription_initial`: Order is the initial charge for a subscription
|
|
663
|
+
* - `subscription_renewal`: Order is a recurring renewal charge for a subscription
|
|
664
|
+
* - `subscription_proration`: Order is a proration charge for a subscription
|
|
665
|
+
* - `mixed`: Order contains both one-time purchase and subscription items
|
|
666
|
+
*/
|
|
667
|
+
export type OrderType = "one_time" | "subscription_initial" | "subscription_renewal" | "subscription_proration" | "mixed";
|
|
668
|
+
export type PayNowActorType = "anonymous" | "user" | "api_key" | "customer" | "game_server" | "internal" | "admin" | "platform" | "global_customer";
|
|
669
|
+
/**
|
|
670
|
+
* Represents a PayNow error
|
|
671
|
+
*/
|
|
672
|
+
export interface PayNowError {
|
|
673
|
+
/**
|
|
674
|
+
* The HTTP status code.
|
|
675
|
+
* @format int32
|
|
676
|
+
* @example 400
|
|
677
|
+
*/
|
|
678
|
+
status: number;
|
|
679
|
+
/**
|
|
680
|
+
* The PayNow parseable error code.
|
|
681
|
+
* @example "bad-request"
|
|
682
|
+
*/
|
|
683
|
+
code: string;
|
|
684
|
+
/**
|
|
685
|
+
* The human-readable error message.
|
|
686
|
+
* @example "Bad Request Example"
|
|
687
|
+
*/
|
|
688
|
+
message: string;
|
|
689
|
+
/**
|
|
690
|
+
* A distributed trace ID used for debugging.
|
|
691
|
+
* @example "234a5bcd543ef3fa53ce929d0e0e4736"
|
|
692
|
+
*/
|
|
693
|
+
trace_id?: string | null;
|
|
694
|
+
/**
|
|
695
|
+
* An array of multiple errors. Only used by some API services.
|
|
696
|
+
*/
|
|
697
|
+
errors?: Array<ValidationError> | null;
|
|
698
|
+
}
|
|
699
|
+
export type PlatformCapability = "invalid" | "connected_users";
|
|
700
|
+
export interface PlatformStoreTypeAssociationDetailsDto {
|
|
701
|
+
platform_id: FlakeId;
|
|
702
|
+
associated_platform?: PublicPlatformDto;
|
|
703
|
+
/**
|
|
704
|
+
* The store platform identifier string (e.g. "rust", "minecraft").
|
|
705
|
+
*/
|
|
706
|
+
store_platform: string;
|
|
707
|
+
/**
|
|
708
|
+
* Overrides the default PayNow platform fee percentage for this association.
|
|
709
|
+
* Expressed in basis points (e.g. 250 = 2.50%).
|
|
710
|
+
* @format int64
|
|
711
|
+
*/
|
|
712
|
+
paynow_platform_fee_percentage_override?: number | null;
|
|
713
|
+
/**
|
|
714
|
+
* The fee percentage charged by the connected platform.
|
|
715
|
+
* Expressed in basis points (e.g. 250 = 2.50%).
|
|
716
|
+
* @format int64
|
|
717
|
+
*/
|
|
718
|
+
connected_platform_fee_percentage?: number | null;
|
|
719
|
+
connected_platform_wallet_id?: FlakeId;
|
|
720
|
+
/**
|
|
721
|
+
* When true, billing plans are disabled for this platform/store type combination.
|
|
722
|
+
*/
|
|
723
|
+
disable_billing_plans: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* When true, legal or compliance disclaimers should be displayed to the end user.
|
|
726
|
+
*/
|
|
727
|
+
display_disclaimers: boolean;
|
|
728
|
+
/**
|
|
729
|
+
* Whether the management hides some PayNow UI
|
|
730
|
+
*/
|
|
731
|
+
full_external_management: boolean;
|
|
732
|
+
}
|
|
733
|
+
export type PlatformType = "invalid" | "marketplace" | "store_platform" | "other";
|
|
734
|
+
export interface ProductDeliverableActionsDto {
|
|
735
|
+
/**
|
|
736
|
+
* Value indicating whether to grant a giftcard with the product with the subtotal amount.
|
|
737
|
+
*/
|
|
738
|
+
grant_giftcard: boolean;
|
|
739
|
+
}
|
|
740
|
+
export type ProductRemoveAfterIntervalScale = "invalid" | "day" | "week" | "month";
|
|
741
|
+
/**
|
|
742
|
+
* Request headers
|
|
743
|
+
*/
|
|
744
|
+
export type ProductsGetStorefrontProductHeaders = {
|
|
745
|
+
/**
|
|
746
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
747
|
+
* @format ipv4
|
|
748
|
+
*/
|
|
749
|
+
"x-paynow-customer-ip"?: string;
|
|
750
|
+
/**
|
|
751
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
752
|
+
* @pattern ^[A-Z]{2}$
|
|
753
|
+
*/
|
|
754
|
+
"x-paynow-customer-countrycode"?: string;
|
|
755
|
+
};
|
|
756
|
+
/**
|
|
757
|
+
* Query parameters
|
|
758
|
+
*/
|
|
759
|
+
export type ProductsGetStorefrontProductQuery = {
|
|
760
|
+
/**
|
|
761
|
+
* The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) to display prices in. If not provided, the store's default currency will be used.
|
|
762
|
+
*/
|
|
763
|
+
currency?: string;
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* Request headers
|
|
767
|
+
*/
|
|
768
|
+
export type ProductsGetStorefrontProductsHeaders = {
|
|
769
|
+
/**
|
|
770
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
771
|
+
* @format ipv4
|
|
772
|
+
*/
|
|
773
|
+
"x-paynow-customer-ip"?: string;
|
|
774
|
+
/**
|
|
775
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
776
|
+
* @pattern ^[A-Z]{2}$
|
|
777
|
+
*/
|
|
778
|
+
"x-paynow-customer-countrycode"?: string;
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* Query parameters
|
|
782
|
+
*/
|
|
783
|
+
export type ProductsGetStorefrontProductsQuery = {
|
|
784
|
+
/**
|
|
785
|
+
* Tag slugs to filter by. Each tag slug is a separate query parameter.
|
|
786
|
+
*/
|
|
787
|
+
tag?: Array<string>;
|
|
788
|
+
/**
|
|
789
|
+
* The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) to display prices in. If not provided, the store's default currency will be used.
|
|
790
|
+
*/
|
|
791
|
+
currency?: string;
|
|
792
|
+
};
|
|
793
|
+
export type ProductSubscriptionIntervalScale = "invalid" | "day" | "week" | "month" | "year";
|
|
794
|
+
export interface ProductTagDto {
|
|
795
|
+
id: FlakeId;
|
|
796
|
+
/**
|
|
797
|
+
* The unique slug for the tag.
|
|
798
|
+
* @example "packages"
|
|
799
|
+
*/
|
|
800
|
+
slug: string;
|
|
801
|
+
/**
|
|
802
|
+
* The display name of the tag.
|
|
803
|
+
* @example "Packages"
|
|
804
|
+
*/
|
|
805
|
+
name: string;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Describes how proration is handled when a subscription change is applied.
|
|
809
|
+
* - `immediate`: Subscription will be updated instantly, and a proration charge will be applied.
|
|
810
|
+
* - `next_billing_period`: Subscription will be updated at the end of the billing period, no proration will be applied.
|
|
811
|
+
* - `none`: No proration is applied, subscription is updated instantly.
|
|
812
|
+
*/
|
|
813
|
+
export type ProrationBehaviorDto = "invalid" | "immediate" | "next_billing_period" | "none";
|
|
814
|
+
export interface PublicPlatformDto {
|
|
815
|
+
id: FlakeId;
|
|
816
|
+
slug: string;
|
|
817
|
+
type: PlatformType;
|
|
818
|
+
country_code: string;
|
|
819
|
+
business_name: string;
|
|
820
|
+
name: string;
|
|
821
|
+
description: string;
|
|
822
|
+
website_url: string;
|
|
823
|
+
logo_url: string;
|
|
824
|
+
accent_color: string;
|
|
825
|
+
capabilities: Array<PlatformCapability>;
|
|
826
|
+
/**
|
|
827
|
+
* @format date-time
|
|
828
|
+
*/
|
|
829
|
+
created_at: string;
|
|
830
|
+
/**
|
|
831
|
+
* @format date-time
|
|
832
|
+
*/
|
|
833
|
+
updated_at?: string | null;
|
|
834
|
+
/**
|
|
835
|
+
* @format date-time
|
|
836
|
+
*/
|
|
837
|
+
disabled_at?: string | null;
|
|
838
|
+
}
|
|
839
|
+
export type SaleDiscountTypeDto = "percent" | "amount";
|
|
840
|
+
/**
|
|
841
|
+
* The Sales Tax estimation for the passed in customer country / IP.
|
|
842
|
+
* Include the tax percentage + abbreviation in your product view to inform your customers about the tax.
|
|
843
|
+
*/
|
|
844
|
+
export interface SalesTaxEstimateDto {
|
|
845
|
+
/**
|
|
846
|
+
* The ISO country code.
|
|
847
|
+
* @example "CZ"
|
|
848
|
+
*/
|
|
849
|
+
country_code: string;
|
|
850
|
+
/**
|
|
851
|
+
* The full name of the country.
|
|
852
|
+
* @example "Czech Republic"
|
|
853
|
+
*/
|
|
854
|
+
country_name: string;
|
|
855
|
+
/**
|
|
856
|
+
* The local currency used in the country.
|
|
857
|
+
* @example "CZK"
|
|
858
|
+
*/
|
|
859
|
+
currency: string;
|
|
860
|
+
/**
|
|
861
|
+
* The abbreviation of the tax term in the local language.
|
|
862
|
+
* @example "DPH"
|
|
863
|
+
* @readonly Set by the API; ignored on write.
|
|
864
|
+
*/
|
|
865
|
+
vat_abbreviation: string;
|
|
866
|
+
/**
|
|
867
|
+
* The full name of the tax term in the local language.
|
|
868
|
+
* @example "Daň z přidané hodnoty"
|
|
869
|
+
* @readonly Set by the API; ignored on write.
|
|
870
|
+
*/
|
|
871
|
+
vat_local_name: string;
|
|
872
|
+
/**
|
|
873
|
+
* The abbreviation of the local tax identification number.
|
|
874
|
+
*/
|
|
875
|
+
tax_number_abbreviation?: string | null;
|
|
876
|
+
/**
|
|
877
|
+
* The name of the local tax identification number.
|
|
878
|
+
*/
|
|
879
|
+
tax_number_local_name?: string | null;
|
|
880
|
+
/**
|
|
881
|
+
* Indicates whether the country is a member of the European Union.
|
|
882
|
+
* @example true
|
|
883
|
+
*/
|
|
884
|
+
eu_member_state: boolean;
|
|
885
|
+
/**
|
|
886
|
+
* The tax rate applicable for electronic services, as a percentage.
|
|
887
|
+
* @format double
|
|
888
|
+
* @example 21
|
|
889
|
+
*/
|
|
890
|
+
eservice_rate: number;
|
|
891
|
+
/**
|
|
892
|
+
* The VAT rate (synonym for EServiceRate).
|
|
893
|
+
* @format double
|
|
894
|
+
* @example 21
|
|
895
|
+
* @readonly Set by the API; ignored on write.
|
|
896
|
+
*/
|
|
897
|
+
percentage: number;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Object representing a sales tax jurisdiction and its associated taxes.
|
|
901
|
+
*/
|
|
902
|
+
export interface SalesTaxJurisdictionDto {
|
|
903
|
+
/**
|
|
904
|
+
* The name of the tax jurisdiction.
|
|
905
|
+
* @example "EU OSS"
|
|
906
|
+
*/
|
|
907
|
+
name: string;
|
|
908
|
+
/**
|
|
909
|
+
* List of taxes applied within this jurisdiction.
|
|
910
|
+
*/
|
|
911
|
+
taxes: Array<SalesTaxJurisdictionTaxDto>;
|
|
912
|
+
/**
|
|
913
|
+
* Explanation for why taxes are not applied, if applicable.
|
|
914
|
+
* This property is null when taxes are applied.
|
|
915
|
+
*/
|
|
916
|
+
not_taxed_reason?: string | null;
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Object representing a specific tax within a sales tax jurisdiction.
|
|
920
|
+
*/
|
|
921
|
+
export interface SalesTaxJurisdictionTaxDto {
|
|
922
|
+
/**
|
|
923
|
+
* The name of the tax.
|
|
924
|
+
*/
|
|
925
|
+
tax_name: string;
|
|
926
|
+
/**
|
|
927
|
+
* The amount subject to taxation, formatted as a string.
|
|
928
|
+
*/
|
|
929
|
+
taxable_amount: string;
|
|
930
|
+
/**
|
|
931
|
+
* The calculated tax amount, formatted as a string.
|
|
932
|
+
*/
|
|
933
|
+
tax_amount: string;
|
|
934
|
+
/**
|
|
935
|
+
* The rate at which the tax is applied, formatted as a string.
|
|
936
|
+
*/
|
|
937
|
+
tax_rate: string;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* A 64-bit Steam account identifier. Accepts string or numeric format.
|
|
941
|
+
* @format steam-id
|
|
942
|
+
* @example "76561197960287930"
|
|
943
|
+
*/
|
|
944
|
+
export type SteamId = string;
|
|
945
|
+
/**
|
|
946
|
+
* Represents a PayNow store and its associated configuration.
|
|
947
|
+
*/
|
|
948
|
+
export interface StoreDto {
|
|
949
|
+
id: FlakeId;
|
|
950
|
+
owner_id: FlakeId;
|
|
951
|
+
/**
|
|
952
|
+
* The URL-safe slug used to identify the store (e.g. "my-rust-server").
|
|
953
|
+
*/
|
|
954
|
+
slug: string;
|
|
955
|
+
/**
|
|
956
|
+
* The display name of the store.
|
|
957
|
+
*/
|
|
958
|
+
name: string;
|
|
959
|
+
/**
|
|
960
|
+
* The platform this store is associated with (e.g. "rust", "minecraft").
|
|
961
|
+
*/
|
|
962
|
+
platform: string;
|
|
963
|
+
/**
|
|
964
|
+
* Alias for 'platform'. Returns the platform identifier as a game name.
|
|
965
|
+
* @readonly Set by the API; ignored on write.
|
|
966
|
+
*/
|
|
967
|
+
game: string;
|
|
968
|
+
/**
|
|
969
|
+
* The ISO 4217 currency code used by this store for pricing (e.g. "usd", "eur")
|
|
970
|
+
*/
|
|
971
|
+
currency: string;
|
|
972
|
+
/**
|
|
973
|
+
* A human-readable description of the store shown to customers and PayNow.
|
|
974
|
+
*/
|
|
975
|
+
description: string;
|
|
976
|
+
/**
|
|
977
|
+
* The store's public website URL.
|
|
978
|
+
*/
|
|
979
|
+
website_url?: string | null;
|
|
980
|
+
/**
|
|
981
|
+
* General contact email address for the store.
|
|
982
|
+
*/
|
|
983
|
+
contact_email?: string | null;
|
|
984
|
+
/**
|
|
985
|
+
* Dedicated support email address for customer inquiries.
|
|
986
|
+
*/
|
|
987
|
+
support_email?: string | null;
|
|
988
|
+
/**
|
|
989
|
+
* URL to the store's support portal or help page.
|
|
990
|
+
*/
|
|
991
|
+
support_url?: string | null;
|
|
992
|
+
/**
|
|
993
|
+
* The integration type used by the store.
|
|
994
|
+
*/
|
|
995
|
+
integration_type?: string | null;
|
|
996
|
+
/**
|
|
997
|
+
* When set to true, the store is processing real transactions in live mode.
|
|
998
|
+
*/
|
|
999
|
+
live_mode: boolean;
|
|
1000
|
+
/**
|
|
1001
|
+
* URL of the store's full-size logo image.
|
|
1002
|
+
*/
|
|
1003
|
+
logo_url?: string | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* URL of the store's square/icon logo image.
|
|
1006
|
+
*/
|
|
1007
|
+
logo_square_url?: string | null;
|
|
1008
|
+
/**
|
|
1009
|
+
* Username prefix used to identify Minecraft Bedrock players (e.g. ".").
|
|
1010
|
+
*/
|
|
1011
|
+
minecraft_bedrock_username_prefix?: string | null;
|
|
1012
|
+
/**
|
|
1013
|
+
* The UTC timestamp when the store was created.
|
|
1014
|
+
* @format date-time
|
|
1015
|
+
*/
|
|
1016
|
+
created_at?: string | null;
|
|
1017
|
+
/**
|
|
1018
|
+
* The UTC timestamp when the store was last updated.
|
|
1019
|
+
* @format date-time
|
|
1020
|
+
*/
|
|
1021
|
+
updated_at?: string | null;
|
|
1022
|
+
/**
|
|
1023
|
+
* The UTC timestamp when the store completed onboarding.
|
|
1024
|
+
* @format date-time
|
|
1025
|
+
*/
|
|
1026
|
+
onboarding_completed_at?: string | null;
|
|
1027
|
+
platform_store_type_association?: PlatformStoreTypeAssociationDetailsDto;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* A storefront representation of a customer in the PayNow system with their associated profiles and metadata.
|
|
1031
|
+
*/
|
|
1032
|
+
export interface StorefrontCustomerDto {
|
|
1033
|
+
id: FlakeId;
|
|
1034
|
+
store_id: FlakeId;
|
|
1035
|
+
profile?: CustomerGenericProfileDto;
|
|
1036
|
+
steam_id?: SteamId;
|
|
1037
|
+
steam?: StorefrontCustomerSteamProfileDto;
|
|
1038
|
+
/**
|
|
1039
|
+
* The customer's Minecraft UUID, if they have linked their Minecraft account.
|
|
1040
|
+
* Not set for offline Minecraft stores. If the platform type is Minecraft - Geyser,
|
|
1041
|
+
* and the profile is a bedrock account, this will be a UUID generated from the Xbox XUID.
|
|
1042
|
+
* @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
|
|
1043
|
+
*/
|
|
1044
|
+
minecraft_uuid?: string | null;
|
|
1045
|
+
minecraft?: StorefrontCustomerMinecraftProfileDto;
|
|
1046
|
+
minecraft_platform?: CustomerMinecraftPlatform;
|
|
1047
|
+
/**
|
|
1048
|
+
* The customer's Xbox XUID, if available.
|
|
1049
|
+
*/
|
|
1050
|
+
xbox_xuid?: string | null;
|
|
1051
|
+
/**
|
|
1052
|
+
* The display name for the customer.
|
|
1053
|
+
* @example "m0uka"
|
|
1054
|
+
*/
|
|
1055
|
+
name?: string | null;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* A storefront representation of a customers Minecraft profile.
|
|
1059
|
+
*/
|
|
1060
|
+
export interface StorefrontCustomerMinecraftProfileDto {
|
|
1061
|
+
/**
|
|
1062
|
+
* The UUID of the Minecraft player.
|
|
1063
|
+
* If the platform is Minecraft Offline, this will be the name itself.
|
|
1064
|
+
* If the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID.
|
|
1065
|
+
* @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
|
|
1066
|
+
*/
|
|
1067
|
+
id: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* The username of the Minecraft player.
|
|
1070
|
+
* @example "notch"
|
|
1071
|
+
*/
|
|
1072
|
+
name: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* The URL to the player's Minecraft skin rendered as an avatar.
|
|
1075
|
+
*/
|
|
1076
|
+
avatar_url: string;
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* A storefront representation of a customers Steam profile.
|
|
1080
|
+
*/
|
|
1081
|
+
export interface StorefrontCustomerSteamProfileDto {
|
|
1082
|
+
id: SteamId;
|
|
1083
|
+
/**
|
|
1084
|
+
* The display name of the user on Steam.
|
|
1085
|
+
*/
|
|
1086
|
+
name: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* The URL to the user's Steam avatar image.
|
|
1089
|
+
*/
|
|
1090
|
+
avatar_url: string;
|
|
1091
|
+
}
|
|
1092
|
+
export interface StorefrontCustomVariableDto {
|
|
1093
|
+
/**
|
|
1094
|
+
* Unique identifier string used to reference this custom variable programmatically.
|
|
1095
|
+
* Must contain only letters, numbers, underscores, and hyphens.
|
|
1096
|
+
*/
|
|
1097
|
+
identifier: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Display name for the custom variable shown to customers.
|
|
1100
|
+
*/
|
|
1101
|
+
name: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Description explaining what this custom variable is for. Can be shown to customers.
|
|
1104
|
+
*/
|
|
1105
|
+
description: string;
|
|
1106
|
+
type: CustomVariableType;
|
|
1107
|
+
/**
|
|
1108
|
+
* Optional regex pattern to validate text/number input values.
|
|
1109
|
+
* Only applies to text and number types.
|
|
1110
|
+
* Uses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features.
|
|
1111
|
+
*/
|
|
1112
|
+
value_regex?: string | null;
|
|
1113
|
+
/**
|
|
1114
|
+
* Available options for dropdown type custom variables.
|
|
1115
|
+
* Empty for text and number types.
|
|
1116
|
+
*/
|
|
1117
|
+
options: Array<StorefrontCustomVariableOptionDto>;
|
|
1118
|
+
}
|
|
1119
|
+
export interface StorefrontCustomVariableOptionDto {
|
|
1120
|
+
/**
|
|
1121
|
+
* Display name shown to customers for this option.
|
|
1122
|
+
*/
|
|
1123
|
+
name: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* Internal value used for product command variable replacement, without brackets.
|
|
1126
|
+
*/
|
|
1127
|
+
value: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Additional price in the lowest denominator (e.g. cents) when this option is selected.
|
|
1130
|
+
* @format int64
|
|
1131
|
+
*/
|
|
1132
|
+
price: number;
|
|
1133
|
+
/**
|
|
1134
|
+
* Whether this option is selected by default when the custom variable is presented.
|
|
1135
|
+
* Only one option per custom variable should be marked as default.
|
|
1136
|
+
*/
|
|
1137
|
+
is_default: boolean;
|
|
1138
|
+
/**
|
|
1139
|
+
* Sort order for displaying options to customers.
|
|
1140
|
+
* Lower numbers appear first.
|
|
1141
|
+
* @format int32
|
|
1142
|
+
*/
|
|
1143
|
+
sort_order: number;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Represents a delivery item assigned to a customer
|
|
1147
|
+
*/
|
|
1148
|
+
export interface StorefrontDeliveryItemDto {
|
|
1149
|
+
id: FlakeId;
|
|
1150
|
+
store_id: FlakeId;
|
|
1151
|
+
customer_id: FlakeId;
|
|
1152
|
+
order_id?: FlakeId;
|
|
1153
|
+
order_line_id?: FlakeId;
|
|
1154
|
+
subscription_id?: FlakeId;
|
|
1155
|
+
execute_on_gameserver_id?: FlakeId;
|
|
1156
|
+
/**
|
|
1157
|
+
* The index of the item when multiple quantities were assigned
|
|
1158
|
+
* @format int32
|
|
1159
|
+
*/
|
|
1160
|
+
quantity_index?: number | null;
|
|
1161
|
+
product: DeliveryItemProductDto;
|
|
1162
|
+
state: DeliveryItemStateDto;
|
|
1163
|
+
/**
|
|
1164
|
+
* Indicates whether the delivery item can expire
|
|
1165
|
+
*/
|
|
1166
|
+
expirable: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* Indicates whether the item was given as a gift
|
|
1169
|
+
*/
|
|
1170
|
+
gift: boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* The date and time when the item was added
|
|
1173
|
+
* @format date-time
|
|
1174
|
+
*/
|
|
1175
|
+
added_at: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* The date and time when the item became active
|
|
1178
|
+
* @format date-time
|
|
1179
|
+
*/
|
|
1180
|
+
active_at?: string | null;
|
|
1181
|
+
/**
|
|
1182
|
+
* The date and time when the item expires naturally
|
|
1183
|
+
* @format date-time
|
|
1184
|
+
*/
|
|
1185
|
+
expires_at?: string | null;
|
|
1186
|
+
/**
|
|
1187
|
+
* The override expiry date for the delivery item
|
|
1188
|
+
* @format date-time
|
|
1189
|
+
*/
|
|
1190
|
+
override_expires_at?: string | null;
|
|
1191
|
+
/**
|
|
1192
|
+
* The date and time when the item was removed
|
|
1193
|
+
* @format date-time
|
|
1194
|
+
*/
|
|
1195
|
+
removed_at?: string | null;
|
|
1196
|
+
/**
|
|
1197
|
+
* The date and time when the item was revoked
|
|
1198
|
+
* @format date-time
|
|
1199
|
+
*/
|
|
1200
|
+
revoked_at?: string | null;
|
|
1201
|
+
/**
|
|
1202
|
+
* The reason for revoking the delivery item
|
|
1203
|
+
*/
|
|
1204
|
+
revoke_reason?: string | null;
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Represents a simplified view of a game server for storefront display purposes.
|
|
1208
|
+
*/
|
|
1209
|
+
export interface StorefrontGameServerDto {
|
|
1210
|
+
id: FlakeId;
|
|
1211
|
+
/**
|
|
1212
|
+
* The display name of the game server.
|
|
1213
|
+
*/
|
|
1214
|
+
name: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Indicates whether the game server is currently enabled.
|
|
1217
|
+
*/
|
|
1218
|
+
enabled: boolean;
|
|
1219
|
+
}
|
|
1220
|
+
export interface StorefrontGiftCardDto {
|
|
1221
|
+
code: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* @format int32
|
|
1224
|
+
*/
|
|
1225
|
+
balance: number;
|
|
1226
|
+
/**
|
|
1227
|
+
* @format int32
|
|
1228
|
+
*/
|
|
1229
|
+
starting_balance: number;
|
|
1230
|
+
/**
|
|
1231
|
+
* @format date-time
|
|
1232
|
+
*/
|
|
1233
|
+
expires_at?: string | null;
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Represents a navigation link in the storefront's hierarchical navigation structure.
|
|
1237
|
+
*/
|
|
1238
|
+
export interface StorefrontNavLinkDto {
|
|
1239
|
+
/**
|
|
1240
|
+
* The unique identifier for this navigation node in the navigation tree.
|
|
1241
|
+
*/
|
|
1242
|
+
node_id: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* The identifier of the parent navigation node, if this is a child node.
|
|
1245
|
+
*/
|
|
1246
|
+
parent_node_id?: string | null;
|
|
1247
|
+
tag_id: FlakeId;
|
|
1248
|
+
/**
|
|
1249
|
+
* The URL-friendly slug for the tag associated with this navigation link.
|
|
1250
|
+
* @example "perks"
|
|
1251
|
+
*/
|
|
1252
|
+
tag_slug: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* A list containing all parent tags and this node's tag, representing the complete path in the tag hierarchy.
|
|
1255
|
+
* @example ["perks","vip"]
|
|
1256
|
+
*/
|
|
1257
|
+
tag_query: Array<string>;
|
|
1258
|
+
/**
|
|
1259
|
+
* The display name of the associated tag shown to users in the UI.
|
|
1260
|
+
* @example "Perks"
|
|
1261
|
+
*/
|
|
1262
|
+
name: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* The display order of this navigation link relative to its siblings.
|
|
1265
|
+
* @format int32
|
|
1266
|
+
*/
|
|
1267
|
+
order: number;
|
|
1268
|
+
/**
|
|
1269
|
+
* The collection of child navigation links that appear beneath this link in the hierarchy.
|
|
1270
|
+
*/
|
|
1271
|
+
children: Array<StorefrontNavLinkDto>;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Data transfer object representing a store order.
|
|
1275
|
+
*/
|
|
1276
|
+
export interface StorefrontOrderDto {
|
|
1277
|
+
id: FlakeId;
|
|
1278
|
+
/**
|
|
1279
|
+
* Human-readable identifier for the order.
|
|
1280
|
+
* @readonly Set by the API; ignored on write.
|
|
1281
|
+
*/
|
|
1282
|
+
pretty_id: string;
|
|
1283
|
+
store_id: FlakeId;
|
|
1284
|
+
customer_id: FlakeId;
|
|
1285
|
+
customer: StorefrontCustomerDto;
|
|
1286
|
+
status: OrderStatus;
|
|
1287
|
+
type: OrderType;
|
|
1288
|
+
checkout_id?: FlakeId;
|
|
1289
|
+
subscription_id?: FlakeId;
|
|
1290
|
+
/**
|
|
1291
|
+
* Indicates whether this order is a subscription order.
|
|
1292
|
+
*/
|
|
1293
|
+
is_subscription: boolean;
|
|
1294
|
+
/**
|
|
1295
|
+
* Currency code used for this order.
|
|
1296
|
+
*/
|
|
1297
|
+
currency: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* The total discount amount applied to this order in smallest currency unit
|
|
1300
|
+
* @format int32
|
|
1301
|
+
* @example 500
|
|
1302
|
+
*/
|
|
1303
|
+
discount_amount: number;
|
|
1304
|
+
/**
|
|
1305
|
+
* The discount amount formatted as a string
|
|
1306
|
+
* @example "$5.00"
|
|
1307
|
+
*/
|
|
1308
|
+
discount_amount_str: string;
|
|
1309
|
+
/**
|
|
1310
|
+
* The subtotal amount for this order in smallest currency unit
|
|
1311
|
+
* @format int32
|
|
1312
|
+
* @example 9995
|
|
1313
|
+
*/
|
|
1314
|
+
subtotal_amount: number;
|
|
1315
|
+
/**
|
|
1316
|
+
* The subtotal amount formatted as a string
|
|
1317
|
+
* @example "$99.95"
|
|
1318
|
+
*/
|
|
1319
|
+
subtotal_amount_str: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* The tax amount for this order in smallest currency unit
|
|
1322
|
+
* @format int32
|
|
1323
|
+
* @example 999
|
|
1324
|
+
*/
|
|
1325
|
+
tax_amount: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* The tax amount formatted as a string
|
|
1328
|
+
* @example "$9.99"
|
|
1329
|
+
*/
|
|
1330
|
+
tax_amount_str: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* The total amount for this order in smallest currency unit
|
|
1333
|
+
* @format int32
|
|
1334
|
+
* @example 10494
|
|
1335
|
+
*/
|
|
1336
|
+
total_amount: number;
|
|
1337
|
+
/**
|
|
1338
|
+
* The total amount formatted as a string
|
|
1339
|
+
* @example "$104.94"
|
|
1340
|
+
*/
|
|
1341
|
+
total_amount_str: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* The amount of gift card value used for this order in smallest currency unit
|
|
1344
|
+
* @format int32
|
|
1345
|
+
* @example 0
|
|
1346
|
+
*/
|
|
1347
|
+
giftcard_usage_amount: number;
|
|
1348
|
+
/**
|
|
1349
|
+
* The gift card usage amount formatted as a string
|
|
1350
|
+
* @example "$0.00"
|
|
1351
|
+
*/
|
|
1352
|
+
giftcard_usage_amount_str: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* The presentment currency code used for this order (currency shown to customer)
|
|
1355
|
+
* @example "eur"
|
|
1356
|
+
*/
|
|
1357
|
+
presentment_currency: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* The presentment subtotal amount in smallest currency unit
|
|
1360
|
+
* @format int32
|
|
1361
|
+
* @example 9995
|
|
1362
|
+
*/
|
|
1363
|
+
presentment_subtotal_amount: number;
|
|
1364
|
+
/**
|
|
1365
|
+
* The presentment subtotal amount formatted as a string
|
|
1366
|
+
* @example "€99.95"
|
|
1367
|
+
* @readonly Set by the API; ignored on write.
|
|
1368
|
+
*/
|
|
1369
|
+
presentment_subtotal_amount_str: string;
|
|
1370
|
+
/**
|
|
1371
|
+
* The presentment discount amount in smallest currency unit
|
|
1372
|
+
* @format int32
|
|
1373
|
+
* @example 500
|
|
1374
|
+
*/
|
|
1375
|
+
presentment_discount_amount: number;
|
|
1376
|
+
/**
|
|
1377
|
+
* The presentment discount amount formatted as a string
|
|
1378
|
+
* @example "€5.00"
|
|
1379
|
+
* @readonly Set by the API; ignored on write.
|
|
1380
|
+
*/
|
|
1381
|
+
presentment_discount_amount_str: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* The presentment gift card usage amount in the smallest currency unit
|
|
1384
|
+
* @format int32
|
|
1385
|
+
* @example 0
|
|
1386
|
+
*/
|
|
1387
|
+
presentment_giftcard_usage_amount: number;
|
|
1388
|
+
/**
|
|
1389
|
+
* The presentment gift card usage amount formatted as a string
|
|
1390
|
+
* @example "€0.00"
|
|
1391
|
+
* @readonly Set by the API; ignored on write.
|
|
1392
|
+
*/
|
|
1393
|
+
presentment_giftcard_usage_amount_str: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* The presentment tax amount in smallest currency unit
|
|
1396
|
+
* @format int32
|
|
1397
|
+
* @example 999
|
|
1398
|
+
*/
|
|
1399
|
+
presentment_tax_amount: number;
|
|
1400
|
+
/**
|
|
1401
|
+
* The presentment tax amount formatted as a string
|
|
1402
|
+
* @example "€9.99"
|
|
1403
|
+
* @readonly Set by the API; ignored on write.
|
|
1404
|
+
*/
|
|
1405
|
+
presentment_tax_amount_str: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* The presentment total amount in the smallest currency unit
|
|
1408
|
+
* @format int32
|
|
1409
|
+
* @example 10494
|
|
1410
|
+
*/
|
|
1411
|
+
presentment_total_amount: number;
|
|
1412
|
+
/**
|
|
1413
|
+
* The presentment total amount formatted as a string
|
|
1414
|
+
* @example "€104.94"
|
|
1415
|
+
* @readonly Set by the API; ignored on write.
|
|
1416
|
+
*/
|
|
1417
|
+
presentment_total_amount_str: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* Sequence number of the billing cycle, if this order is associated with a subscription.
|
|
1420
|
+
* @format int32
|
|
1421
|
+
*/
|
|
1422
|
+
billing_cycle_sequence?: number | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* Line items associated with this order.
|
|
1425
|
+
*/
|
|
1426
|
+
lines: Array<StorefrontOrderLineDto>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Date and time when the order was created.
|
|
1429
|
+
* @format date-time
|
|
1430
|
+
*/
|
|
1431
|
+
created_at?: string | null;
|
|
1432
|
+
/**
|
|
1433
|
+
* Date and time when the order was completed.
|
|
1434
|
+
* @format date-time
|
|
1435
|
+
*/
|
|
1436
|
+
completed_at?: string | null;
|
|
1437
|
+
/**
|
|
1438
|
+
* Date and time when the order was canceled.
|
|
1439
|
+
* @format date-time
|
|
1440
|
+
*/
|
|
1441
|
+
canceled_at?: string | null;
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* Represents a line item within an order.
|
|
1445
|
+
*/
|
|
1446
|
+
export interface StorefrontOrderLineDto {
|
|
1447
|
+
id: FlakeId;
|
|
1448
|
+
checkout_line_id: FlakeId;
|
|
1449
|
+
subscription_line_id?: FlakeId;
|
|
1450
|
+
trial_id?: FlakeId;
|
|
1451
|
+
product_id: FlakeId;
|
|
1452
|
+
product_version_id: FlakeId;
|
|
1453
|
+
/**
|
|
1454
|
+
* Name of the product associated with this order line.
|
|
1455
|
+
*/
|
|
1456
|
+
product_name: string;
|
|
1457
|
+
/**
|
|
1458
|
+
* URL for the product image.
|
|
1459
|
+
*/
|
|
1460
|
+
product_image_url: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* Numeric value of the subscription billing interval, if this line is a subscription.
|
|
1463
|
+
* @format int32
|
|
1464
|
+
*/
|
|
1465
|
+
subscription_interval_value?: number | null;
|
|
1466
|
+
/**
|
|
1467
|
+
* Scale of the subscription billing interval (e.g., "day", "month", "year"), if applicable.
|
|
1468
|
+
*/
|
|
1469
|
+
subscription_interval_scale?: string | null;
|
|
1470
|
+
/**
|
|
1471
|
+
* Indicates whether this order line is a gift to another customer.
|
|
1472
|
+
*/
|
|
1473
|
+
gift: boolean;
|
|
1474
|
+
gift_to_customer_id?: FlakeId;
|
|
1475
|
+
gift_to_customer?: StorefrontCustomerDto;
|
|
1476
|
+
/**
|
|
1477
|
+
* The unit price of the product in the smallest currency unit (e.g., cents)
|
|
1478
|
+
* @format int32
|
|
1479
|
+
* @example 1999
|
|
1480
|
+
*/
|
|
1481
|
+
price: number;
|
|
1482
|
+
/**
|
|
1483
|
+
* The unit price of the product formatted as a string
|
|
1484
|
+
* @example "$19.99"
|
|
1485
|
+
*/
|
|
1486
|
+
price_str: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* The quantity of the product in this order line
|
|
1489
|
+
* @format int32
|
|
1490
|
+
* @example 1
|
|
1491
|
+
*/
|
|
1492
|
+
quantity: number;
|
|
1493
|
+
/**
|
|
1494
|
+
* The discount amount (from sales, coupons, and affiliate links) applied to this order line
|
|
1495
|
+
* @format int32
|
|
1496
|
+
* @example 0
|
|
1497
|
+
*/
|
|
1498
|
+
discount_amount: number;
|
|
1499
|
+
/**
|
|
1500
|
+
* The discount amount formatted as a string
|
|
1501
|
+
* @example "$0.00"
|
|
1502
|
+
*/
|
|
1503
|
+
discount_amount_str: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* The amount of gift card used for this order line
|
|
1506
|
+
* @format int32
|
|
1507
|
+
* @example 0
|
|
1508
|
+
*/
|
|
1509
|
+
giftcard_usage_amount: number;
|
|
1510
|
+
/**
|
|
1511
|
+
* The gift card usage amount formatted as a string
|
|
1512
|
+
* @example "$0.00"
|
|
1513
|
+
*/
|
|
1514
|
+
giftcard_usage_amount_str: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* The subtotal amount for this order line
|
|
1517
|
+
* @format int32
|
|
1518
|
+
* @example 1999
|
|
1519
|
+
*/
|
|
1520
|
+
subtotal_amount: number;
|
|
1521
|
+
/**
|
|
1522
|
+
* The subtotal amount formatted as a string
|
|
1523
|
+
* @example "$19.99"
|
|
1524
|
+
*/
|
|
1525
|
+
subtotal_amount_str: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* The tax amount for this order line
|
|
1528
|
+
* @format int32
|
|
1529
|
+
* @example 200
|
|
1530
|
+
*/
|
|
1531
|
+
tax_amount: number;
|
|
1532
|
+
/**
|
|
1533
|
+
* The tax amount formatted as a string
|
|
1534
|
+
* @example "$2.00"
|
|
1535
|
+
*/
|
|
1536
|
+
tax_amount_str: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* The total amount for this order line
|
|
1539
|
+
* @format int32
|
|
1540
|
+
* @example 2199
|
|
1541
|
+
*/
|
|
1542
|
+
total_amount: number;
|
|
1543
|
+
/**
|
|
1544
|
+
* The total amount formatted as a string
|
|
1545
|
+
* @example "$21.99"
|
|
1546
|
+
*/
|
|
1547
|
+
total_amount_str: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* The presentment subtotal amount for this order line
|
|
1550
|
+
* @format int32
|
|
1551
|
+
* @example 1999
|
|
1552
|
+
*/
|
|
1553
|
+
presentment_subtotal_amount: number;
|
|
1554
|
+
/**
|
|
1555
|
+
* The presentment subtotal amount formatted as a string
|
|
1556
|
+
* @example "€19.99"
|
|
1557
|
+
* @readonly Set by the API; ignored on write.
|
|
1558
|
+
*/
|
|
1559
|
+
presentment_subtotal_amount_str: string;
|
|
1560
|
+
/**
|
|
1561
|
+
* The presentment discount amount for this order line
|
|
1562
|
+
* @format int32
|
|
1563
|
+
* @example 0
|
|
1564
|
+
*/
|
|
1565
|
+
presentment_discount_amount: number;
|
|
1566
|
+
/**
|
|
1567
|
+
* The presentment discount amount formatted as a string
|
|
1568
|
+
* @example "€0.00"
|
|
1569
|
+
* @readonly Set by the API; ignored on write.
|
|
1570
|
+
*/
|
|
1571
|
+
presentment_discount_amount_str: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* The presentment tax amount for this order line
|
|
1574
|
+
* @format int32
|
|
1575
|
+
* @example 200
|
|
1576
|
+
*/
|
|
1577
|
+
presentment_tax_amount: number;
|
|
1578
|
+
/**
|
|
1579
|
+
* The presentment tax amount formatted as a string
|
|
1580
|
+
* @example "€2.00"
|
|
1581
|
+
* @readonly Set by the API; ignored on write.
|
|
1582
|
+
*/
|
|
1583
|
+
presentment_tax_amount_str: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* The presentment gift card usage amount for this order line
|
|
1586
|
+
* @format int32
|
|
1587
|
+
* @example 0
|
|
1588
|
+
*/
|
|
1589
|
+
presentment_giftcard_usage_amount: number;
|
|
1590
|
+
/**
|
|
1591
|
+
* The presentment gift card usage amount formatted as a string
|
|
1592
|
+
* @example "€0.00"
|
|
1593
|
+
* @readonly Set by the API; ignored on write.
|
|
1594
|
+
*/
|
|
1595
|
+
presentment_giftcard_usage_amount_str: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* The presentment total amount for this order line
|
|
1598
|
+
* @format int32
|
|
1599
|
+
* @example 2199
|
|
1600
|
+
*/
|
|
1601
|
+
presentment_total_amount: number;
|
|
1602
|
+
/**
|
|
1603
|
+
* The presentment total amount formatted as a string
|
|
1604
|
+
* @example "€21.99"
|
|
1605
|
+
* @readonly Set by the API; ignored on write.
|
|
1606
|
+
*/
|
|
1607
|
+
presentment_total_amount_str: string;
|
|
1608
|
+
selected_gameserver_id?: FlakeId;
|
|
1609
|
+
/**
|
|
1610
|
+
* Indicates whether tax is included in the base price, or added on top
|
|
1611
|
+
* @example false
|
|
1612
|
+
*/
|
|
1613
|
+
tax_inclusive: boolean;
|
|
1614
|
+
/**
|
|
1615
|
+
* The regional pricing region ID for this order line, null if no regional pricing set
|
|
1616
|
+
* @example "eu"
|
|
1617
|
+
*/
|
|
1618
|
+
pricing_region_id?: string | null;
|
|
1619
|
+
/**
|
|
1620
|
+
* Key-value pair of selected custom variables for this order.
|
|
1621
|
+
*/
|
|
1622
|
+
custom_variables?: Record<string, CustomVariableLineItemDto> | null;
|
|
1623
|
+
}
|
|
1624
|
+
export interface StorefrontProductDto {
|
|
1625
|
+
id: FlakeId;
|
|
1626
|
+
store_id: FlakeId;
|
|
1627
|
+
version_id: FlakeId;
|
|
1628
|
+
/**
|
|
1629
|
+
* The URL to the product image.
|
|
1630
|
+
* @example "https://cdn.paynow.gg/logo/full/logotype-color.svg"
|
|
1631
|
+
*/
|
|
1632
|
+
image_url?: string | null;
|
|
1633
|
+
/**
|
|
1634
|
+
* The unique slug for the product.
|
|
1635
|
+
* @example "premium-game-package"
|
|
1636
|
+
*/
|
|
1637
|
+
slug: string;
|
|
1638
|
+
/**
|
|
1639
|
+
* The display name of the product.
|
|
1640
|
+
* @example "Premium Game Package"
|
|
1641
|
+
*/
|
|
1642
|
+
name: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* The detailed description of the product.
|
|
1645
|
+
* @example "This premium package includes exclusive in-game items, bonus currency, and early access to new content."
|
|
1646
|
+
*/
|
|
1647
|
+
description: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* The date and time when the product becomes enabled.
|
|
1650
|
+
* @format date-time
|
|
1651
|
+
*/
|
|
1652
|
+
enabled_at?: string | null;
|
|
1653
|
+
/**
|
|
1654
|
+
* The date and time until which the product remains enabled.
|
|
1655
|
+
* @format date-time
|
|
1656
|
+
*/
|
|
1657
|
+
enabled_until?: string | null;
|
|
1658
|
+
/**
|
|
1659
|
+
* The display label for the product.
|
|
1660
|
+
* @example "Premium Items"
|
|
1661
|
+
*/
|
|
1662
|
+
label?: string | null;
|
|
1663
|
+
/**
|
|
1664
|
+
* Indicates if the product is hidden.
|
|
1665
|
+
*/
|
|
1666
|
+
hidden: boolean;
|
|
1667
|
+
/**
|
|
1668
|
+
* The sort order for displaying the product.
|
|
1669
|
+
* @format int32
|
|
1670
|
+
*/
|
|
1671
|
+
sort_order: number;
|
|
1672
|
+
/**
|
|
1673
|
+
* The price of the product, in the lowest denominator (e.g. cents).
|
|
1674
|
+
* @format int64
|
|
1675
|
+
* @example 1999
|
|
1676
|
+
*/
|
|
1677
|
+
price: number;
|
|
1678
|
+
/**
|
|
1679
|
+
* The ISO three-letter lowercase currency code (e.g., usd, eur, gbp) the product is denominated in.
|
|
1680
|
+
*/
|
|
1681
|
+
currency: string;
|
|
1682
|
+
/**
|
|
1683
|
+
* Indicates whether the product is limited to a single game server.
|
|
1684
|
+
*/
|
|
1685
|
+
single_game_server_only: boolean;
|
|
1686
|
+
/**
|
|
1687
|
+
* Indicates whether one-time purchases are allowed.
|
|
1688
|
+
* @example true
|
|
1689
|
+
*/
|
|
1690
|
+
allow_one_time_purchase: boolean;
|
|
1691
|
+
/**
|
|
1692
|
+
* Indicates whether subscription purchases are allowed.
|
|
1693
|
+
* @example true
|
|
1694
|
+
*/
|
|
1695
|
+
allow_subscription: boolean;
|
|
1696
|
+
/**
|
|
1697
|
+
* Indicates whether gifting is disabled for this product.
|
|
1698
|
+
*/
|
|
1699
|
+
is_gifting_disabled: boolean;
|
|
1700
|
+
/**
|
|
1701
|
+
* Indicates whether gift cards are disabled entirely for the product.
|
|
1702
|
+
*/
|
|
1703
|
+
is_gift_cards_disabled: boolean;
|
|
1704
|
+
/**
|
|
1705
|
+
* Indicates whether coupons are disabled entirely for the product.
|
|
1706
|
+
*/
|
|
1707
|
+
is_coupons_disabled: boolean;
|
|
1708
|
+
/**
|
|
1709
|
+
* Indicates whether affiliate links are disabled entirely for the product.
|
|
1710
|
+
*/
|
|
1711
|
+
is_affiliate_links_disabled: boolean;
|
|
1712
|
+
/**
|
|
1713
|
+
* The subscription interval value.
|
|
1714
|
+
* @format int32
|
|
1715
|
+
* @example 1
|
|
1716
|
+
*/
|
|
1717
|
+
subscription_interval_value: number;
|
|
1718
|
+
subscription_interval_scale: ProductSubscriptionIntervalScale;
|
|
1719
|
+
/**
|
|
1720
|
+
* Indicates whether automatic removal is enabled.
|
|
1721
|
+
* @example true
|
|
1722
|
+
*/
|
|
1723
|
+
remove_after_enabled: boolean;
|
|
1724
|
+
/**
|
|
1725
|
+
* The time value for automatic removal.
|
|
1726
|
+
* @format int32
|
|
1727
|
+
* @example 1
|
|
1728
|
+
*/
|
|
1729
|
+
remove_after_time_value: number;
|
|
1730
|
+
remove_after_time_scale: ProductRemoveAfterIntervalScale;
|
|
1731
|
+
pricing?: StorefrontProductPricingDto;
|
|
1732
|
+
stock?: StorefrontProductStockDto;
|
|
1733
|
+
trial: StorefrontProductTrialDto;
|
|
1734
|
+
/**
|
|
1735
|
+
* The tags associated with the product.
|
|
1736
|
+
*/
|
|
1737
|
+
tags: Array<ProductTagDto>;
|
|
1738
|
+
/**
|
|
1739
|
+
* The game servers associated with the product.
|
|
1740
|
+
*/
|
|
1741
|
+
gameservers: Array<StorefrontGameServerDto>;
|
|
1742
|
+
/**
|
|
1743
|
+
* Custom Variables associated with the product.
|
|
1744
|
+
*/
|
|
1745
|
+
custom_variables: Array<StorefrontCustomVariableDto>;
|
|
1746
|
+
deliverable_actions?: ProductDeliverableActionsDto;
|
|
1747
|
+
/**
|
|
1748
|
+
* Additional metadata for the product.
|
|
1749
|
+
*/
|
|
1750
|
+
metadata?: Record<string, string> | null;
|
|
1751
|
+
/**
|
|
1752
|
+
* The date and time when the product was created.
|
|
1753
|
+
* @format date-time
|
|
1754
|
+
*/
|
|
1755
|
+
created_at?: string | null;
|
|
1756
|
+
/**
|
|
1757
|
+
* The date and time when the product was last updated.
|
|
1758
|
+
* @format date-time
|
|
1759
|
+
*/
|
|
1760
|
+
updated_at?: string | null;
|
|
1761
|
+
tier_group_id?: FlakeId;
|
|
1762
|
+
active_tier_group?: CustomerTierGroupDto;
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* The pricing details for the product in the storefront.
|
|
1766
|
+
*/
|
|
1767
|
+
export interface StorefrontProductPricingDto {
|
|
1768
|
+
active_sale?: StorefrontSaleDto;
|
|
1769
|
+
/**
|
|
1770
|
+
* The amount of the sale discount in the lowest denominator (e.g. cents).
|
|
1771
|
+
* @format int64
|
|
1772
|
+
* @example 500
|
|
1773
|
+
*/
|
|
1774
|
+
sale_value?: number | null;
|
|
1775
|
+
vat_rate?: SalesTaxEstimateDto;
|
|
1776
|
+
regional_pricing?: StorefrontProductRegionalPricingDto;
|
|
1777
|
+
/**
|
|
1778
|
+
* The original price of the product before any discounts, in the lowest denominator (e.g. cents).
|
|
1779
|
+
* @format int64
|
|
1780
|
+
* @example 1999
|
|
1781
|
+
*/
|
|
1782
|
+
price_original: number;
|
|
1783
|
+
/**
|
|
1784
|
+
* The final price of the product after all discounts, in the lowest denominator (e.g. cents).
|
|
1785
|
+
* @format int64
|
|
1786
|
+
* @example 1499
|
|
1787
|
+
*/
|
|
1788
|
+
price_final: number;
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Regional pricing information for this product.
|
|
1792
|
+
* Only present if there is a regional pricing configured.
|
|
1793
|
+
*/
|
|
1794
|
+
export interface StorefrontProductRegionalPricingDto {
|
|
1795
|
+
/**
|
|
1796
|
+
* The identifier for the region.
|
|
1797
|
+
* @example "eu"
|
|
1798
|
+
*/
|
|
1799
|
+
region_id: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* The currency code used in the region.
|
|
1802
|
+
* @example "eur"
|
|
1803
|
+
*/
|
|
1804
|
+
currency: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* Indicates whether the base price includes tax.
|
|
1807
|
+
* @example true
|
|
1808
|
+
*/
|
|
1809
|
+
tax_inclusive: boolean;
|
|
1810
|
+
/**
|
|
1811
|
+
* The base price in the regional currency, in the lowest denominator (e.g. cents).
|
|
1812
|
+
* @format int64
|
|
1813
|
+
* @example 1799
|
|
1814
|
+
*/
|
|
1815
|
+
base_price: number;
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* The stock status information for the product in the storefront.
|
|
1819
|
+
*/
|
|
1820
|
+
export interface StorefrontProductStockDto {
|
|
1821
|
+
/**
|
|
1822
|
+
* Indicates whether the product is currently available for purchase (there is available stock).
|
|
1823
|
+
* @example true
|
|
1824
|
+
*/
|
|
1825
|
+
available_to_purchase: boolean;
|
|
1826
|
+
/**
|
|
1827
|
+
* The number of items available for the customer to purchase (customer stock limit remaining).
|
|
1828
|
+
* @format int32
|
|
1829
|
+
* @example 5
|
|
1830
|
+
*/
|
|
1831
|
+
customer_available: number;
|
|
1832
|
+
}
|
|
1833
|
+
export interface StorefrontProductTrialDto {
|
|
1834
|
+
/**
|
|
1835
|
+
* Indicates whether the trial period is enabled for this product.
|
|
1836
|
+
*/
|
|
1837
|
+
enabled: boolean;
|
|
1838
|
+
/**
|
|
1839
|
+
* Indicates whether the customer is eligible for the trial period.
|
|
1840
|
+
*/
|
|
1841
|
+
eligible: boolean;
|
|
1842
|
+
/**
|
|
1843
|
+
* The duration value of the trial period.
|
|
1844
|
+
* @format int32
|
|
1845
|
+
*/
|
|
1846
|
+
period_value: number;
|
|
1847
|
+
period_scale: ProductSubscriptionIntervalScale;
|
|
1848
|
+
}
|
|
1849
|
+
export interface StorefrontSaleDto {
|
|
1850
|
+
id: FlakeId;
|
|
1851
|
+
version_id: FlakeId;
|
|
1852
|
+
/**
|
|
1853
|
+
* The name of the sale.
|
|
1854
|
+
* @example "Summer Sale"
|
|
1855
|
+
*/
|
|
1856
|
+
name: string;
|
|
1857
|
+
discount_type: SaleDiscountTypeDto;
|
|
1858
|
+
/**
|
|
1859
|
+
* The amount of the discount, either as a percentage in permille or as an absolute value in cents.
|
|
1860
|
+
* @format int64
|
|
1861
|
+
* @example 2000
|
|
1862
|
+
*/
|
|
1863
|
+
discount_amount: number;
|
|
1864
|
+
/**
|
|
1865
|
+
* The minimum order value required to apply the discount, in the lowest denominator (e.g. cents).
|
|
1866
|
+
* @format int64
|
|
1867
|
+
* @example 0
|
|
1868
|
+
*/
|
|
1869
|
+
minimum_order_value: number;
|
|
1870
|
+
/**
|
|
1871
|
+
* The date and time when the sale begins.
|
|
1872
|
+
* @format date-time
|
|
1873
|
+
* @example "2025-06-01T00:00:00Z"
|
|
1874
|
+
*/
|
|
1875
|
+
begins_at: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* The date and time when the sale ends, if applicable.
|
|
1878
|
+
* @format date-time
|
|
1879
|
+
* @example "2025-06-30T23:59:59Z"
|
|
1880
|
+
*/
|
|
1881
|
+
ends_at?: string | null;
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Represents a store entity within the storefront system.
|
|
1885
|
+
*/
|
|
1886
|
+
export interface StorefrontStoreDto {
|
|
1887
|
+
id: FlakeId;
|
|
1888
|
+
/**
|
|
1889
|
+
* The URL-friendly identifier for the store, used in store URLs.
|
|
1890
|
+
* @example "m0ukas-awesome-store"
|
|
1891
|
+
*/
|
|
1892
|
+
slug: string;
|
|
1893
|
+
/**
|
|
1894
|
+
* The display name of the store shown to customers.
|
|
1895
|
+
* @example "m0uka's awesome store"
|
|
1896
|
+
*/
|
|
1897
|
+
name: string;
|
|
1898
|
+
/**
|
|
1899
|
+
* The platform or the game of the store.
|
|
1900
|
+
* @example "rust"
|
|
1901
|
+
*/
|
|
1902
|
+
platform: string;
|
|
1903
|
+
/**
|
|
1904
|
+
* The game of the store. Equivalent to the `platform` for backwards compatibility.
|
|
1905
|
+
* @readonly Set by the API; ignored on write.
|
|
1906
|
+
*/
|
|
1907
|
+
game: string;
|
|
1908
|
+
/**
|
|
1909
|
+
* The three-letter ISO currency code used for pricing in this store.
|
|
1910
|
+
* If using the Adaptive Currency feature, this will be updated to reflect customer's local currency
|
|
1911
|
+
* (based on passed in IP / country headers).
|
|
1912
|
+
* @example "eur"
|
|
1913
|
+
*/
|
|
1914
|
+
currency: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* The three-letter ISO currency code signifying the main currency of the store.
|
|
1917
|
+
* @example "usd"
|
|
1918
|
+
*/
|
|
1919
|
+
creator_currency: string;
|
|
1920
|
+
/**
|
|
1921
|
+
* A detailed description of the store. Only present for some platform types.
|
|
1922
|
+
*/
|
|
1923
|
+
description?: string | null;
|
|
1924
|
+
/**
|
|
1925
|
+
* The URL of the store's main website, if not using Hosted Webstores.
|
|
1926
|
+
*/
|
|
1927
|
+
website_url?: string | null;
|
|
1928
|
+
/**
|
|
1929
|
+
* The email address customers can use to contact store support.
|
|
1930
|
+
* @example "support@example.com"
|
|
1931
|
+
*/
|
|
1932
|
+
support_email?: string | null;
|
|
1933
|
+
/**
|
|
1934
|
+
* The URL of the store's support page.
|
|
1935
|
+
*/
|
|
1936
|
+
support_url?: string | null;
|
|
1937
|
+
/**
|
|
1938
|
+
* The type of integration this store uses with external systems.
|
|
1939
|
+
*/
|
|
1940
|
+
integration_type?: string | null;
|
|
1941
|
+
/**
|
|
1942
|
+
* Indicates whether the store is in live mode (true) or test mode (false).
|
|
1943
|
+
*/
|
|
1944
|
+
live_mode: boolean;
|
|
1945
|
+
/**
|
|
1946
|
+
* The URL to the store's main logo image.
|
|
1947
|
+
*/
|
|
1948
|
+
logo_url?: string | null;
|
|
1949
|
+
/**
|
|
1950
|
+
* The URL to the store's square logo image.
|
|
1951
|
+
*/
|
|
1952
|
+
logo_square_url?: string | null;
|
|
1953
|
+
/**
|
|
1954
|
+
* The date and time when the store was created.
|
|
1955
|
+
* @format date-time
|
|
1956
|
+
*/
|
|
1957
|
+
created_at?: string | null;
|
|
1958
|
+
/**
|
|
1959
|
+
* The date and time when the store was last updated.
|
|
1960
|
+
* @format date-time
|
|
1961
|
+
*/
|
|
1962
|
+
updated_at?: string | null;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Data transfer object representing a store subscription.
|
|
1966
|
+
*/
|
|
1967
|
+
export interface StorefrontSubscriptionDto {
|
|
1968
|
+
id: FlakeId;
|
|
1969
|
+
/**
|
|
1970
|
+
* Human-readable identifier for the subscription.
|
|
1971
|
+
* @readonly Set by the API; ignored on write.
|
|
1972
|
+
*/
|
|
1973
|
+
pretty_id: string;
|
|
1974
|
+
store_id: FlakeId;
|
|
1975
|
+
customer: StorefrontCustomerDto;
|
|
1976
|
+
pending_change?: SubscriptionChangeDto;
|
|
1977
|
+
next_billing_amount: SubscriptionBillingAmountDto;
|
|
1978
|
+
next_billing_presentment_amount: SubscriptionBillingAmountDto;
|
|
1979
|
+
status: SubscriptionStatusDto;
|
|
1980
|
+
/**
|
|
1981
|
+
* Identifiers of coupons applied to this subscription.
|
|
1982
|
+
*/
|
|
1983
|
+
coupon_ids: Array<FlakeId>;
|
|
1984
|
+
checkout_id?: FlakeId;
|
|
1985
|
+
/**
|
|
1986
|
+
* List of tax jurisdictions applicable to this subscription.
|
|
1987
|
+
*/
|
|
1988
|
+
tax_jurisdictions: Array<SalesTaxJurisdictionDto>;
|
|
1989
|
+
/**
|
|
1990
|
+
* Numeric value of the billing interval.
|
|
1991
|
+
* @format int32
|
|
1992
|
+
*/
|
|
1993
|
+
interval_value: number;
|
|
1994
|
+
interval_scale: ProductSubscriptionIntervalScale;
|
|
1995
|
+
/**
|
|
1996
|
+
* Currency code used for billing this subscription.
|
|
1997
|
+
*/
|
|
1998
|
+
currency: string;
|
|
1999
|
+
/**
|
|
2000
|
+
* Amount of discount applied in smallest currency units.
|
|
2001
|
+
* @format int64
|
|
2002
|
+
*/
|
|
2003
|
+
discount_amount: number;
|
|
2004
|
+
/**
|
|
2005
|
+
* Formatted string representation of the discount amount.
|
|
2006
|
+
* @readonly Set by the API; ignored on write.
|
|
2007
|
+
*/
|
|
2008
|
+
discount_amount_str: string;
|
|
2009
|
+
/**
|
|
2010
|
+
* Subtotal amount in smallest currency units.
|
|
2011
|
+
* @format int64
|
|
2012
|
+
*/
|
|
2013
|
+
subtotal_amount: number;
|
|
2014
|
+
/**
|
|
2015
|
+
* Formatted string representation of the subtotal amount.
|
|
2016
|
+
* @readonly Set by the API; ignored on write.
|
|
2017
|
+
*/
|
|
2018
|
+
subtotal_amount_str: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* Tax amount in the smallest currency units.
|
|
2021
|
+
* @format int64
|
|
2022
|
+
*/
|
|
2023
|
+
tax_amount: number;
|
|
2024
|
+
/**
|
|
2025
|
+
* Formatted string representation of the tax amount.
|
|
2026
|
+
* @readonly Set by the API; ignored on write.
|
|
2027
|
+
*/
|
|
2028
|
+
tax_amount_str: string;
|
|
2029
|
+
/**
|
|
2030
|
+
* Total amount in the smallest currency units.
|
|
2031
|
+
* @format int64
|
|
2032
|
+
*/
|
|
2033
|
+
total_amount: number;
|
|
2034
|
+
/**
|
|
2035
|
+
* Formatted string representation of the total amount.
|
|
2036
|
+
* @readonly Set by the API; ignored on write.
|
|
2037
|
+
*/
|
|
2038
|
+
total_amount_str: string;
|
|
2039
|
+
/**
|
|
2040
|
+
* Initial discount amount in the smallest currency units for the first billing cycle.
|
|
2041
|
+
* @format int64
|
|
2042
|
+
*/
|
|
2043
|
+
initial_discount_amount: number;
|
|
2044
|
+
/**
|
|
2045
|
+
* Formatted string representation of the initial discount amount.
|
|
2046
|
+
* @readonly Set by the API; ignored on write.
|
|
2047
|
+
*/
|
|
2048
|
+
initial_discount_amount_str: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* Initial subtotal amount in smallest currency units for the first billing cycle.
|
|
2051
|
+
* @format int64
|
|
2052
|
+
*/
|
|
2053
|
+
initial_subtotal_amount: number;
|
|
2054
|
+
/**
|
|
2055
|
+
* Formatted string representation of the initial subtotal amount.
|
|
2056
|
+
* @readonly Set by the API; ignored on write.
|
|
2057
|
+
*/
|
|
2058
|
+
initial_subtotal_amount_str: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* Initial gift card usage amount in smallest currency units.
|
|
2061
|
+
* @format int64
|
|
2062
|
+
*/
|
|
2063
|
+
initial_giftcard_usage_amount: number;
|
|
2064
|
+
/**
|
|
2065
|
+
* Formatted string representation of the initial gift card usage amount.
|
|
2066
|
+
* @readonly Set by the API; ignored on write.
|
|
2067
|
+
*/
|
|
2068
|
+
initial_giftcard_usage_amount_str: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* Initial tax amount in smallest currency units for the first billing cycle.
|
|
2071
|
+
* @format int64
|
|
2072
|
+
*/
|
|
2073
|
+
initial_tax_amount: number;
|
|
2074
|
+
/**
|
|
2075
|
+
* Formatted string representation of the initial tax amount.
|
|
2076
|
+
* @readonly Set by the API; ignored on write.
|
|
2077
|
+
*/
|
|
2078
|
+
initial_tax_amount_str: string;
|
|
2079
|
+
/**
|
|
2080
|
+
* Initial total amount in smallest currency units for the first billing cycle.
|
|
2081
|
+
* @format int64
|
|
2082
|
+
*/
|
|
2083
|
+
initial_total_amount: number;
|
|
2084
|
+
/**
|
|
2085
|
+
* Formatted string representation of the initial total amount.
|
|
2086
|
+
* @readonly Set by the API; ignored on write.
|
|
2087
|
+
*/
|
|
2088
|
+
initial_total_amount_str: string;
|
|
2089
|
+
/**
|
|
2090
|
+
* Presentment currency code (currency shown to customer).
|
|
2091
|
+
*/
|
|
2092
|
+
presentment_currency?: string | null;
|
|
2093
|
+
/**
|
|
2094
|
+
* Presentment subtotal amount in smallest currency units.
|
|
2095
|
+
* @format int64
|
|
2096
|
+
*/
|
|
2097
|
+
presentment_subtotal_amount?: number | null;
|
|
2098
|
+
/**
|
|
2099
|
+
* Formatted string representation of the presentment subtotal amount.
|
|
2100
|
+
* @readonly Set by the API; ignored on write.
|
|
2101
|
+
*/
|
|
2102
|
+
presentment_subtotal_amount_str?: string | null;
|
|
2103
|
+
/**
|
|
2104
|
+
* Presentment discount amount in smallest currency units.
|
|
2105
|
+
* @format int64
|
|
2106
|
+
*/
|
|
2107
|
+
presentment_discount_amount?: number | null;
|
|
2108
|
+
/**
|
|
2109
|
+
* Formatted string representation of the presentment discount amount.
|
|
2110
|
+
* @readonly Set by the API; ignored on write.
|
|
2111
|
+
*/
|
|
2112
|
+
presentment_discount_amount_str?: string | null;
|
|
2113
|
+
/**
|
|
2114
|
+
* Presentment tax amount in smallest currency units.
|
|
2115
|
+
* @format int64
|
|
2116
|
+
*/
|
|
2117
|
+
presentment_tax_amount?: number | null;
|
|
2118
|
+
/**
|
|
2119
|
+
* Formatted string representation of the presentment tax amount.
|
|
2120
|
+
* @readonly Set by the API; ignored on write.
|
|
2121
|
+
*/
|
|
2122
|
+
presentment_tax_amount_str?: string | null;
|
|
2123
|
+
/**
|
|
2124
|
+
* Presentment total amount in smallest currency units.
|
|
2125
|
+
* @format int64
|
|
2126
|
+
*/
|
|
2127
|
+
presentment_total_amount?: number | null;
|
|
2128
|
+
/**
|
|
2129
|
+
* Formatted string representation of the presentment total amount.
|
|
2130
|
+
* @readonly Set by the API; ignored on write.
|
|
2131
|
+
*/
|
|
2132
|
+
presentment_total_amount_str?: string | null;
|
|
2133
|
+
/**
|
|
2134
|
+
* Initial presentment discount amount in smallest currency units for the first billing cycle.
|
|
2135
|
+
* @format int64
|
|
2136
|
+
*/
|
|
2137
|
+
initial_presentment_discount_amount?: number | null;
|
|
2138
|
+
/**
|
|
2139
|
+
* Formatted string representation of the initial presentment discount amount.
|
|
2140
|
+
* @readonly Set by the API; ignored on write.
|
|
2141
|
+
*/
|
|
2142
|
+
initial_presentment_discount_amount_str?: string | null;
|
|
2143
|
+
/**
|
|
2144
|
+
* Initial presentment subtotal amount in smallest currency units for the first billing cycle.
|
|
2145
|
+
* @format int64
|
|
2146
|
+
*/
|
|
2147
|
+
initial_presentment_subtotal_amount?: number | null;
|
|
2148
|
+
/**
|
|
2149
|
+
* Formatted string representation of the initial presentment subtotal amount.
|
|
2150
|
+
* @readonly Set by the API; ignored on write.
|
|
2151
|
+
*/
|
|
2152
|
+
initial_presentment_subtotal_amount_str?: string | null;
|
|
2153
|
+
/**
|
|
2154
|
+
* Initial presentment gift card usage amount in smallest currency units.
|
|
2155
|
+
* @format int64
|
|
2156
|
+
*/
|
|
2157
|
+
initial_presentment_giftcard_usage_amount?: number | null;
|
|
2158
|
+
/**
|
|
2159
|
+
* Formatted string representation of the initial presentment gift card usage amount.
|
|
2160
|
+
* @readonly Set by the API; ignored on write.
|
|
2161
|
+
*/
|
|
2162
|
+
initial_presentment_giftcard_usage_amount_str?: string | null;
|
|
2163
|
+
/**
|
|
2164
|
+
* Initial presentment tax amount in smallest currency units for the first billing cycle.
|
|
2165
|
+
* @format int64
|
|
2166
|
+
*/
|
|
2167
|
+
initial_presentment_tax_amount?: number | null;
|
|
2168
|
+
/**
|
|
2169
|
+
* Formatted string representation of the initial presentment tax amount.
|
|
2170
|
+
* @readonly Set by the API; ignored on write.
|
|
2171
|
+
*/
|
|
2172
|
+
initial_presentment_tax_amount_str?: string | null;
|
|
2173
|
+
/**
|
|
2174
|
+
* Initial presentment total amount in smallest currency units for the first billing cycle.
|
|
2175
|
+
* @format int64
|
|
2176
|
+
*/
|
|
2177
|
+
initial_presentment_total_amount?: number | null;
|
|
2178
|
+
/**
|
|
2179
|
+
* Formatted string representation of the initial presentment total amount.
|
|
2180
|
+
* @readonly Set by the API; ignored on write.
|
|
2181
|
+
*/
|
|
2182
|
+
initial_presentment_total_amount_str?: string | null;
|
|
2183
|
+
/**
|
|
2184
|
+
* The foreign exchange rate applied (if presentment currency differs from settlement currency).
|
|
2185
|
+
*/
|
|
2186
|
+
fx_rate?: string | null;
|
|
2187
|
+
/**
|
|
2188
|
+
* Start date of the current billing period.
|
|
2189
|
+
* @format date-time
|
|
2190
|
+
*/
|
|
2191
|
+
current_period_start?: string | null;
|
|
2192
|
+
/**
|
|
2193
|
+
* End date of the current billing period.
|
|
2194
|
+
* @format date-time
|
|
2195
|
+
*/
|
|
2196
|
+
current_period_end?: string | null;
|
|
2197
|
+
/**
|
|
2198
|
+
* Sequence number of the current billing cycle.
|
|
2199
|
+
* @format int32
|
|
2200
|
+
*/
|
|
2201
|
+
billing_cycle_sequence?: number | null;
|
|
2202
|
+
/**
|
|
2203
|
+
* Date and time when the next payment attempt will occur.
|
|
2204
|
+
* @format date-time
|
|
2205
|
+
*/
|
|
2206
|
+
next_attempt_at?: string | null;
|
|
2207
|
+
/**
|
|
2208
|
+
* Number of payment attempts made for the current billing cycle.
|
|
2209
|
+
* @format int32
|
|
2210
|
+
*/
|
|
2211
|
+
attempt_count?: number | null;
|
|
2212
|
+
/**
|
|
2213
|
+
* Date and time when the subscription was created.
|
|
2214
|
+
* @format date-time
|
|
2215
|
+
*/
|
|
2216
|
+
created_at: string;
|
|
2217
|
+
/**
|
|
2218
|
+
* Date and time when the subscription was last updated.
|
|
2219
|
+
* @format date-time
|
|
2220
|
+
*/
|
|
2221
|
+
updated_at?: string | null;
|
|
2222
|
+
/**
|
|
2223
|
+
* Date and time when the subscription became active.
|
|
2224
|
+
* @format date-time
|
|
2225
|
+
*/
|
|
2226
|
+
active_at?: string | null;
|
|
2227
|
+
/**
|
|
2228
|
+
* Date and time when the subscription was canceled.
|
|
2229
|
+
* @format date-time
|
|
2230
|
+
*/
|
|
2231
|
+
canceled_at?: string | null;
|
|
2232
|
+
/**
|
|
2233
|
+
* Reason provided for cancellation.
|
|
2234
|
+
*/
|
|
2235
|
+
cancel_reason?: string | null;
|
|
2236
|
+
/**
|
|
2237
|
+
* Date and time when a subscription cancellation (cancel_at_period_end) was requested.
|
|
2238
|
+
* @format date-time
|
|
2239
|
+
*/
|
|
2240
|
+
cancellation_requested_at?: string | null;
|
|
2241
|
+
/**
|
|
2242
|
+
* Whether the subscription will be canceled at the end of the billing period.
|
|
2243
|
+
* @readonly Set by the API; ignored on write.
|
|
2244
|
+
*/
|
|
2245
|
+
cancel_at_period_end: boolean;
|
|
2246
|
+
/**
|
|
2247
|
+
* Whether the subscription is past due, and is in a dunning (retrying) state.
|
|
2248
|
+
*/
|
|
2249
|
+
past_due: boolean;
|
|
2250
|
+
/**
|
|
2251
|
+
* Line items associated with this subscription.
|
|
2252
|
+
*/
|
|
2253
|
+
lines: Array<StorefrontSubscriptionLineDto>;
|
|
2254
|
+
}
|
|
2255
|
+
/**
|
|
2256
|
+
* Represents a line item within a subscription.
|
|
2257
|
+
*/
|
|
2258
|
+
export interface StorefrontSubscriptionLineDto {
|
|
2259
|
+
id: FlakeId;
|
|
2260
|
+
store_id: FlakeId;
|
|
2261
|
+
subscription_id: FlakeId;
|
|
2262
|
+
checkout_line_id?: FlakeId;
|
|
2263
|
+
initial_order_line_id?: FlakeId;
|
|
2264
|
+
/**
|
|
2265
|
+
* Identifier for the pricing region associated with this subscription line.
|
|
2266
|
+
*/
|
|
2267
|
+
pricing_region_id?: string | null;
|
|
2268
|
+
gift_to_customer_id?: FlakeId;
|
|
2269
|
+
selected_gameserver_id?: FlakeId;
|
|
2270
|
+
sale_id?: FlakeId;
|
|
2271
|
+
sale_version_id?: FlakeId;
|
|
2272
|
+
trial_id?: FlakeId;
|
|
2273
|
+
product_id: FlakeId;
|
|
2274
|
+
product_version_id: FlakeId;
|
|
2275
|
+
/**
|
|
2276
|
+
* Name of the product associated with this subscription line.
|
|
2277
|
+
*/
|
|
2278
|
+
product_name: string;
|
|
2279
|
+
/**
|
|
2280
|
+
* URL for the product image.
|
|
2281
|
+
*/
|
|
2282
|
+
product_image_url?: string | null;
|
|
2283
|
+
/**
|
|
2284
|
+
* Indicates whether tax is included in the base price itself.
|
|
2285
|
+
*/
|
|
2286
|
+
tax_inclusive: boolean;
|
|
2287
|
+
/**
|
|
2288
|
+
* Currency code for this subscription line.
|
|
2289
|
+
*/
|
|
2290
|
+
currency: string;
|
|
2291
|
+
/**
|
|
2292
|
+
* Base price of the subscription line in smallest currency units (e.g., cents).
|
|
2293
|
+
* @format int64
|
|
2294
|
+
*/
|
|
2295
|
+
price: number;
|
|
2296
|
+
/**
|
|
2297
|
+
* Amount of discount applied in smallest currency units.
|
|
2298
|
+
* @format int64
|
|
2299
|
+
*/
|
|
2300
|
+
discount_amount: number;
|
|
2301
|
+
/**
|
|
2302
|
+
* Formatted string representation of the discount amount.
|
|
2303
|
+
* @readonly Set by the API; ignored on write.
|
|
2304
|
+
*/
|
|
2305
|
+
discount_amount_str: string;
|
|
2306
|
+
/**
|
|
2307
|
+
* Subtotal amount in smallest currency units.
|
|
2308
|
+
* @format int64
|
|
2309
|
+
*/
|
|
2310
|
+
subtotal_amount: number;
|
|
2311
|
+
/**
|
|
2312
|
+
* Formatted string representation of the subtotal amount.
|
|
2313
|
+
* @readonly Set by the API; ignored on write.
|
|
2314
|
+
*/
|
|
2315
|
+
subtotal_amount_str: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* Tax amount in smallest currency units.
|
|
2318
|
+
* @format int64
|
|
2319
|
+
*/
|
|
2320
|
+
tax_amount: number;
|
|
2321
|
+
/**
|
|
2322
|
+
* Formatted string representation of the tax amount.
|
|
2323
|
+
* @readonly Set by the API; ignored on write.
|
|
2324
|
+
*/
|
|
2325
|
+
tax_amount_str: string;
|
|
2326
|
+
/**
|
|
2327
|
+
* Total amount in smallest currency units.
|
|
2328
|
+
* @format int64
|
|
2329
|
+
*/
|
|
2330
|
+
total_amount: number;
|
|
2331
|
+
/**
|
|
2332
|
+
* Formatted string representation of the total amount.
|
|
2333
|
+
* @readonly Set by the API; ignored on write.
|
|
2334
|
+
*/
|
|
2335
|
+
total_amount_str: string;
|
|
2336
|
+
/**
|
|
2337
|
+
* Initial discount amount in smallest currency units for the first billing cycle.
|
|
2338
|
+
* @format int64
|
|
2339
|
+
*/
|
|
2340
|
+
initial_discount_amount: number;
|
|
2341
|
+
/**
|
|
2342
|
+
* Formatted string representation of the initial discount amount.
|
|
2343
|
+
* @readonly Set by the API; ignored on write.
|
|
2344
|
+
*/
|
|
2345
|
+
initial_discount_amount_str: string;
|
|
2346
|
+
/**
|
|
2347
|
+
* Initial subtotal amount in smallest currency units for the first billing cycle.
|
|
2348
|
+
* @format int64
|
|
2349
|
+
*/
|
|
2350
|
+
initial_subtotal_amount: number;
|
|
2351
|
+
/**
|
|
2352
|
+
* Formatted string representation of the initial subtotal amount.
|
|
2353
|
+
* @readonly Set by the API; ignored on write.
|
|
2354
|
+
*/
|
|
2355
|
+
initial_subtotal_amount_str: string;
|
|
2356
|
+
/**
|
|
2357
|
+
* Initial gift card usage amount in smallest currency units.
|
|
2358
|
+
* @format int64
|
|
2359
|
+
*/
|
|
2360
|
+
initial_giftcard_usage_amount: number;
|
|
2361
|
+
/**
|
|
2362
|
+
* Formatted string representation of the initial gift card usage amount.
|
|
2363
|
+
* @readonly Set by the API; ignored on write.
|
|
2364
|
+
*/
|
|
2365
|
+
initial_giftcard_usage_amount_str: string;
|
|
2366
|
+
/**
|
|
2367
|
+
* Initial tax amount in smallest currency units for the first billing cycle.
|
|
2368
|
+
* @format int64
|
|
2369
|
+
*/
|
|
2370
|
+
initial_tax_amount: number;
|
|
2371
|
+
/**
|
|
2372
|
+
* Formatted string representation of the initial tax amount.
|
|
2373
|
+
* @readonly Set by the API; ignored on write.
|
|
2374
|
+
*/
|
|
2375
|
+
initial_tax_amount_str: string;
|
|
2376
|
+
/**
|
|
2377
|
+
* Initial total amount in smallest currency units for the first billing cycle.
|
|
2378
|
+
* @format int64
|
|
2379
|
+
*/
|
|
2380
|
+
initial_total_amount: number;
|
|
2381
|
+
/**
|
|
2382
|
+
* Formatted string representation of the initial total amount.
|
|
2383
|
+
* @readonly Set by the API; ignored on write.
|
|
2384
|
+
*/
|
|
2385
|
+
initial_total_amount_str: string;
|
|
2386
|
+
/**
|
|
2387
|
+
* Presentment currency code (currency shown to customer).
|
|
2388
|
+
*/
|
|
2389
|
+
presentment_currency?: string | null;
|
|
2390
|
+
/**
|
|
2391
|
+
* Presentment subtotal amount in smallest currency units.
|
|
2392
|
+
* @format int64
|
|
2393
|
+
*/
|
|
2394
|
+
presentment_subtotal_amount?: number | null;
|
|
2395
|
+
/**
|
|
2396
|
+
* Formatted string representation of the presentment subtotal amount.
|
|
2397
|
+
* @readonly Set by the API; ignored on write.
|
|
2398
|
+
*/
|
|
2399
|
+
presentment_subtotal_amount_str?: string | null;
|
|
2400
|
+
/**
|
|
2401
|
+
* Presentment discount amount in smallest currency units.
|
|
2402
|
+
* @format int64
|
|
2403
|
+
*/
|
|
2404
|
+
presentment_discount_amount?: number | null;
|
|
2405
|
+
/**
|
|
2406
|
+
* Formatted string representation of the presentment discount amount.
|
|
2407
|
+
* @readonly Set by the API; ignored on write.
|
|
2408
|
+
*/
|
|
2409
|
+
presentment_discount_amount_str?: string | null;
|
|
2410
|
+
/**
|
|
2411
|
+
* Presentment tax amount in smallest currency units.
|
|
2412
|
+
* @format int64
|
|
2413
|
+
*/
|
|
2414
|
+
presentment_tax_amount?: number | null;
|
|
2415
|
+
/**
|
|
2416
|
+
* Formatted string representation of the presentment tax amount.
|
|
2417
|
+
* @readonly Set by the API; ignored on write.
|
|
2418
|
+
*/
|
|
2419
|
+
presentment_tax_amount_str?: string | null;
|
|
2420
|
+
/**
|
|
2421
|
+
* Presentment total amount in smallest currency units.
|
|
2422
|
+
* @format int64
|
|
2423
|
+
*/
|
|
2424
|
+
presentment_total_amount?: number | null;
|
|
2425
|
+
/**
|
|
2426
|
+
* Formatted string representation of the presentment total amount.
|
|
2427
|
+
* @readonly Set by the API; ignored on write.
|
|
2428
|
+
*/
|
|
2429
|
+
presentment_total_amount_str?: string | null;
|
|
2430
|
+
/**
|
|
2431
|
+
* Initial presentment discount amount in smallest currency units for the first billing cycle.
|
|
2432
|
+
* @format int64
|
|
2433
|
+
*/
|
|
2434
|
+
initial_presentment_discount_amount?: number | null;
|
|
2435
|
+
/**
|
|
2436
|
+
* Formatted string representation of the initial presentment discount amount.
|
|
2437
|
+
* @readonly Set by the API; ignored on write.
|
|
2438
|
+
*/
|
|
2439
|
+
initial_presentment_discount_amount_str?: string | null;
|
|
2440
|
+
/**
|
|
2441
|
+
* Initial presentment subtotal amount in smallest currency units for the first billing cycle.
|
|
2442
|
+
* @format int64
|
|
2443
|
+
*/
|
|
2444
|
+
initial_presentment_subtotal_amount?: number | null;
|
|
2445
|
+
/**
|
|
2446
|
+
* Formatted string representation of the initial presentment subtotal amount.
|
|
2447
|
+
* @readonly Set by the API; ignored on write.
|
|
2448
|
+
*/
|
|
2449
|
+
initial_presentment_subtotal_amount_str?: string | null;
|
|
2450
|
+
/**
|
|
2451
|
+
* Initial presentment gift card usage amount in smallest currency units.
|
|
2452
|
+
* @format int64
|
|
2453
|
+
*/
|
|
2454
|
+
initial_presentment_giftcard_usage_amount?: number | null;
|
|
2455
|
+
/**
|
|
2456
|
+
* Formatted string representation of the initial presentment gift card usage amount.
|
|
2457
|
+
* @readonly Set by the API; ignored on write.
|
|
2458
|
+
*/
|
|
2459
|
+
initial_presentment_giftcard_usage_amount_str?: string | null;
|
|
2460
|
+
/**
|
|
2461
|
+
* Initial presentment tax amount in smallest currency units for the first billing cycle.
|
|
2462
|
+
* @format int64
|
|
2463
|
+
*/
|
|
2464
|
+
initial_presentment_tax_amount?: number | null;
|
|
2465
|
+
/**
|
|
2466
|
+
* Formatted string representation of the initial presentment tax amount.
|
|
2467
|
+
* @readonly Set by the API; ignored on write.
|
|
2468
|
+
*/
|
|
2469
|
+
initial_presentment_tax_amount_str?: string | null;
|
|
2470
|
+
/**
|
|
2471
|
+
* Initial presentment total amount in smallest currency units for the first billing cycle.
|
|
2472
|
+
* @format int64
|
|
2473
|
+
*/
|
|
2474
|
+
initial_presentment_total_amount?: number | null;
|
|
2475
|
+
/**
|
|
2476
|
+
* Formatted string representation of the initial presentment total amount.
|
|
2477
|
+
* @readonly Set by the API; ignored on write.
|
|
2478
|
+
*/
|
|
2479
|
+
initial_presentment_total_amount_str?: string | null;
|
|
2480
|
+
}
|
|
2481
|
+
/**
|
|
2482
|
+
* Represents a tag entity used for categorizing and filtering products within a store.
|
|
2483
|
+
*/
|
|
2484
|
+
export interface StorefrontTagDto {
|
|
2485
|
+
id: FlakeId;
|
|
2486
|
+
store_id: FlakeId;
|
|
2487
|
+
/**
|
|
2488
|
+
* The URL-friendly identifier for the tag, used in category URLs.
|
|
2489
|
+
*/
|
|
2490
|
+
slug: string;
|
|
2491
|
+
/**
|
|
2492
|
+
* The display name of the tag shown to customers.
|
|
2493
|
+
*/
|
|
2494
|
+
name: string;
|
|
2495
|
+
/**
|
|
2496
|
+
* A detailed description of the tag's purpose or the category it represents.
|
|
2497
|
+
*/
|
|
2498
|
+
description?: string | null;
|
|
2499
|
+
/**
|
|
2500
|
+
* The URL to the tag image.
|
|
2501
|
+
* @example "https://cdn.paynow.gg/logo/full/logotype-color.svg"
|
|
2502
|
+
*/
|
|
2503
|
+
image_url?: string | null;
|
|
2504
|
+
/**
|
|
2505
|
+
* Indicates whether the tag is active and should be included in navigation and filtering.
|
|
2506
|
+
*/
|
|
2507
|
+
enabled: boolean;
|
|
2508
|
+
/**
|
|
2509
|
+
* The date and time when the tag was created.
|
|
2510
|
+
* @format date-time
|
|
2511
|
+
*/
|
|
2512
|
+
created_at: string;
|
|
2513
|
+
/**
|
|
2514
|
+
* The date and time when the tag was last updated, if applicable.
|
|
2515
|
+
* @format date-time
|
|
2516
|
+
*/
|
|
2517
|
+
updated_at?: string | null;
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Request headers
|
|
2521
|
+
*/
|
|
2522
|
+
export type StoreGetStorefrontStoreHeaders = {
|
|
2523
|
+
/**
|
|
2524
|
+
* The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
|
|
2525
|
+
* @format ipv4
|
|
2526
|
+
*/
|
|
2527
|
+
"x-paynow-customer-ip"?: string;
|
|
2528
|
+
/**
|
|
2529
|
+
* The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
|
|
2530
|
+
* @pattern ^[A-Z]{2}$
|
|
2531
|
+
*/
|
|
2532
|
+
"x-paynow-customer-countrycode"?: string;
|
|
2533
|
+
};
|
|
2534
|
+
/**
|
|
2535
|
+
* Represents a member of a PayNow store.
|
|
2536
|
+
*/
|
|
2537
|
+
export interface StoreMemberDto {
|
|
2538
|
+
id: FlakeId;
|
|
2539
|
+
user_id: FlakeId;
|
|
2540
|
+
user: StoreMemberUserDto;
|
|
2541
|
+
/**
|
|
2542
|
+
* The UTC timestamp when the member was added to the store.
|
|
2543
|
+
* @format date-time
|
|
2544
|
+
*/
|
|
2545
|
+
added_at?: string | null;
|
|
2546
|
+
added_by?: ActorDto;
|
|
2547
|
+
role_id?: FlakeId;
|
|
2548
|
+
}
|
|
2549
|
+
/**
|
|
2550
|
+
* Represents identity and profile information for a store member.
|
|
2551
|
+
*/
|
|
2552
|
+
export interface StoreMemberUserDto {
|
|
2553
|
+
type: PayNowActorType;
|
|
2554
|
+
id: FlakeId;
|
|
2555
|
+
/**
|
|
2556
|
+
* The email address associated with the user.
|
|
2557
|
+
* Only visible if you are the store owner.
|
|
2558
|
+
*/
|
|
2559
|
+
email?: string | null;
|
|
2560
|
+
/**
|
|
2561
|
+
* The first name of the actor.
|
|
2562
|
+
* Hidden if the user has a set nickname, and you are not the store owner.
|
|
2563
|
+
*/
|
|
2564
|
+
first_name?: string | null;
|
|
2565
|
+
/**
|
|
2566
|
+
* The last name of the actor.
|
|
2567
|
+
* Hidden if the user has a set nickname, and you are not the store owner.
|
|
2568
|
+
*/
|
|
2569
|
+
last_name?: string | null;
|
|
2570
|
+
/**
|
|
2571
|
+
* The nickname of the user.
|
|
2572
|
+
*/
|
|
2573
|
+
nickname?: string | null;
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* Determines the party that needs to perform or requests a verification
|
|
2577
|
+
* - `store`: The associated store
|
|
2578
|
+
* - `paynow`: We as a platform, RequestedByDetail is the admin actor ID in that case (or null if internal)
|
|
2579
|
+
* - `payment_processor`: Payment processor, e.g. Stripe
|
|
2580
|
+
* - `payout_provider`: Payout provider, e.g. Trolley, PayPal
|
|
2581
|
+
* - `kyc_provider`: KYC provider, e.g. Stripe, Onefootprint
|
|
2582
|
+
* - `external`: External party, not fitting in any other category, e.g. government, regulators
|
|
2583
|
+
*/
|
|
2584
|
+
export type StoreRequirementActionParty = "invalid" | "store" | "paynow" | "payment_processor" | "payout_provider" | "kyc_provider" | "external";
|
|
2585
|
+
/**
|
|
2586
|
+
* Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform.
|
|
2587
|
+
* - `invalid`: Invalid or unspecified category. Default value that should not be used in production.
|
|
2588
|
+
* - `business`: Business information and operational requirements.
|
|
2589
|
+
Includes company details, business model, store policies, refund procedures,
|
|
2590
|
+
and operational guidelines for running a store on PayNow.
|
|
2591
|
+
* - `kyc`: Know Your Customer (KYC) identity verification requirements.
|
|
2592
|
+
Includes government-issued ID verification, proof of address, and identity confirmation
|
|
2593
|
+
as per PayNow's KYC Policy and conducted via any third party KYC partners
|
|
2594
|
+
* - `compliance`: Regulatory compliance requirements including AML checks and content policies.
|
|
2595
|
+
Covers sanctions screening, FATF checks, prohibited customer/product screening,
|
|
2596
|
+
and content compliance as defined in PayNow's policies.
|
|
2597
|
+
* - `risk`: Risk management and fraud prevention requirements.
|
|
2598
|
+
Includes transaction monitoring, unusual activity detection, and ongoing
|
|
2599
|
+
risk assessment procedures to protect against fraudulent activities.
|
|
2600
|
+
* - `technical`: Technical integration and setup requirements.
|
|
2601
|
+
Covers API configuration, webhook setup, platform integration, and any technical
|
|
2602
|
+
prerequisites for store operation.
|
|
2603
|
+
* - `financial`: Financial setup and verification requirements.
|
|
2604
|
+
Includes payment processing configuration, banking information, Tipalti/Trolley payout setup,
|
|
2605
|
+
tax documentation (W-9, W-8, etc.), and payment method verification.
|
|
2606
|
+
* - `legal`: Legal agreement and policy acceptance requirements.
|
|
2607
|
+
Covers acceptance of User Agreement, Terms of Service, Privacy Policy,
|
|
2608
|
+
and any other legal documents required by PayNow for store operation.
|
|
2609
|
+
* - `other`: Other miscellaneous requirements that don't fit into the above categories.
|
|
2610
|
+
Used for special cases or additional requirements specific to certain store types
|
|
2611
|
+
or jurisdictions.
|
|
2612
|
+
*/
|
|
2613
|
+
export type StoreRequirementCategory = "invalid" | "business" | "kyc" | "compliance" | "risk" | "technical" | "financial" | "legal" | "other";
|
|
2614
|
+
/**
|
|
2615
|
+
* - `pending`: Requirement created, awaiting action
|
|
2616
|
+
* - `under_review`: Submitted, under review, or awaiting external verification
|
|
2617
|
+
* - `requires_revision`: Rejected, needs store to resubmit with corrections
|
|
2618
|
+
* - `approved`: Requirement successfully fulfilled
|
|
2619
|
+
* - `expired`: Requirement expired and needs renewal
|
|
2620
|
+
* - `waived`: Requirement waived by PayNow (manual override)
|
|
2621
|
+
* - `rejected_final`: Requirement fully rejected - usually terminal state for the entire store
|
|
2622
|
+
*/
|
|
2623
|
+
export type StoreRequirementStatus = "invalid" | "pending" | "under_review" | "requires_revision" | "approved" | "expired" | "waived" | "rejected_final";
|
|
2624
|
+
export type StoreRestrictionFlagDto = "none" | "payments_disabled" | "payouts_disabled";
|
|
2625
|
+
export interface StoreTrustDto {
|
|
2626
|
+
store_id: FlakeId;
|
|
2627
|
+
status: StoreTrustStatusDto;
|
|
2628
|
+
status_reason?: string | null;
|
|
2629
|
+
restrictions: StoreRestrictionFlagDto;
|
|
2630
|
+
/**
|
|
2631
|
+
* @format date-time
|
|
2632
|
+
*/
|
|
2633
|
+
created_at: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* @format date-time
|
|
2636
|
+
*/
|
|
2637
|
+
updated_at?: string | null;
|
|
2638
|
+
onboarding_steps?: StoreTrustOnboardingStepsDto;
|
|
2639
|
+
events: Array<StoreTrustEventDto>;
|
|
2640
|
+
pending_requirements: Array<TrustStoreRequirementDto>;
|
|
2641
|
+
}
|
|
2642
|
+
export interface StoreTrustEventDto {
|
|
2643
|
+
id: FlakeId;
|
|
2644
|
+
store_id: FlakeId;
|
|
2645
|
+
type: StoreTrustEventTypeDto;
|
|
2646
|
+
description?: string | null;
|
|
2647
|
+
store_requirement_id?: FlakeId;
|
|
2648
|
+
store_review_id?: FlakeId;
|
|
2649
|
+
actor: ActorDto;
|
|
2650
|
+
/**
|
|
2651
|
+
* @format date-time
|
|
2652
|
+
*/
|
|
2653
|
+
created_at: string;
|
|
2654
|
+
}
|
|
2655
|
+
export type StoreTrustEventTypeDto = "invalid" | "onboarded" | "escalated_to_review" | "action_required" | "restricted" | "offboarded" | "reactivated" | "requirement_added" | "requirement_submitted" | "requirement_verified" | "requirement_rejected" | "requirement_deadline_missed" | "requirement_waived" | "requirement_requires_revision" | "restriction_added" | "restriction_lifted" | "review_scheduled" | "review_completed";
|
|
2656
|
+
export interface StoreTrustOnboardingStepsDto {
|
|
2657
|
+
store_id: FlakeId;
|
|
2658
|
+
store_owner_id: FlakeId;
|
|
2659
|
+
payout_onboarding_completed: boolean;
|
|
2660
|
+
kyc_completed: boolean;
|
|
2661
|
+
products_created: boolean;
|
|
2662
|
+
gameserver_linked: boolean;
|
|
2663
|
+
webhooks_active: boolean;
|
|
2664
|
+
downloadable_files_added: boolean;
|
|
2665
|
+
}
|
|
2666
|
+
export type StoreTrustStatusDto = "invalid" | "pending_review" | "requires_action" | "under_review" | "active" | "restricted" | "offboarded";
|
|
2667
|
+
/**
|
|
2668
|
+
* Represents a billing amount breakdown for a subscription.
|
|
2669
|
+
*/
|
|
2670
|
+
export interface SubscriptionBillingAmountDto {
|
|
2671
|
+
/**
|
|
2672
|
+
* ISO 4217 currency code, in lowercase.
|
|
2673
|
+
*/
|
|
2674
|
+
currency: string;
|
|
2675
|
+
/**
|
|
2676
|
+
* Base amount before discounts or tax, in smallest currency units.
|
|
2677
|
+
* @format int64
|
|
2678
|
+
*/
|
|
2679
|
+
subtotal: number;
|
|
2680
|
+
/**
|
|
2681
|
+
* Total discount applied, in smallest currency units.
|
|
2682
|
+
* @format int64
|
|
2683
|
+
*/
|
|
2684
|
+
discount: number;
|
|
2685
|
+
/**
|
|
2686
|
+
* Tax amount, in smallest currency units.
|
|
2687
|
+
* @format int64
|
|
2688
|
+
*/
|
|
2689
|
+
tax: number;
|
|
2690
|
+
/**
|
|
2691
|
+
* Amount due after discounts and tax, in smallest currency units.
|
|
2692
|
+
* @format int64
|
|
2693
|
+
*/
|
|
2694
|
+
total: number;
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Pricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents).
|
|
2698
|
+
*/
|
|
2699
|
+
export interface SubscriptionChangeAmountDto {
|
|
2700
|
+
/**
|
|
2701
|
+
* ISO 4217 currency code, in lowercase.
|
|
2702
|
+
*/
|
|
2703
|
+
currency: string;
|
|
2704
|
+
/**
|
|
2705
|
+
* Base amount before discounts or tax, in smallest currency units.
|
|
2706
|
+
* @format int64
|
|
2707
|
+
*/
|
|
2708
|
+
subtotal: number;
|
|
2709
|
+
/**
|
|
2710
|
+
* Total discount applied, in smallest currency units.
|
|
2711
|
+
* @format int64
|
|
2712
|
+
*/
|
|
2713
|
+
discount: number;
|
|
2714
|
+
/**
|
|
2715
|
+
* Tax amount, in smallest currency units.
|
|
2716
|
+
* @format int64
|
|
2717
|
+
*/
|
|
2718
|
+
tax: number;
|
|
2719
|
+
/**
|
|
2720
|
+
* Amount due after discounts and tax, in smallest currency units.
|
|
2721
|
+
* @format int64
|
|
2722
|
+
*/
|
|
2723
|
+
total: number;
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* A pending or applied change to a subscription.
|
|
2727
|
+
*/
|
|
2728
|
+
export interface SubscriptionChangeDto {
|
|
2729
|
+
id: FlakeId;
|
|
2730
|
+
subscription_id: FlakeId;
|
|
2731
|
+
prorated_order_id?: FlakeId;
|
|
2732
|
+
status: SubscriptionChangeStatusDto;
|
|
2733
|
+
proration_behavior: ProrationBehaviorDto;
|
|
2734
|
+
/**
|
|
2735
|
+
* Whether this change was initiated without active customer interaction.
|
|
2736
|
+
*/
|
|
2737
|
+
off_session: boolean;
|
|
2738
|
+
prorated_amount: SubscriptionChangeProratedAmountDto;
|
|
2739
|
+
/**
|
|
2740
|
+
* @format date-time
|
|
2741
|
+
*/
|
|
2742
|
+
created_at: string;
|
|
2743
|
+
/**
|
|
2744
|
+
* @format date-time
|
|
2745
|
+
*/
|
|
2746
|
+
applied_at?: string | null;
|
|
2747
|
+
lines: Array<SubscriptionChangeLineDto>;
|
|
2748
|
+
next_billing_amount: SubscriptionChangeAmountDto;
|
|
2749
|
+
next_billing_presentment_amount: SubscriptionChangeAmountDto;
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* Pricing breakdown for a single subscription change line, in the smallest units of the given currency (e.g. cents).
|
|
2753
|
+
*/
|
|
2754
|
+
export interface SubscriptionChangeLineAmountDto {
|
|
2755
|
+
/**
|
|
2756
|
+
* ISO 4217 currency code in lowercase.
|
|
2757
|
+
*/
|
|
2758
|
+
currency: string;
|
|
2759
|
+
/**
|
|
2760
|
+
* Base amount before discounts or tax, in smallest currency units.
|
|
2761
|
+
* @format int64
|
|
2762
|
+
*/
|
|
2763
|
+
subtotal: number;
|
|
2764
|
+
/**
|
|
2765
|
+
* Total discount applied, in smallest currency units.
|
|
2766
|
+
* @format int64
|
|
2767
|
+
*/
|
|
2768
|
+
discount: number;
|
|
2769
|
+
/**
|
|
2770
|
+
* Tax amount, in smallest currency units.
|
|
2771
|
+
* @format int64
|
|
2772
|
+
*/
|
|
2773
|
+
tax: number;
|
|
2774
|
+
/**
|
|
2775
|
+
* Amount due after discounts and tax, in smallest currency units.
|
|
2776
|
+
* @format int64
|
|
2777
|
+
*/
|
|
2778
|
+
total: number;
|
|
2779
|
+
}
|
|
2780
|
+
/**
|
|
2781
|
+
* A single line item within a subscription change.
|
|
2782
|
+
*/
|
|
2783
|
+
export interface SubscriptionChangeLineDto {
|
|
2784
|
+
id: FlakeId;
|
|
2785
|
+
subscription_line_id?: FlakeId;
|
|
2786
|
+
/**
|
|
2787
|
+
* Whether this line is being removed by the change.
|
|
2788
|
+
*/
|
|
2789
|
+
is_deleted: boolean;
|
|
2790
|
+
/**
|
|
2791
|
+
* Whether tax is included in the base price.
|
|
2792
|
+
*/
|
|
2793
|
+
tax_inclusive: boolean;
|
|
2794
|
+
/**
|
|
2795
|
+
* Base price in smallest settlement currency units.
|
|
2796
|
+
* @format int64
|
|
2797
|
+
*/
|
|
2798
|
+
price: number;
|
|
2799
|
+
product: SubscriptionChangeLineProductDto;
|
|
2800
|
+
amount: SubscriptionChangeLineAmountDto;
|
|
2801
|
+
presentment_amount: SubscriptionChangeLineAmountDto;
|
|
2802
|
+
/**
|
|
2803
|
+
* Prorated charge for this line in smallest settlement currency units.
|
|
2804
|
+
* @format int64
|
|
2805
|
+
*/
|
|
2806
|
+
prorated_amount: number;
|
|
2807
|
+
/**
|
|
2808
|
+
* Prorated charge for this line in smallest presentment currency units.
|
|
2809
|
+
* @format int64
|
|
2810
|
+
*/
|
|
2811
|
+
prorated_presentment_amount: number;
|
|
2812
|
+
/**
|
|
2813
|
+
* Minutes remaining in the billing period at the time of change - used to calculate proration.
|
|
2814
|
+
* @format int64
|
|
2815
|
+
*/
|
|
2816
|
+
remaining_minutes: number;
|
|
2817
|
+
/**
|
|
2818
|
+
* Total minutes in the billing period - used to calculate proration.
|
|
2819
|
+
* @format int64
|
|
2820
|
+
*/
|
|
2821
|
+
total_minutes: number;
|
|
2822
|
+
}
|
|
2823
|
+
/**
|
|
2824
|
+
* The product associated with a subscription change line.
|
|
2825
|
+
*/
|
|
2826
|
+
export interface SubscriptionChangeLineProductDto {
|
|
2827
|
+
id: FlakeId;
|
|
2828
|
+
version_id: FlakeId;
|
|
2829
|
+
/**
|
|
2830
|
+
* Display name of the product.
|
|
2831
|
+
*/
|
|
2832
|
+
name: string;
|
|
2833
|
+
/**
|
|
2834
|
+
* URL of the product image, if set.
|
|
2835
|
+
*/
|
|
2836
|
+
image_url?: string | null;
|
|
2837
|
+
selected_gameserver_id?: FlakeId;
|
|
2838
|
+
/**
|
|
2839
|
+
* The pricing region used to determine the price, if applicable.
|
|
2840
|
+
*/
|
|
2841
|
+
pricing_region_id?: string | null;
|
|
2842
|
+
/**
|
|
2843
|
+
* Custom variables set on this line item, keyed by variable identifier.
|
|
2844
|
+
*/
|
|
2845
|
+
custom_variables: Record<string, CustomVariableLineItemDto>;
|
|
2846
|
+
}
|
|
2847
|
+
/**
|
|
2848
|
+
* The total prorated charge for a subscription change, expressed in both settlement and presentment currencies.
|
|
2849
|
+
*/
|
|
2850
|
+
export interface SubscriptionChangeProratedAmountDto {
|
|
2851
|
+
/**
|
|
2852
|
+
* ISO 4217 settlement currency code, in lowercase.
|
|
2853
|
+
*/
|
|
2854
|
+
currency: string;
|
|
2855
|
+
/**
|
|
2856
|
+
* Total prorated charge in smallest settlement currency units, including tax.
|
|
2857
|
+
* @format int64
|
|
2858
|
+
*/
|
|
2859
|
+
prorated_amount: number;
|
|
2860
|
+
/**
|
|
2861
|
+
* ISO 4217 presentment currency code, in lowercase.
|
|
2862
|
+
*/
|
|
2863
|
+
presentment_currency: string;
|
|
2864
|
+
/**
|
|
2865
|
+
* Total prorated charge in smallest presentment currency units, including tax.
|
|
2866
|
+
* @format int64
|
|
2867
|
+
*/
|
|
2868
|
+
presentment_prorated_amount: number;
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
* Represents the status of a subscription change.
|
|
2872
|
+
* - `pending_payment`: The change is pending payment before it can be applied.
|
|
2873
|
+
* - `pending_renewal`: The change will be applied at the next renewal.
|
|
2874
|
+
* - `applied`: The change has been applied to the subscription.
|
|
2875
|
+
* - `canceled`: The change was canceled and will not be applied.
|
|
2876
|
+
* - `pending_verification`: The change requires a verification code sent to the customer's e-mail.
|
|
2877
|
+
*/
|
|
2878
|
+
export type SubscriptionChangeStatusDto = "invalid" | "pending_payment" | "pending_renewal" | "applied" | "canceled" | "pending_verification";
|
|
2879
|
+
/**
|
|
2880
|
+
* Query parameters
|
|
2881
|
+
*/
|
|
2882
|
+
export type SubscriptionsGetSubscriptionsQuery = {
|
|
2883
|
+
customer_id?: FlakeId;
|
|
2884
|
+
subscription_id?: FlakeId;
|
|
2885
|
+
billing_email?: string;
|
|
2886
|
+
payment_method_id?: FlakeId;
|
|
2887
|
+
checkout_id?: FlakeId;
|
|
2888
|
+
trial_id?: FlakeId;
|
|
2889
|
+
status?: Array<SubscriptionStatusDto>;
|
|
2890
|
+
/**
|
|
2891
|
+
* The maximum number of items to return in a single request.
|
|
2892
|
+
* @format int32
|
|
2893
|
+
* @minimum 1
|
|
2894
|
+
* @maximum 100
|
|
2895
|
+
*/
|
|
2896
|
+
limit?: number;
|
|
2897
|
+
/**
|
|
2898
|
+
* Returns items after the specified ID.
|
|
2899
|
+
* Used for forward pagination through results.
|
|
2900
|
+
*/
|
|
2901
|
+
after?: FlakeId;
|
|
2902
|
+
/**
|
|
2903
|
+
* Returns items before the specified ID.
|
|
2904
|
+
* Used for backward pagination through results.
|
|
2905
|
+
*/
|
|
2906
|
+
before?: FlakeId;
|
|
2907
|
+
/**
|
|
2908
|
+
* Determines the sort order of returned items.
|
|
2909
|
+
* When true, items are returned in ascending order.
|
|
2910
|
+
* When false, items are returned in descending order.
|
|
2911
|
+
*/
|
|
2912
|
+
asc?: boolean;
|
|
2913
|
+
};
|
|
2914
|
+
/**
|
|
2915
|
+
* Represents the current state of a subscription.
|
|
2916
|
+
* - `created`: The subscription has been created but is not yet active.
|
|
2917
|
+
* - `active`: The subscription is currently active and will renew.
|
|
2918
|
+
* - `canceled`: The subscription has been canceled and will no longer renew.
|
|
2919
|
+
*/
|
|
2920
|
+
export type SubscriptionStatusDto = "invalid" | "created" | "active" | "canceled";
|
|
2921
|
+
export interface TrustStoreRequirementDto {
|
|
2922
|
+
id: FlakeId;
|
|
2923
|
+
store_id: FlakeId;
|
|
2924
|
+
/**
|
|
2925
|
+
* Template ID if this requirement was created from a template. Null for ad-hoc requirements.
|
|
2926
|
+
*/
|
|
2927
|
+
template_id?: string | null;
|
|
2928
|
+
originating_flag_id?: FlakeId;
|
|
2929
|
+
category: StoreRequirementCategory;
|
|
2930
|
+
/**
|
|
2931
|
+
* Unique code identifying the type of requirement. Copied from template or custom for ad-hoc requirements.
|
|
2932
|
+
*/
|
|
2933
|
+
code: string;
|
|
2934
|
+
/**
|
|
2935
|
+
* Human-readable name of the requirement. Copied from template or custom for ad-hoc requirements.
|
|
2936
|
+
*/
|
|
2937
|
+
name: string;
|
|
2938
|
+
/**
|
|
2939
|
+
* Detailed description explaining what the store needs to provide. Copied from template or custom for ad-hoc requirements.
|
|
2940
|
+
*/
|
|
2941
|
+
description?: string | null;
|
|
2942
|
+
/**
|
|
2943
|
+
* JSON schema defining the form fields, validation rules, and document requirements
|
|
2944
|
+
*/
|
|
2945
|
+
schema?: null;
|
|
2946
|
+
/**
|
|
2947
|
+
* Additional metadata for this requirement (stored as JSON)
|
|
2948
|
+
*/
|
|
2949
|
+
metadata: Record<string, string>;
|
|
2950
|
+
status: StoreRequirementStatus;
|
|
2951
|
+
requested_by: StoreRequirementActionParty;
|
|
2952
|
+
/**
|
|
2953
|
+
* Specifies the specific requester entity (e.g., "stripe", "trolley", or admin user ID)
|
|
2954
|
+
* Free-form string for internal records
|
|
2955
|
+
*/
|
|
2956
|
+
requested_by_detail?: string | null;
|
|
2957
|
+
/**
|
|
2958
|
+
* When this requirement was created
|
|
2959
|
+
* @format date-time
|
|
2960
|
+
*/
|
|
2961
|
+
created_at: string;
|
|
2962
|
+
/**
|
|
2963
|
+
* When this requirement was last updated
|
|
2964
|
+
* @format date-time
|
|
2965
|
+
*/
|
|
2966
|
+
updated_at?: string | null;
|
|
2967
|
+
/**
|
|
2968
|
+
* When this requirement must be completed by (optional)
|
|
2969
|
+
* @format date-time
|
|
2970
|
+
*/
|
|
2971
|
+
deadline_at?: string | null;
|
|
2972
|
+
/**
|
|
2973
|
+
* When the store submitted their response to this requirement
|
|
2974
|
+
* @format date-time
|
|
2975
|
+
*/
|
|
2976
|
+
submitted_at?: string | null;
|
|
2977
|
+
/**
|
|
2978
|
+
* When this requirement was verified and approved
|
|
2979
|
+
* @format date-time
|
|
2980
|
+
*/
|
|
2981
|
+
verified_at?: string | null;
|
|
2982
|
+
/**
|
|
2983
|
+
* When this requirement was rejected for not meeting standards
|
|
2984
|
+
* @format date-time
|
|
2985
|
+
*/
|
|
2986
|
+
rejected_at?: string | null;
|
|
2987
|
+
/**
|
|
2988
|
+
* Store capabilities that are restricted until this requirement is satisfied
|
|
2989
|
+
*/
|
|
2990
|
+
restricts_capabilities: Array<string>;
|
|
2991
|
+
/**
|
|
2992
|
+
* Associated submissions for this requriement.
|
|
2993
|
+
*/
|
|
2994
|
+
submissions: Array<TrustStoreRequirementSubmissionDto>;
|
|
2995
|
+
}
|
|
2996
|
+
export interface TrustStoreRequirementSubmissionDto {
|
|
2997
|
+
id: FlakeId;
|
|
2998
|
+
store_id: FlakeId;
|
|
2999
|
+
store_requirement_id: FlakeId;
|
|
3000
|
+
/**
|
|
3001
|
+
* The identifier of the specific field within the store requirement.
|
|
3002
|
+
*/
|
|
3003
|
+
store_requirement_field_id: string;
|
|
3004
|
+
/**
|
|
3005
|
+
* The text value submitted for this field, if applicable.
|
|
3006
|
+
*/
|
|
3007
|
+
text_value?: string | null;
|
|
3008
|
+
/**
|
|
3009
|
+
* The identifier of the uploaded file, if a file was submitted.
|
|
3010
|
+
*/
|
|
3011
|
+
file_id?: string | null;
|
|
3012
|
+
/**
|
|
3013
|
+
* The original name of the uploaded file.
|
|
3014
|
+
*/
|
|
3015
|
+
file_name?: string | null;
|
|
3016
|
+
/**
|
|
3017
|
+
* The MIME content type of the uploaded file.
|
|
3018
|
+
*/
|
|
3019
|
+
file_content_type?: string | null;
|
|
3020
|
+
/**
|
|
3021
|
+
* The size of the uploaded file in bytes.
|
|
3022
|
+
* @format int64
|
|
3023
|
+
*/
|
|
3024
|
+
file_size_bytes?: number | null;
|
|
3025
|
+
/**
|
|
3026
|
+
* The timestamp when this submission was made.
|
|
3027
|
+
* @format date-time
|
|
3028
|
+
*/
|
|
3029
|
+
submitted_at: string;
|
|
3030
|
+
submitted_by: ActorDto;
|
|
3031
|
+
/**
|
|
3032
|
+
* The IP address from which the submission was made.
|
|
3033
|
+
*/
|
|
3034
|
+
submitted_by_ip_address?: string | null;
|
|
3035
|
+
/**
|
|
3036
|
+
* The user agent string of the client that made the submission.
|
|
3037
|
+
*/
|
|
3038
|
+
submitted_by_user_agent?: string | null;
|
|
3039
|
+
}
|
|
3040
|
+
/**
|
|
3041
|
+
* Response returned after a subscription change is initiated.
|
|
3042
|
+
*/
|
|
3043
|
+
export interface UpdateSubscriptionResponseDto {
|
|
3044
|
+
subscription_change: SubscriptionChangeDto;
|
|
3045
|
+
pending_payment?: CheckoutPaymentInfoDto;
|
|
3046
|
+
}
|
|
3047
|
+
export interface UpdateSubscriptionTierRequestDto {
|
|
3048
|
+
target_product_id: FlakeId;
|
|
3049
|
+
/**
|
|
3050
|
+
* A verification code sent to the customer's subscription billing e-mail.
|
|
3051
|
+
* Pass this if the `status` field on the `subscription_change` object equals `pending_verification`.
|
|
3052
|
+
*/
|
|
3053
|
+
verification_code?: string | null;
|
|
3054
|
+
}
|
|
3055
|
+
/**
|
|
3056
|
+
* A validation error.
|
|
3057
|
+
*/
|
|
3058
|
+
export interface ValidationError {
|
|
3059
|
+
/**
|
|
3060
|
+
* The parseable error code.
|
|
3061
|
+
*/
|
|
3062
|
+
code: string;
|
|
3063
|
+
/**
|
|
3064
|
+
* The human-readable error message.
|
|
3065
|
+
*/
|
|
3066
|
+
message: string;
|
|
3067
|
+
/**
|
|
3068
|
+
* The path leading to the validation error.
|
|
3069
|
+
*/
|
|
3070
|
+
path: string;
|
|
3071
|
+
/**
|
|
3072
|
+
* Type of the validation that failed.
|
|
3073
|
+
*/
|
|
3074
|
+
validation: string;
|
|
3075
|
+
}
|
|
3076
|
+
//# sourceMappingURL=types.d.ts.map
|