@paynow-gg/typescript-sdk 2.1.1 → 2.1.3

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.
@@ -363,7 +363,7 @@ export type BanType = "unknown" | "steam" | "ip" | "customer" | "customer_name"
363
363
  /**
364
364
  * Query parameters
365
365
  */
366
- export type BillingGetStoreInvoicesQuery = {
366
+ export type BillingGetStoreBillingOrdersQuery = {
367
367
  /**
368
368
  * The maximum number of items to return in a single request.
369
369
  * @format int32
@@ -2971,15 +2971,6 @@ export type InvoicesListInvoicesQuery = {
2971
2971
  };
2972
2972
  export type InvoiceStatusDto = "invalid" | "pending" | "generated" | "failed";
2973
2973
  export type InvoiceTypeDto = "invalid" | "invoice" | "credit_note";
2974
- /**
2975
- * Represents a freshly issued link to a hosted invoice.
2976
- */
2977
- export interface InvoiceUrlDto {
2978
- /**
2979
- * The hosted invoice URL.
2980
- */
2981
- url: string;
2982
- }
2983
2974
  /**
2984
2975
  * Klarna payment method details
2985
2976
  */
@@ -4168,6 +4159,16 @@ export interface PaymentMethodTypeFeeOverrideDto {
4168
4159
  */
4169
4160
  ends_at?: string | null;
4170
4161
  }
4162
+ /**
4163
+ * A customer portal session scoped to updating the payment method of the store's
4164
+ * active subscription.
4165
+ */
4166
+ export interface PaymentMethodUpdateSessionDto {
4167
+ /**
4168
+ * The URL the store owner has to visit to update the subscription's payment method.
4169
+ */
4170
+ session_url: string;
4171
+ }
4171
4172
  /**
4172
4173
  * Represents payout split results for multi-party payments
4173
4174
  */
@@ -4424,6 +4425,7 @@ export interface PlanDto {
4424
4425
  name: string;
4425
4426
  description?: string | null;
4426
4427
  is_custom: boolean;
4428
+ inherits_from_plan_id?: string | null;
4427
4429
  }
4428
4430
  /**
4429
4431
  * Represents a publicly listed plan a store can subscribe to.
@@ -4488,6 +4490,7 @@ export interface PlanPricingDto {
4488
4490
  * @format date-time
4489
4491
  */
4490
4492
  ends_at?: string | null;
4493
+ revenue_limit_exceeded?: boolean | null;
4491
4494
  }
4492
4495
  export type PlatformCapability = "invalid" | "connected_users";
4493
4496
  export interface PlatformStoreTypeAssociationDetailsDto {
@@ -5668,14 +5671,29 @@ export interface SetDiscordActionDto {
5668
5671
  role_id?: FlakeId;
5669
5672
  message?: string | null;
5670
5673
  }
5674
+ /**
5675
+ * Represents a request to attach a custom domain to a webstore.
5676
+ */
5671
5677
  export interface SetWebstoreCustomDomainRequestDto {
5678
+ /**
5679
+ * The domain to serve the webstore from, without a scheme (e.g., store.example.com).
5680
+ */
5672
5681
  domain: string;
5673
5682
  verification_type: WebstoreCustomDomainVerificationTypeDto;
5674
5683
  }
5684
+ /**
5685
+ * Represents a request to set the template a webstore renders.
5686
+ */
5675
5687
  export interface SetWebstoreDefaultTemplateRequestDto {
5676
5688
  template_id: FlakeId;
5677
5689
  }
5690
+ /**
5691
+ * Represents a request to change the slug a webstore is served from.
5692
+ */
5678
5693
  export interface SetWebstoreSlugRequestDto {
5694
+ /**
5695
+ * The new slug to serve the webstore from. Slugs are unique across all webstores.
5696
+ */
5679
5697
  slug: string;
5680
5698
  }
5681
5699
  export interface StartDataMigrationFromTebexRequestDto {
@@ -5813,11 +5831,11 @@ export interface StoreBillingStatusDto {
5813
5831
  revenue_usage: number;
5814
5832
  plan_limits: Record<string, number>;
5815
5833
  feature_flags: Array<string>;
5834
+ alerts: Array<StoreAlertDto>;
5816
5835
  plan: PlanDto;
5817
5836
  plan_pricing: PlanPricingDto;
5818
5837
  subscription?: StoreSubscriptionDto;
5819
- alerts: Array<StoreAlertDto>;
5820
- payment_method?: SubscriptionPaymentMethodDto;
5838
+ payment_method?: PaymentMethodDto;
5821
5839
  }
5822
5840
  /**
5823
5841
  * Query parameters
@@ -5913,195 +5931,561 @@ export interface StoreDto {
5913
5931
  platform_store_type_association?: PlatformStoreTypeAssociationDetailsDto;
5914
5932
  }
5915
5933
  /**
5916
- * Represents a store entity within the storefront system.
5934
+ * A storefront representation of a customer in the PayNow system with their associated profiles and metadata.
5917
5935
  */
5918
- export interface StorefrontStoreDto {
5936
+ export interface StorefrontCustomerDto {
5919
5937
  id: FlakeId;
5938
+ store_id: FlakeId;
5939
+ profile?: CustomerGenericProfileDto;
5940
+ steam_id?: SteamId;
5941
+ steam?: StorefrontCustomerSteamProfileDto;
5920
5942
  /**
5921
- * The URL-friendly identifier for the store, used in store URLs.
5922
- * @example "m0ukas-awesome-store"
5943
+ * The customer's Minecraft UUID, if they have linked their Minecraft account.
5944
+ * Not set for offline Minecraft stores. If the platform type is Minecraft - Geyser,
5945
+ * and the profile is a bedrock account, this will be a UUID generated from the Xbox XUID.
5946
+ * @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
5923
5947
  */
5924
- slug: string;
5948
+ minecraft_uuid?: string | null;
5949
+ minecraft?: StorefrontCustomerMinecraftProfileDto;
5950
+ minecraft_platform?: CustomerMinecraftPlatform;
5925
5951
  /**
5926
- * The display name of the store shown to customers.
5927
- * @example "m0uka's awesome store"
5952
+ * The customer's Xbox XUID, if available.
5928
5953
  */
5929
- name: string;
5954
+ xbox_xuid?: string | null;
5930
5955
  /**
5931
- * The platform or the game of the store.
5932
- * @example "rust"
5956
+ * The display name for the customer.
5957
+ * @example "m0uka"
5933
5958
  */
5934
- platform: string;
5959
+ name?: string | null;
5960
+ }
5961
+ /**
5962
+ * A storefront representation of a customers Minecraft profile.
5963
+ */
5964
+ export interface StorefrontCustomerMinecraftProfileDto {
5935
5965
  /**
5936
- * The game of the store. Equivalent to the `platform` for backwards compatibility.
5937
- * @readonly Set by the API; ignored on write.
5966
+ * The UUID of the Minecraft player.
5967
+ * If the platform is Minecraft Offline, this will be the name itself.
5968
+ * If the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID.
5969
+ * @example "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2"
5938
5970
  */
5939
- game: string;
5971
+ id: string;
5940
5972
  /**
5941
- * The three-letter ISO currency code used for pricing in this store.
5942
- * If using the Adaptive Currency feature, this will be updated to reflect customer's local currency
5943
- * (based on passed in IP / country headers).
5944
- * @example "eur"
5973
+ * The username of the Minecraft player.
5974
+ * @example "notch"
5945
5975
  */
5946
- currency: string;
5976
+ name: string;
5947
5977
  /**
5948
- * The three-letter ISO currency code signifying the main currency of the store.
5949
- * @example "usd"
5978
+ * The URL to the player's Minecraft skin rendered as an avatar.
5950
5979
  */
5951
- creator_currency: string;
5980
+ avatar_url: string;
5981
+ }
5982
+ /**
5983
+ * A storefront representation of a customers Steam profile.
5984
+ */
5985
+ export interface StorefrontCustomerSteamProfileDto {
5986
+ id: SteamId;
5952
5987
  /**
5953
- * A detailed description of the store. Only present for some platform types.
5988
+ * The display name of the user on Steam.
5954
5989
  */
5955
- description?: string | null;
5990
+ name: string;
5956
5991
  /**
5957
- * The URL of the store's main website, if not using Hosted Webstores.
5992
+ * The URL to the user's Steam avatar image.
5958
5993
  */
5959
- website_url?: string | null;
5994
+ avatar_url: string;
5995
+ }
5996
+ /**
5997
+ * Data transfer object representing a store order.
5998
+ */
5999
+ export interface StorefrontOrderDto {
6000
+ id: FlakeId;
5960
6001
  /**
5961
- * The email address customers can use to contact store support.
5962
- * @example "support@example.com"
6002
+ * Human-readable identifier for the order.
6003
+ * @readonly Set by the API; ignored on write.
5963
6004
  */
5964
- support_email?: string | null;
6005
+ pretty_id: string;
6006
+ store_id: FlakeId;
6007
+ customer_id: FlakeId;
6008
+ customer: StorefrontCustomerDto;
6009
+ status: OrderStatus;
6010
+ type: OrderType;
6011
+ checkout_id?: FlakeId;
6012
+ subscription_id?: FlakeId;
5965
6013
  /**
5966
- * The URL of the store's support page.
6014
+ * Indicates whether this order is a subscription order.
5967
6015
  */
5968
- support_url?: string | null;
6016
+ is_subscription: boolean;
5969
6017
  /**
5970
- * The type of integration this store uses with external systems.
6018
+ * Currency code used for this order.
5971
6019
  */
5972
- integration_type?: string | null;
6020
+ currency: string;
5973
6021
  /**
5974
- * Indicates whether the store is in live mode (true) or test mode (false).
6022
+ * The total discount amount applied to this order in smallest currency unit
6023
+ * @format int32
6024
+ * @example 500
5975
6025
  */
5976
- live_mode: boolean;
6026
+ discount_amount: number;
5977
6027
  /**
5978
- * The URL to the store's main logo image.
6028
+ * The discount amount formatted as a string
6029
+ * @example "$5.00"
5979
6030
  */
5980
- logo_url?: string | null;
6031
+ discount_amount_str: string;
5981
6032
  /**
5982
- * The URL to the store's square logo image.
6033
+ * The subtotal amount for this order in smallest currency unit
6034
+ * @format int32
6035
+ * @example 9995
5983
6036
  */
5984
- logo_square_url?: string | null;
6037
+ subtotal_amount: number;
5985
6038
  /**
5986
- * The date and time when the store was created.
5987
- * @format date-time
6039
+ * The subtotal amount formatted as a string
6040
+ * @example "$99.95"
5988
6041
  */
5989
- created_at?: string | null;
6042
+ subtotal_amount_str: string;
5990
6043
  /**
5991
- * The date and time when the store was last updated.
5992
- * @format date-time
6044
+ * The tax amount for this order in smallest currency unit
6045
+ * @format int32
6046
+ * @example 999
5993
6047
  */
5994
- updated_at?: string | null;
5995
- }
5996
- /**
5997
- * Represents an invoice raised against a store's own subscription.
5998
- */
5999
- export interface StoreInvoiceDto {
6000
- id: FlakeId;
6001
- subscription_id: FlakeId;
6002
- plan_pricing_id: FlakeId;
6048
+ tax_amount: number;
6003
6049
  /**
6004
- * The payment gateway that issued the invoice.
6050
+ * The tax amount formatted as a string
6051
+ * @example "$9.99"
6005
6052
  */
6006
- gateway: string;
6053
+ tax_amount_str: string;
6007
6054
  /**
6008
- * The identifier of the invoice within the payment gateway.
6055
+ * The total amount for this order in smallest currency unit
6056
+ * @format int32
6057
+ * @example 10494
6009
6058
  */
6010
- gateway_invoice_id: string;
6059
+ total_amount: number;
6011
6060
  /**
6012
- * The hosted invoice URL recorded when the invoice was raised. May expire; request
6013
- * 'invoices/{invoice_id}/url' for a freshly issued link.
6061
+ * The total amount formatted as a string
6062
+ * @example "$104.94"
6014
6063
  */
6015
- invoice_url: string;
6064
+ total_amount_str: string;
6016
6065
  /**
6017
- * The description of what was billed.
6066
+ * The amount of gift card value used for this order in smallest currency unit
6067
+ * @format int32
6068
+ * @example 0
6018
6069
  */
6019
- description: string;
6070
+ giftcard_usage_amount: number;
6020
6071
  /**
6021
- * The currency the invoice was issued in.
6072
+ * The gift card usage amount formatted as a string
6073
+ * @example "$0.00"
6022
6074
  */
6023
- currency: string;
6075
+ giftcard_usage_amount_str: string;
6024
6076
  /**
6025
- * The invoiced total, in the smallest currency unit.
6026
- * @format int64
6077
+ * The presentment currency code used for this order (currency shown to customer)
6078
+ * @example "eur"
6027
6079
  */
6028
- total: number;
6080
+ presentment_currency: string;
6029
6081
  /**
6030
- * Whether the invoice has been paid.
6082
+ * The presentment subtotal amount in smallest currency unit
6083
+ * @format int32
6084
+ * @example 9995
6031
6085
  */
6032
- is_paid: boolean;
6086
+ presentment_subtotal_amount: number;
6033
6087
  /**
6034
- * When the invoice was raised.
6035
- * @format date-time
6088
+ * The presentment subtotal amount formatted as a string
6089
+ * @example "€99.95"
6090
+ * @readonly Set by the API; ignored on write.
6036
6091
  */
6037
- created_at: string;
6092
+ presentment_subtotal_amount_str: string;
6038
6093
  /**
6039
- * When the invoice was last updated.
6040
- * @format date-time
6094
+ * The presentment discount amount in smallest currency unit
6095
+ * @format int32
6096
+ * @example 500
6041
6097
  */
6042
- updated_at?: string | null;
6043
- }
6044
- /**
6045
- * Represents a member of a PayNow store.
6046
- */
6047
- export interface StoreMemberDto {
6048
- id: FlakeId;
6049
- user_id: FlakeId;
6050
- user: StoreMemberUserDto;
6098
+ presentment_discount_amount: number;
6051
6099
  /**
6052
- * The UTC timestamp when the member was added to the store.
6053
- * @format date-time
6100
+ * The presentment discount amount formatted as a string
6101
+ * @example "€5.00"
6102
+ * @readonly Set by the API; ignored on write.
6054
6103
  */
6055
- added_at?: string | null;
6056
- added_by?: ActorDto;
6057
- role_id?: FlakeId;
6058
- }
6059
- /**
6060
- * Represents identity and profile information for a store member.
6061
- */
6062
- export interface StoreMemberUserDto {
6063
- type: PayNowActorType;
6064
- id: FlakeId;
6104
+ presentment_discount_amount_str: string;
6065
6105
  /**
6066
- * The email address associated with the user.
6067
- * Only visible if you are the store owner.
6106
+ * The presentment gift card usage amount in the smallest currency unit
6107
+ * @format int32
6108
+ * @example 0
6068
6109
  */
6069
- email?: string | null;
6110
+ presentment_giftcard_usage_amount: number;
6070
6111
  /**
6071
- * The first name of the actor.
6072
- * Hidden if the user has a set nickname, and you are not the store owner.
6112
+ * The presentment gift card usage amount formatted as a string
6113
+ * @example "€0.00"
6114
+ * @readonly Set by the API; ignored on write.
6073
6115
  */
6074
- first_name?: string | null;
6116
+ presentment_giftcard_usage_amount_str: string;
6075
6117
  /**
6076
- * The last name of the actor.
6077
- * Hidden if the user has a set nickname, and you are not the store owner.
6118
+ * The presentment tax amount in smallest currency unit
6119
+ * @format int32
6120
+ * @example 999
6078
6121
  */
6079
- last_name?: string | null;
6122
+ presentment_tax_amount: number;
6080
6123
  /**
6081
- * The nickname of the user.
6124
+ * The presentment tax amount formatted as a string
6125
+ * @example "€9.99"
6126
+ * @readonly Set by the API; ignored on write.
6082
6127
  */
6083
- nickname?: string | null;
6084
- }
6085
- /**
6086
- * Store payment configuration settings.
6087
- */
6088
- export interface StorePaymentSettingsDto {
6128
+ presentment_tax_amount_str: string;
6089
6129
  /**
6090
- * Whether to show all available payment methods for subscription purchases.
6130
+ * The presentment total amount in the smallest currency unit
6131
+ * @format int32
6132
+ * @example 10494
6091
6133
  */
6092
- show_all_payment_methods_for_subscriptions: boolean;
6134
+ presentment_total_amount: number;
6093
6135
  /**
6094
- * Whether store pricing is tax-inclusive.
6136
+ * The presentment total amount formatted as a string
6137
+ * @example "€104.94"
6138
+ * @readonly Set by the API; ignored on write.
6095
6139
  */
6096
- store_tax_inclusive_pricing: boolean;
6097
- block_prepaid_cards: PrepaidCardsBlockingTypeDto;
6098
- promo_code_stacking_behavior: StorePromoCodeStackingBehaviorDto;
6140
+ presentment_total_amount_str: string;
6099
6141
  /**
6100
- * Whether the 'Adaptive Currency' feature is enabled.
6142
+ * Sequence number of the billing cycle, if this order is associated with a subscription.
6143
+ * @format int32
6101
6144
  */
6102
- adaptive_currency_enabled: boolean;
6145
+ billing_cycle_sequence?: number | null;
6103
6146
  /**
6104
- * Whether the displayed currency on the storefront should be the Adaptive Currency by default.
6147
+ * Line items associated with this order.
6148
+ */
6149
+ lines: Array<StorefrontOrderLineDto>;
6150
+ /**
6151
+ * Date and time when the order was created.
6152
+ * @format date-time
6153
+ */
6154
+ created_at?: string | null;
6155
+ /**
6156
+ * Date and time when the order was completed.
6157
+ * @format date-time
6158
+ */
6159
+ completed_at?: string | null;
6160
+ /**
6161
+ * Date and time when the order was canceled.
6162
+ * @format date-time
6163
+ */
6164
+ canceled_at?: string | null;
6165
+ }
6166
+ /**
6167
+ * Represents a line item within an order.
6168
+ */
6169
+ export interface StorefrontOrderLineDto {
6170
+ id: FlakeId;
6171
+ checkout_line_id: FlakeId;
6172
+ subscription_line_id?: FlakeId;
6173
+ trial_id?: FlakeId;
6174
+ product_id: FlakeId;
6175
+ product_version_id: FlakeId;
6176
+ /**
6177
+ * Name of the product associated with this order line.
6178
+ */
6179
+ product_name: string;
6180
+ /**
6181
+ * URL for the product image.
6182
+ */
6183
+ product_image_url: string;
6184
+ /**
6185
+ * Numeric value of the subscription billing interval, if this line is a subscription.
6186
+ * @format int32
6187
+ */
6188
+ subscription_interval_value?: number | null;
6189
+ /**
6190
+ * Scale of the subscription billing interval (e.g., "day", "month", "year"), if applicable.
6191
+ */
6192
+ subscription_interval_scale?: string | null;
6193
+ /**
6194
+ * Indicates whether this order line is a gift to another customer.
6195
+ */
6196
+ gift: boolean;
6197
+ gift_to_customer_id?: FlakeId;
6198
+ gift_to_customer?: StorefrontCustomerDto;
6199
+ /**
6200
+ * The unit price of the product in the smallest currency unit (e.g., cents)
6201
+ * @format int32
6202
+ * @example 1999
6203
+ */
6204
+ price: number;
6205
+ /**
6206
+ * The unit price of the product formatted as a string
6207
+ * @example "$19.99"
6208
+ */
6209
+ price_str: string;
6210
+ /**
6211
+ * The quantity of the product in this order line
6212
+ * @format int32
6213
+ * @example 1
6214
+ */
6215
+ quantity: number;
6216
+ /**
6217
+ * The discount amount (from sales, coupons, and affiliate links) applied to this order line
6218
+ * @format int32
6219
+ * @example 0
6220
+ */
6221
+ discount_amount: number;
6222
+ /**
6223
+ * The discount amount formatted as a string
6224
+ * @example "$0.00"
6225
+ */
6226
+ discount_amount_str: string;
6227
+ /**
6228
+ * The amount of gift card used for this order line
6229
+ * @format int32
6230
+ * @example 0
6231
+ */
6232
+ giftcard_usage_amount: number;
6233
+ /**
6234
+ * The gift card usage amount formatted as a string
6235
+ * @example "$0.00"
6236
+ */
6237
+ giftcard_usage_amount_str: string;
6238
+ /**
6239
+ * The subtotal amount for this order line
6240
+ * @format int32
6241
+ * @example 1999
6242
+ */
6243
+ subtotal_amount: number;
6244
+ /**
6245
+ * The subtotal amount formatted as a string
6246
+ * @example "$19.99"
6247
+ */
6248
+ subtotal_amount_str: string;
6249
+ /**
6250
+ * The tax amount for this order line
6251
+ * @format int32
6252
+ * @example 200
6253
+ */
6254
+ tax_amount: number;
6255
+ /**
6256
+ * The tax amount formatted as a string
6257
+ * @example "$2.00"
6258
+ */
6259
+ tax_amount_str: string;
6260
+ /**
6261
+ * The total amount for this order line
6262
+ * @format int32
6263
+ * @example 2199
6264
+ */
6265
+ total_amount: number;
6266
+ /**
6267
+ * The total amount formatted as a string
6268
+ * @example "$21.99"
6269
+ */
6270
+ total_amount_str: string;
6271
+ /**
6272
+ * The presentment subtotal amount for this order line
6273
+ * @format int32
6274
+ * @example 1999
6275
+ */
6276
+ presentment_subtotal_amount: number;
6277
+ /**
6278
+ * The presentment subtotal amount formatted as a string
6279
+ * @example "€19.99"
6280
+ * @readonly Set by the API; ignored on write.
6281
+ */
6282
+ presentment_subtotal_amount_str: string;
6283
+ /**
6284
+ * The presentment discount amount for this order line
6285
+ * @format int32
6286
+ * @example 0
6287
+ */
6288
+ presentment_discount_amount: number;
6289
+ /**
6290
+ * The presentment discount amount formatted as a string
6291
+ * @example "€0.00"
6292
+ * @readonly Set by the API; ignored on write.
6293
+ */
6294
+ presentment_discount_amount_str: string;
6295
+ /**
6296
+ * The presentment tax amount for this order line
6297
+ * @format int32
6298
+ * @example 200
6299
+ */
6300
+ presentment_tax_amount: number;
6301
+ /**
6302
+ * The presentment tax amount formatted as a string
6303
+ * @example "€2.00"
6304
+ * @readonly Set by the API; ignored on write.
6305
+ */
6306
+ presentment_tax_amount_str: string;
6307
+ /**
6308
+ * The presentment gift card usage amount for this order line
6309
+ * @format int32
6310
+ * @example 0
6311
+ */
6312
+ presentment_giftcard_usage_amount: number;
6313
+ /**
6314
+ * The presentment gift card usage amount formatted as a string
6315
+ * @example "€0.00"
6316
+ * @readonly Set by the API; ignored on write.
6317
+ */
6318
+ presentment_giftcard_usage_amount_str: string;
6319
+ /**
6320
+ * The presentment total amount for this order line
6321
+ * @format int32
6322
+ * @example 2199
6323
+ */
6324
+ presentment_total_amount: number;
6325
+ /**
6326
+ * The presentment total amount formatted as a string
6327
+ * @example "€21.99"
6328
+ * @readonly Set by the API; ignored on write.
6329
+ */
6330
+ presentment_total_amount_str: string;
6331
+ selected_gameserver_id?: FlakeId;
6332
+ /**
6333
+ * Indicates whether tax is included in the base price, or added on top
6334
+ * @example false
6335
+ */
6336
+ tax_inclusive: boolean;
6337
+ /**
6338
+ * The regional pricing region ID for this order line, null if no regional pricing set
6339
+ * @example "eu"
6340
+ */
6341
+ pricing_region_id?: string | null;
6342
+ /**
6343
+ * Key-value pair of selected custom variables for this order.
6344
+ */
6345
+ custom_variables?: Record<string, CustomVariableLineItemDto> | null;
6346
+ }
6347
+ /**
6348
+ * Represents a store entity within the storefront system.
6349
+ */
6350
+ export interface StorefrontStoreDto {
6351
+ id: FlakeId;
6352
+ /**
6353
+ * The URL-friendly identifier for the store, used in store URLs.
6354
+ * @example "m0ukas-awesome-store"
6355
+ */
6356
+ slug: string;
6357
+ /**
6358
+ * The display name of the store shown to customers.
6359
+ * @example "m0uka's awesome store"
6360
+ */
6361
+ name: string;
6362
+ /**
6363
+ * The platform or the game of the store.
6364
+ * @example "rust"
6365
+ */
6366
+ platform: string;
6367
+ /**
6368
+ * The game of the store. Equivalent to the `platform` for backwards compatibility.
6369
+ * @readonly Set by the API; ignored on write.
6370
+ */
6371
+ game: string;
6372
+ /**
6373
+ * The three-letter ISO currency code used for pricing in this store.
6374
+ * If using the Adaptive Currency feature, this will be updated to reflect customer's local currency
6375
+ * (based on passed in IP / country headers).
6376
+ * @example "eur"
6377
+ */
6378
+ currency: string;
6379
+ /**
6380
+ * The three-letter ISO currency code signifying the main currency of the store.
6381
+ * @example "usd"
6382
+ */
6383
+ creator_currency: string;
6384
+ /**
6385
+ * A detailed description of the store. Only present for some platform types.
6386
+ */
6387
+ description?: string | null;
6388
+ /**
6389
+ * The URL of the store's main website, if not using Hosted Webstores.
6390
+ */
6391
+ website_url?: string | null;
6392
+ /**
6393
+ * The email address customers can use to contact store support.
6394
+ * @example "support@example.com"
6395
+ */
6396
+ support_email?: string | null;
6397
+ /**
6398
+ * The URL of the store's support page.
6399
+ */
6400
+ support_url?: string | null;
6401
+ /**
6402
+ * The type of integration this store uses with external systems.
6403
+ */
6404
+ integration_type?: string | null;
6405
+ /**
6406
+ * Indicates whether the store is in live mode (true) or test mode (false).
6407
+ */
6408
+ live_mode: boolean;
6409
+ /**
6410
+ * The URL to the store's main logo image.
6411
+ */
6412
+ logo_url?: string | null;
6413
+ /**
6414
+ * The URL to the store's square logo image.
6415
+ */
6416
+ logo_square_url?: string | null;
6417
+ /**
6418
+ * The date and time when the store was created.
6419
+ * @format date-time
6420
+ */
6421
+ created_at?: string | null;
6422
+ /**
6423
+ * The date and time when the store was last updated.
6424
+ * @format date-time
6425
+ */
6426
+ updated_at?: string | null;
6427
+ }
6428
+ /**
6429
+ * Represents a member of a PayNow store.
6430
+ */
6431
+ export interface StoreMemberDto {
6432
+ id: FlakeId;
6433
+ user_id: FlakeId;
6434
+ user: StoreMemberUserDto;
6435
+ /**
6436
+ * The UTC timestamp when the member was added to the store.
6437
+ * @format date-time
6438
+ */
6439
+ added_at?: string | null;
6440
+ added_by?: ActorDto;
6441
+ role_id?: FlakeId;
6442
+ }
6443
+ /**
6444
+ * Represents identity and profile information for a store member.
6445
+ */
6446
+ export interface StoreMemberUserDto {
6447
+ type: PayNowActorType;
6448
+ id: FlakeId;
6449
+ /**
6450
+ * The email address associated with the user.
6451
+ * Only visible if you are the store owner.
6452
+ */
6453
+ email?: string | null;
6454
+ /**
6455
+ * The first name of the actor.
6456
+ * Hidden if the user has a set nickname, and you are not the store owner.
6457
+ */
6458
+ first_name?: string | null;
6459
+ /**
6460
+ * The last name of the actor.
6461
+ * Hidden if the user has a set nickname, and you are not the store owner.
6462
+ */
6463
+ last_name?: string | null;
6464
+ /**
6465
+ * The nickname of the user.
6466
+ */
6467
+ nickname?: string | null;
6468
+ }
6469
+ /**
6470
+ * Store payment configuration settings.
6471
+ */
6472
+ export interface StorePaymentSettingsDto {
6473
+ /**
6474
+ * Whether to show all available payment methods for subscription purchases.
6475
+ */
6476
+ show_all_payment_methods_for_subscriptions: boolean;
6477
+ /**
6478
+ * Whether store pricing is tax-inclusive.
6479
+ */
6480
+ store_tax_inclusive_pricing: boolean;
6481
+ block_prepaid_cards: PrepaidCardsBlockingTypeDto;
6482
+ promo_code_stacking_behavior: StorePromoCodeStackingBehaviorDto;
6483
+ /**
6484
+ * Whether the 'Adaptive Currency' feature is enabled.
6485
+ */
6486
+ adaptive_currency_enabled: boolean;
6487
+ /**
6488
+ * Whether the displayed currency on the storefront should be the Adaptive Currency by default.
6105
6489
  */
6106
6490
  show_adaptive_currency_on_storefront: boolean;
6107
6491
  /**
@@ -6195,6 +6579,7 @@ export interface StoreResult {
6195
6579
  export interface StoreSubscriptionDto {
6196
6580
  id: FlakeId;
6197
6581
  store_id: FlakeId;
6582
+ user_id: FlakeId;
6198
6583
  plan_id: string;
6199
6584
  gateway: string;
6200
6585
  gateway_subscription_id: string;
@@ -6202,6 +6587,7 @@ export interface StoreSubscriptionDto {
6202
6587
  gateway_payment_method_id: string;
6203
6588
  currency: string;
6204
6589
  status: StoreSubscriptionStatus;
6590
+ renewal_period: StoreSubscriptionRenewalPeriod;
6205
6591
  downgrade_period_end_plan_id?: string | null;
6206
6592
  cancel_at_period_end: boolean;
6207
6593
  /**
@@ -6223,12 +6609,13 @@ export interface StoreSubscriptionDto {
6223
6609
  /**
6224
6610
  * @format date-time
6225
6611
  */
6226
- current_period_start: string;
6612
+ current_period_start?: string | null;
6227
6613
  /**
6228
6614
  * @format date-time
6229
6615
  */
6230
- current_period_end: string;
6616
+ current_period_end?: string | null;
6231
6617
  }
6618
+ export type StoreSubscriptionRenewalPeriod = "monthly" | "annually";
6232
6619
  export type StoreSubscriptionStatus = "incomplete" | "trialing" | "active" | "requires_action" | "canceled";
6233
6620
  export interface StoreTrustDto {
6234
6621
  store_id: FlakeId;
@@ -7120,37 +7507,6 @@ export interface SubscriptionLineDto {
7120
7507
  */
7121
7508
  initial_presentment_total_amount_str?: string | null;
7122
7509
  }
7123
- /**
7124
- * Represents the payment method a store's subscription is billed to.
7125
- */
7126
- export interface SubscriptionPaymentMethodDto {
7127
- /**
7128
- * The identifier of the payment method within the payment gateway.
7129
- */
7130
- id: string;
7131
- /**
7132
- * The kind of payment method, such as a card.
7133
- */
7134
- type: string;
7135
- /**
7136
- * The card network, when the payment method is a card.
7137
- */
7138
- card_brand?: string | null;
7139
- /**
7140
- * The month the card expires, when the payment method is a card.
7141
- * @format int64
7142
- */
7143
- card_exp_month?: number | null;
7144
- /**
7145
- * The year the card expires, when the payment method is a card.
7146
- * @format int64
7147
- */
7148
- card_exp_year?: number | null;
7149
- /**
7150
- * The last four digits of the card, when the payment method is a card.
7151
- */
7152
- card_last4?: string | null;
7153
- }
7154
7510
  /**
7155
7511
  * Portal flow for updating the payment method of a specific subscription
7156
7512
  */
@@ -8347,49 +8703,160 @@ export interface WebhookVariablesDto {
8347
8703
  event_type: WebhookEventType;
8348
8704
  variables: Array<string>;
8349
8705
  }
8706
+ /**
8707
+ * Represents a custom domain attached to a webstore, together with the state of its ownership and
8708
+ * SSL verification.
8709
+ */
8350
8710
  export interface WebstoreCustomDomainDto {
8711
+ /**
8712
+ * The identifier the domain was registered under with the hosting provider.
8713
+ */
8351
8714
  id: string;
8715
+ /**
8716
+ * The domain the webstore is served from, without a scheme (e.g., store.example.com).
8717
+ */
8352
8718
  hostname: string;
8719
+ /**
8720
+ * The verification state of the domain as reported by the hosting provider.
8721
+ * The domain only serves the webstore once it is active.
8722
+ */
8353
8723
  status: string;
8354
8724
  ssl?: WebstoreCustomDomainSslDto;
8355
8725
  ownership_verification?: WebstoreCustomDomainOwnershipVerificationDto;
8356
8726
  ownership_verification_http?: WebstoreCustomDomainOwnershipVerificationHttpDto;
8727
+ /**
8728
+ * The errors raised by the last ownership verification attempt. Empty when the last attempt
8729
+ * raised none.
8730
+ */
8357
8731
  verification_errors: Array<string>;
8358
8732
  /**
8733
+ * The date and time the domain was attached to the webstore.
8359
8734
  * @format date-time
8360
8735
  */
8361
8736
  created_at?: string | null;
8362
8737
  }
8738
+ /**
8739
+ * Represents the DNS record that has to be published to prove ownership of a webstore's custom domain.
8740
+ */
8363
8741
  export interface WebstoreCustomDomainOwnershipVerificationDto {
8742
+ /**
8743
+ * The kind of DNS record to publish (e.g., txt).
8744
+ */
8364
8745
  type: string;
8746
+ /**
8747
+ * The name to publish the record under.
8748
+ */
8365
8749
  name: string;
8750
+ /**
8751
+ * The value the record has to hold.
8752
+ */
8366
8753
  value: string;
8367
8754
  }
8755
+ /**
8756
+ * Represents the token file that has to be served over HTTP to prove ownership of a webstore's
8757
+ * custom domain.
8758
+ */
8368
8759
  export interface WebstoreCustomDomainOwnershipVerificationHttpDto {
8760
+ /**
8761
+ * The URL on the domain the token file has to be served from.
8762
+ */
8369
8763
  http_url: string;
8764
+ /**
8765
+ * The body that URL has to return.
8766
+ */
8370
8767
  http_body: string;
8371
8768
  }
8769
+ /**
8770
+ * Represents the SSL certificate issued for a webstore's custom domain.
8771
+ */
8372
8772
  export interface WebstoreCustomDomainSslDto {
8773
+ /**
8774
+ * The identifier the certificate was issued under.
8775
+ */
8373
8776
  id: string;
8777
+ /**
8778
+ * How control of the domain is validated for the certificate (e.g., txt, http, email).
8779
+ */
8374
8780
  method: string;
8781
+ /**
8782
+ * The state of the certificate (e.g., pending_validation, active). The domain only serves
8783
+ * traffic over HTTPS once it is active.
8784
+ */
8375
8785
  status: string;
8786
+ /**
8787
+ * The authority issuing the certificate, or null while one has not been chosen.
8788
+ */
8376
8789
  certificate_authority?: string | null;
8790
+ /**
8791
+ * The records that have to be published to validate the certificate. Empty once validation no
8792
+ * longer needs them.
8793
+ */
8377
8794
  validation_records: Array<WebstoreCustomDomainSslValidationRecordDto>;
8795
+ /**
8796
+ * The errors raised by the last certificate validation attempt. Empty when the last attempt
8797
+ * raised none.
8798
+ */
8378
8799
  validation_errors: Array<string>;
8379
8800
  }
8801
+ /**
8802
+ * Represents one record that has to be published to validate a custom domain's SSL certificate.
8803
+ * Which fields are populated depends on the 'ssl' block's 'method'.
8804
+ */
8380
8805
  export interface WebstoreCustomDomainSslValidationRecordDto {
8806
+ /**
8807
+ * The name to publish the DNS TXT record under, or null when validation is not by TXT record.
8808
+ */
8381
8809
  txt_name?: string | null;
8810
+ /**
8811
+ * The value that TXT record has to hold, or null when validation is not by TXT record.
8812
+ */
8382
8813
  txt_value?: string | null;
8814
+ /**
8815
+ * The URL on the domain the token file has to be served from, or null when validation is not
8816
+ * over HTTP.
8817
+ */
8383
8818
  http_url?: string | null;
8819
+ /**
8820
+ * The body that URL has to return, or null when validation is not over HTTP.
8821
+ */
8384
8822
  http_body?: string | null;
8823
+ /**
8824
+ * The addresses a validation link can be sent to. Empty when validation is not by email.
8825
+ */
8385
8826
  emails: Array<string>;
8386
8827
  }
8828
+ /**
8829
+ * Specifies how ownership of a webstore's custom domain is proven.
8830
+ * The only officially supported method is the 'http' method.
8831
+ * - `invalid`: No verification type specified. This value is typically used as a default or uninitialized state.
8832
+ * - `http`: Ownership is proven by serving a token file over HTTP from the domain.
8833
+ This is the RECOMMENDED way to prove ownership, and is used by the dashboard.
8834
+ * - `txt`: Ownership is proven by publishing a DNS TXT record on the domain.
8835
+ * - `email`: Ownership is proven by following a link sent to an administrative address on the domain.
8836
+ * - `cname`: Ownership is proven by publishing a DNS CNAME record on the domain.
8837
+ */
8387
8838
  export type WebstoreCustomDomainVerificationTypeDto = "invalid" | "http" | "txt" | "email" | "cname";
8839
+ /**
8840
+ * Represents a store's webstore, the hosted storefront customers browse and buy from.
8841
+ */
8388
8842
  export interface WebstoreDto {
8389
8843
  id: FlakeId;
8844
+ /**
8845
+ * The slug the webstore is served from, unique across all webstores.
8846
+ */
8390
8847
  slug: string;
8848
+ /**
8849
+ * Indicates whether the webstore is being served to customers.
8850
+ */
8391
8851
  is_active: boolean;
8852
+ /**
8853
+ * The custom domain the webstore is served from, or null when it is only reachable at its slug.
8854
+ */
8392
8855
  custom_domain?: string | null;
8856
+ /**
8857
+ * Indicates whether ownership of 'custom_domain' has been verified. Until it is, the webstore is
8858
+ * only served from its slug.
8859
+ */
8393
8860
  custom_domain_verified: boolean;
8394
8861
  current_template_id?: FlakeId;
8395
8862
  }