From 1a49e0b9225882ef5aeb0912116871fe67fc0653 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:53:14 +0000 Subject: [PATCH 1/4] Update generated code for v1399 --- OPENAPI_VERSION | 2 +- account.go | 6 +- accountsession.go | 20 +++--- api_version.go | 2 +- balancetransaction.go | 8 ++- billing/creditbalancesummary/client.go | 4 +- billing/creditbalancetransaction/client.go | 8 +-- billing/creditgrant/client.go | 12 ++-- billing/meter/client.go | 20 +++--- billing/meterevent/client.go | 4 +- billing/metereventadjustment/client.go | 4 +- billing_creditbalancesummary.go | 4 +- billing_creditbalancetransaction.go | 17 ++++- billing_creditgrant.go | 14 ++-- billing_meter.go | 12 ++-- billing_meterevent.go | 7 +- billing_metereventadjustment.go | 2 +- capability.go | 2 +- card.go | 11 ++++ charge.go | 77 +++++++++++++++++++++- checkout_session.go | 46 +++++++++++-- confirmationtoken.go | 11 ++++ customer.go | 2 +- dispute.go | 27 ++++++++ forwarding_request.go | 9 +-- fundinginstructions.go | 16 ++++- invoice.go | 29 +++++--- issuing_authorization.go | 2 + paymentintent.go | 40 ++++++++--- paymentlink.go | 4 +- paymentmethod.go | 11 ++++ setupintent.go | 20 ++++-- subscription.go | 14 +++- tax_calculation.go | 24 ++++++- tax_transaction.go | 22 ++++++- taxid.go | 24 ++++++- terminal_location.go | 2 +- treasury_financialaccountfeatures.go | 12 ++-- 38 files changed, 426 insertions(+), 125 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7ab08411da..9fc97dcb22 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1347 \ No newline at end of file +v1399 \ No newline at end of file diff --git a/account.go b/account.go index 1c9c62e7ad..92e368885c 100644 --- a/account.go +++ b/account.go @@ -256,7 +256,7 @@ type AccountParams struct { // // By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. ExternalAccount *AccountExternalAccountParams `form:"external_account"` - // A hash of account group type to tokens. These are account groups this account should be added to + // A hash of account group type to tokens. These are account groups this account should be added to. Groups *AccountGroupsParams `form:"groups"` // Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. Individual *PersonParams `form:"individual"` @@ -961,7 +961,7 @@ func (p *AccountExternalAccountParams) AddMetadata(key string, value string) { p.Metadata[key] = value } -// A hash of account group type to tokens. These are account groups this account should be added to +// A hash of account group type to tokens. These are account groups this account should be added to. type AccountGroupsParams struct { // The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. PaymentsPricing *string `form:"payments_pricing"` @@ -1467,7 +1467,7 @@ type AccountFutureRequirementsError struct { type AccountFutureRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*AccountFutureRequirementsAlternative `json:"alternatives"` - // Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + // Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. CurrentlyDue []string `json:"currently_due"` diff --git a/accountsession.go b/accountsession.go index 02e690e4dd..9ec8399155 100644 --- a/accountsession.go +++ b/accountsession.go @@ -8,7 +8,7 @@ package stripe // The list of features enabled in the embedded component. type AccountSessionComponentsAccountManagementFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -24,7 +24,7 @@ type AccountSessionComponentsAccountManagementParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsAccountOnboardingFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -40,7 +40,7 @@ type AccountSessionComponentsAccountOnboardingParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsBalancesFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -73,7 +73,7 @@ type AccountSessionComponentsDocumentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsNotificationBannerFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -129,7 +129,7 @@ type AccountSessionComponentsPaymentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsPayoutsFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -225,7 +225,7 @@ func (p *AccountSessionParams) AddExpand(f string) { } type AccountSessionComponentsAccountManagementFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -236,7 +236,7 @@ type AccountSessionComponentsAccountManagement struct { Features *AccountSessionComponentsAccountManagementFeatures `json:"features"` } type AccountSessionComponentsAccountOnboardingFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -247,7 +247,7 @@ type AccountSessionComponentsAccountOnboarding struct { Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"` } type AccountSessionComponentsBalancesFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` @@ -270,7 +270,7 @@ type AccountSessionComponentsDocuments struct { Features *AccountSessionComponentsDocumentsFeatures `json:"features"` } type AccountSessionComponentsNotificationBannerFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -311,7 +311,7 @@ type AccountSessionComponentsPayments struct { Features *AccountSessionComponentsPaymentsFeatures `json:"features"` } type AccountSessionComponentsPayoutsFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` diff --git a/api_version.go b/api_version.go index 3eefda0919..1906349c36 100644 --- a/api_version.go +++ b/api_version.go @@ -7,5 +7,5 @@ package stripe const ( - apiVersion string = "2024-11-20.acacia" + apiVersion string = "2024-12-18.acacia" ) diff --git a/balancetransaction.go b/balancetransaction.go index 35235c591e..e76f72a458 100644 --- a/balancetransaction.go +++ b/balancetransaction.go @@ -72,7 +72,7 @@ const ( BalanceTransactionStatusPending BalanceTransactionStatus = "pending" ) -// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. +// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. type BalanceTransactionType string // List of values that BalanceTransactionType can take @@ -104,6 +104,8 @@ const ( BalanceTransactionTypePayout BalanceTransactionType = "payout" BalanceTransactionTypePayoutCancel BalanceTransactionType = "payout_cancel" BalanceTransactionTypePayoutFailure BalanceTransactionType = "payout_failure" + BalanceTransactionTypePayoutMinimumBalanceHold BalanceTransactionType = "payout_minimum_balance_hold" + BalanceTransactionTypePayoutMinimumBalanceRelease BalanceTransactionType = "payout_minimum_balance_release" BalanceTransactionTypeRefund BalanceTransactionType = "refund" BalanceTransactionTypeRefundFailure BalanceTransactionType = "refund_failure" BalanceTransactionTypeReserveTransaction BalanceTransactionType = "reserve_transaction" @@ -136,7 +138,7 @@ type BalanceTransactionListParams struct { Payout *string `form:"payout"` // Only returns the original transaction. Source *string `form:"source"` - // Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + // Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Type *string `form:"type"` } @@ -207,7 +209,7 @@ type BalanceTransaction struct { Source *BalanceTransactionSource `json:"source"` // The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. Status BalanceTransactionStatus `json:"status"` - // Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + // Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. Type BalanceTransactionType `json:"type"` } type BalanceTransactionSource struct { diff --git a/billing/creditbalancesummary/client.go b/billing/creditbalancesummary/client.go index b41730740e..c70d6f7259 100644 --- a/billing/creditbalancesummary/client.go +++ b/billing/creditbalancesummary/client.go @@ -19,12 +19,12 @@ type Client struct { Key string } -// Retrieves the credit balance summary for a customer +// Retrieves the credit balance summary for a customer. func Get(params *stripe.BillingCreditBalanceSummaryParams) (*stripe.BillingCreditBalanceSummary, error) { return getC().Get(params) } -// Retrieves the credit balance summary for a customer +// Retrieves the credit balance summary for a customer. func (c Client) Get(params *stripe.BillingCreditBalanceSummaryParams) (*stripe.BillingCreditBalanceSummary, error) { creditbalancesummary := &stripe.BillingCreditBalanceSummary{} err := c.B.Call( diff --git a/billing/creditbalancetransaction/client.go b/billing/creditbalancetransaction/client.go index 0cc1fa8923..26672b04c8 100644 --- a/billing/creditbalancetransaction/client.go +++ b/billing/creditbalancetransaction/client.go @@ -20,12 +20,12 @@ type Client struct { Key string } -// Retrieves a credit balance transaction +// Retrieves a credit balance transaction. func Get(id string, params *stripe.BillingCreditBalanceTransactionParams) (*stripe.BillingCreditBalanceTransaction, error) { return getC().Get(id, params) } -// Retrieves a credit balance transaction +// Retrieves a credit balance transaction. func (c Client) Get(id string, params *stripe.BillingCreditBalanceTransactionParams) (*stripe.BillingCreditBalanceTransaction, error) { path := stripe.FormatURLPath("/v1/billing/credit_balance_transactions/%s", id) creditbalancetransaction := &stripe.BillingCreditBalanceTransaction{} @@ -33,12 +33,12 @@ func (c Client) Get(id string, params *stripe.BillingCreditBalanceTransactionPar return creditbalancetransaction, err } -// Retrieve a list of credit balance transactions +// Retrieve a list of credit balance transactions. func List(params *stripe.BillingCreditBalanceTransactionListParams) *Iter { return getC().List(params) } -// Retrieve a list of credit balance transactions +// Retrieve a list of credit balance transactions. func (c Client) List(listParams *stripe.BillingCreditBalanceTransactionListParams) *Iter { return &Iter{ Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { diff --git a/billing/creditgrant/client.go b/billing/creditgrant/client.go index f4b7b427c5..58c6ff1b10 100644 --- a/billing/creditgrant/client.go +++ b/billing/creditgrant/client.go @@ -20,12 +20,12 @@ type Client struct { Key string } -// Creates a credit grant +// Creates a credit grant. func New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { return getC().New(params) } -// Creates a credit grant +// Creates a credit grant. func (c Client) New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { creditgrant := &stripe.BillingCreditGrant{} err := c.B.Call( @@ -38,12 +38,12 @@ func (c Client) New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCre return creditgrant, err } -// Retrieves a credit grant +// Retrieves a credit grant. func Get(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { return getC().Get(id, params) } -// Retrieves a credit grant +// Retrieves a credit grant. func (c Client) Get(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { path := stripe.FormatURLPath("/v1/billing/credit_grants/%s", id) creditgrant := &stripe.BillingCreditGrant{} @@ -51,12 +51,12 @@ func (c Client) Get(id string, params *stripe.BillingCreditGrantParams) (*stripe return creditgrant, err } -// Updates a credit grant +// Updates a credit grant. func Update(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { return getC().Update(id, params) } -// Updates a credit grant +// Updates a credit grant. func (c Client) Update(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) { path := stripe.FormatURLPath("/v1/billing/credit_grants/%s", id) creditgrant := &stripe.BillingCreditGrant{} diff --git a/billing/meter/client.go b/billing/meter/client.go index 4bbe7ce0de..546abaace4 100644 --- a/billing/meter/client.go +++ b/billing/meter/client.go @@ -20,24 +20,24 @@ type Client struct { Key string } -// Creates a billing meter +// Creates a billing meter. func New(params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { return getC().New(params) } -// Creates a billing meter +// Creates a billing meter. func (c Client) New(params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { meter := &stripe.BillingMeter{} err := c.B.Call(http.MethodPost, "/v1/billing/meters", c.Key, params, meter) return meter, err } -// Retrieves a billing meter given an ID +// Retrieves a billing meter given an ID. func Get(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { return getC().Get(id, params) } -// Retrieves a billing meter given an ID +// Retrieves a billing meter given an ID. func (c Client) Get(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { path := stripe.FormatURLPath("/v1/billing/meters/%s", id) meter := &stripe.BillingMeter{} @@ -45,12 +45,12 @@ func (c Client) Get(id string, params *stripe.BillingMeterParams) (*stripe.Billi return meter, err } -// Updates a billing meter +// Updates a billing meter. func Update(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { return getC().Update(id, params) } -// Updates a billing meter +// Updates a billing meter. func (c Client) Update(id string, params *stripe.BillingMeterParams) (*stripe.BillingMeter, error) { path := stripe.FormatURLPath("/v1/billing/meters/%s", id) meter := &stripe.BillingMeter{} @@ -58,12 +58,12 @@ func (c Client) Update(id string, params *stripe.BillingMeterParams) (*stripe.Bi return meter, err } -// Deactivates a billing meter +// When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. func Deactivate(id string, params *stripe.BillingMeterDeactivateParams) (*stripe.BillingMeter, error) { return getC().Deactivate(id, params) } -// Deactivates a billing meter +// When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. func (c Client) Deactivate(id string, params *stripe.BillingMeterDeactivateParams) (*stripe.BillingMeter, error) { path := stripe.FormatURLPath("/v1/billing/meters/%s/deactivate", id) meter := &stripe.BillingMeter{} @@ -71,12 +71,12 @@ func (c Client) Deactivate(id string, params *stripe.BillingMeterDeactivateParam return meter, err } -// Reactivates a billing meter +// When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. func Reactivate(id string, params *stripe.BillingMeterReactivateParams) (*stripe.BillingMeter, error) { return getC().Reactivate(id, params) } -// Reactivates a billing meter +// When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. func (c Client) Reactivate(id string, params *stripe.BillingMeterReactivateParams) (*stripe.BillingMeter, error) { path := stripe.FormatURLPath("/v1/billing/meters/%s/reactivate", id) meter := &stripe.BillingMeter{} diff --git a/billing/meterevent/client.go b/billing/meterevent/client.go index 8d95b1ea13..ea471e22bf 100644 --- a/billing/meterevent/client.go +++ b/billing/meterevent/client.go @@ -19,12 +19,12 @@ type Client struct { Key string } -// Creates a billing meter event +// Creates a billing meter event. func New(params *stripe.BillingMeterEventParams) (*stripe.BillingMeterEvent, error) { return getC().New(params) } -// Creates a billing meter event +// Creates a billing meter event. func (c Client) New(params *stripe.BillingMeterEventParams) (*stripe.BillingMeterEvent, error) { meterevent := &stripe.BillingMeterEvent{} err := c.B.Call( diff --git a/billing/metereventadjustment/client.go b/billing/metereventadjustment/client.go index 4d4318a3c7..ab13686f73 100644 --- a/billing/metereventadjustment/client.go +++ b/billing/metereventadjustment/client.go @@ -19,12 +19,12 @@ type Client struct { Key string } -// Creates a billing meter event adjustment +// Creates a billing meter event adjustment. func New(params *stripe.BillingMeterEventAdjustmentParams) (*stripe.BillingMeterEventAdjustment, error) { return getC().New(params) } -// Creates a billing meter event adjustment +// Creates a billing meter event adjustment. func (c Client) New(params *stripe.BillingMeterEventAdjustmentParams) (*stripe.BillingMeterEventAdjustment, error) { metereventadjustment := &stripe.BillingMeterEventAdjustment{} err := c.B.Call( diff --git a/billing_creditbalancesummary.go b/billing_creditbalancesummary.go index 1b9fecbaf2..4a9543ed7a 100644 --- a/billing_creditbalancesummary.go +++ b/billing_creditbalancesummary.go @@ -24,7 +24,7 @@ const ( // The billing credit applicability scope for which to fetch credit balance summary. type BillingCreditBalanceSummaryFilterApplicabilityScopeParams struct { - // The price type for which credit grants can apply. We currently only support the `metered` price type. + // The price type that credit grants can apply to. We currently only support the `metered` price type. PriceType *string `form:"price_type"` } @@ -38,7 +38,7 @@ type BillingCreditBalanceSummaryFilterParams struct { Type *string `form:"type"` } -// Retrieves the credit balance summary for a customer +// Retrieves the credit balance summary for a customer. type BillingCreditBalanceSummaryParams struct { Params `form:"*"` // The customer for which to fetch credit balance summary. diff --git a/billing_creditbalancetransaction.go b/billing_creditbalancetransaction.go index 746ef411a8..5127b2be75 100644 --- a/billing_creditbalancetransaction.go +++ b/billing_creditbalancetransaction.go @@ -21,7 +21,8 @@ type BillingCreditBalanceTransactionCreditType string // List of values that BillingCreditBalanceTransactionCreditType can take const ( - BillingCreditBalanceTransactionCreditTypeCreditsGranted BillingCreditBalanceTransactionCreditType = "credits_granted" + BillingCreditBalanceTransactionCreditTypeCreditsApplicationInvoiceVoided BillingCreditBalanceTransactionCreditType = "credits_application_invoice_voided" + BillingCreditBalanceTransactionCreditTypeCreditsGranted BillingCreditBalanceTransactionCreditType = "credits_granted" ) // The type of this amount. We currently only support `monetary` billing credits. @@ -51,7 +52,7 @@ const ( BillingCreditBalanceTransactionTypeDebit BillingCreditBalanceTransactionType = "debit" ) -// Retrieve a list of credit balance transactions +// Retrieve a list of credit balance transactions. type BillingCreditBalanceTransactionListParams struct { ListParams `form:"*"` // The credit grant for which to fetch credit balance transactions. @@ -67,7 +68,7 @@ func (p *BillingCreditBalanceTransactionListParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -// Retrieves a credit balance transaction +// Retrieves a credit balance transaction. type BillingCreditBalanceTransactionParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. @@ -93,9 +94,19 @@ type BillingCreditBalanceTransactionCreditAmount struct { Type BillingCreditBalanceTransactionCreditAmountType `json:"type"` } +// Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. +type BillingCreditBalanceTransactionCreditCreditsApplicationInvoiceVoided struct { + // The invoice to which the reinstated billing credits were originally applied. + Invoice *Invoice `json:"invoice"` + // The invoice line item to which the reinstated billing credits were originally applied. + InvoiceLineItem string `json:"invoice_line_item"` +} + // Credit details for this credit balance transaction. Only present if type is `credit`. type BillingCreditBalanceTransactionCredit struct { Amount *BillingCreditBalanceTransactionCreditAmount `json:"amount"` + // Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + CreditsApplicationInvoiceVoided *BillingCreditBalanceTransactionCreditCreditsApplicationInvoiceVoided `json:"credits_application_invoice_voided"` // The type of credit transaction. Type BillingCreditBalanceTransactionCreditType `json:"type"` } diff --git a/billing_creditgrant.go b/billing_creditgrant.go index f96acf3a92..179dca83af 100644 --- a/billing_creditgrant.go +++ b/billing_creditgrant.go @@ -16,7 +16,7 @@ const ( BillingCreditGrantAmountTypeMonetary BillingCreditGrantAmountType = "monetary" ) -// The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. +// The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. type BillingCreditGrantApplicabilityConfigScopePriceType string // List of values that BillingCreditGrantApplicabilityConfigScopePriceType can take @@ -65,7 +65,7 @@ type BillingCreditGrantAmountParams struct { // Specify the scope of this applicability config. type BillingCreditGrantApplicabilityConfigScopeParams struct { - // The price type for which credit grants can apply. We currently only support the `metered` price type. + // The price type that credit grants can apply to. We currently only support the `metered` price type. PriceType *string `form:"price_type"` } @@ -75,7 +75,7 @@ type BillingCreditGrantApplicabilityConfigParams struct { Scope *BillingCreditGrantApplicabilityConfigScopeParams `form:"scope"` } -// Creates a credit grant +// Creates a credit grant. type BillingCreditGrantParams struct { Params `form:"*"` // Amount of this credit grant. @@ -86,13 +86,13 @@ type BillingCreditGrantParams struct { Category *string `form:"category"` // ID of the customer to receive the billing credits. Customer *string `form:"customer"` - // The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. + // The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. ExpiresAt *int64 `form:"expires_at"` - // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. + // Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. Metadata map[string]string `form:"metadata"` // A descriptive name shown in the Dashboard. Name *string `form:"name"` @@ -150,7 +150,7 @@ type BillingCreditGrantAmount struct { Type BillingCreditGrantAmountType `json:"type"` } type BillingCreditGrantApplicabilityConfigScope struct { - // The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + // The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. PriceType BillingCreditGrantApplicabilityConfigScopePriceType `json:"price_type"` } type BillingCreditGrantApplicabilityConfig struct { @@ -170,7 +170,7 @@ type BillingCreditGrant struct { Created int64 `json:"created"` // ID of the customer receiving the billing credits. Customer *Customer `json:"customer"` - // The time when the billing credits become effective—when they're eligible for use. + // The time when the billing credits become effective-when they're eligible for use. EffectiveAt int64 `json:"effective_at"` // The time when the billing credits expire. If not present, the billing credits don't expire. ExpiresAt int64 `json:"expires_at"` diff --git a/billing_meter.go b/billing_meter.go index 3cb96df3bd..f6f53bf4f2 100644 --- a/billing_meter.go +++ b/billing_meter.go @@ -59,7 +59,7 @@ func (p *BillingMeterListParams) AddExpand(f string) { // Fields that specify how to map a meter event to a customer. type BillingMeterCustomerMappingParams struct { - // The key in the usage event payload to use for mapping the event to a customer. + // The key in the meter event payload to use for mapping the event to a customer. EventPayloadKey *string `form:"event_payload_key"` // The method for mapping a meter event to a customer. Must be `by_id`. Type *string `form:"type"` @@ -77,14 +77,14 @@ type BillingMeterValueSettingsParams struct { EventPayloadKey *string `form:"event_payload_key"` } -// Creates a billing meter +// Creates a billing meter. type BillingMeterParams struct { Params `form:"*"` // Fields that specify how to map a meter event to a customer. CustomerMapping *BillingMeterCustomerMappingParams `form:"customer_mapping"` // The default settings to aggregate a meter's events with. DefaultAggregation *BillingMeterDefaultAggregationParams `form:"default_aggregation"` - // The meter's name. + // The meter's name. Not visible to the customer. DisplayName *string `form:"display_name"` // The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. EventName *string `form:"event_name"` @@ -101,7 +101,7 @@ func (p *BillingMeterParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -// Deactivates a billing meter +// When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. type BillingMeterDeactivateParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. @@ -113,7 +113,7 @@ func (p *BillingMeterDeactivateParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -// Reactivates a billing meter +// When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. type BillingMeterReactivateParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. @@ -144,7 +144,7 @@ type BillingMeterValueSettings struct { EventPayloadKey string `json:"event_payload_key"` } -// A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. +// Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. // // Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) type BillingMeter struct { diff --git a/billing_meterevent.go b/billing_meterevent.go index b92524f143..e16178f892 100644 --- a/billing_meterevent.go +++ b/billing_meterevent.go @@ -6,14 +6,14 @@ package stripe -// Creates a billing meter event +// Creates a billing meter event. type BillingMeterEventParams struct { Params `form:"*"` // The name of the meter event. Corresponds with the `event_name` field on a meter. EventName *string `form:"event_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + // A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. Identifier *string `form:"identifier"` // The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). Payload map[string]string `form:"payload"` @@ -26,8 +26,7 @@ func (p *BillingMeterEventParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -// A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. -// Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. +// Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events. type BillingMeterEvent struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/billing_metereventadjustment.go b/billing_metereventadjustment.go index 3294bcb3ca..6121355c8c 100644 --- a/billing_metereventadjustment.go +++ b/billing_metereventadjustment.go @@ -29,7 +29,7 @@ type BillingMeterEventAdjustmentCancelParams struct { Identifier *string `form:"identifier"` } -// Creates a billing meter event adjustment +// Creates a billing meter event adjustment. type BillingMeterEventAdjustmentParams struct { Params `form:"*"` // Specifies which event to cancel. diff --git a/capability.go b/capability.go index 690c501f31..d8a9f8d77f 100644 --- a/capability.go +++ b/capability.go @@ -102,7 +102,7 @@ type CapabilityFutureRequirementsError struct { type CapabilityFutureRequirements struct { // Fields that are due and can be satisfied by providing the corresponding alternative fields instead. Alternatives []*CapabilityFutureRequirementsAlternative `json:"alternatives"` - // Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + // Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. CurrentlyDue []string `json:"currently_due"` diff --git a/card.go b/card.go index c10835b4c3..3673dbdf8e 100644 --- a/card.go +++ b/card.go @@ -80,6 +80,15 @@ const ( CardFundingUnknown CardFunding = "unknown" ) +// Status of a card based on the card issuer. +type CardRegulatedStatus string + +// List of values that CardRegulatedStatus can take +const ( + CardRegulatedStatusRegulated CardRegulatedStatus = "regulated" + CardRegulatedStatusUnregulated CardRegulatedStatus = "unregulated" +) + // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. type CardTokenizationMethod string @@ -369,6 +378,8 @@ type Card struct { Networks *CardNetworks `json:"networks"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` + // Status of a card based on the card issuer. + RegulatedStatus CardRegulatedStatus `json:"regulated_status"` // For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. Status string `json:"status"` // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. diff --git a/charge.go b/charge.go index 5ddab7f6a5..8bdb4e1399 100644 --- a/charge.go +++ b/charge.go @@ -25,6 +25,14 @@ const ( ChargeFraudUserReportSafe ChargeFraudUserReport = "safe" ) +// funding type of the underlying payment method. +type ChargePaymentMethodDetailsAmazonPayFundingType string + +// List of values that ChargePaymentMethodDetailsAmazonPayFundingType can take +const ( + ChargePaymentMethodDetailsAmazonPayFundingTypeCard ChargePaymentMethodDetailsAmazonPayFundingType = "card" +) + // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. type ChargePaymentMethodDetailsCardChecksAddressLine1Check string @@ -111,6 +119,15 @@ const ( ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable" ) +// Status of a card based on the card issuer. +type ChargePaymentMethodDetailsCardRegulatedStatus string + +// List of values that ChargePaymentMethodDetailsCardRegulatedStatus can take +const ( + ChargePaymentMethodDetailsCardRegulatedStatusRegulated ChargePaymentMethodDetailsCardRegulatedStatus = "regulated" + ChargePaymentMethodDetailsCardRegulatedStatusUnregulated ChargePaymentMethodDetailsCardRegulatedStatus = "unregulated" +) + // For authenticated transactions: how the customer was authenticated by // the issuing bank. type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string @@ -289,6 +306,14 @@ const ( ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible" ) +// funding type of the underlying payment method. +type ChargePaymentMethodDetailsRevolutPayFundingType string + +// List of values that ChargePaymentMethodDetailsRevolutPayFundingType can take +const ( + ChargePaymentMethodDetailsRevolutPayFundingTypeCard ChargePaymentMethodDetailsRevolutPayFundingType = "card" +) + // The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. // An additional hash is included on `payment_method_details` with a name matching this value. // It contains information specific to the payment method. @@ -590,6 +615,10 @@ type ChargeOutcomeRule struct { // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. type ChargeOutcome struct { + // For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + NetworkAdviceCode string `json:"network_advice_code"` + // For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + NetworkDeclineCode string `json:"network_decline_code"` // Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. NetworkStatus string `json:"network_status"` // An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. @@ -680,7 +709,28 @@ type ChargePaymentMethodDetailsAlipay struct { TransactionID string `json:"transaction_id"` } type ChargePaymentMethodDetailsAlma struct{} -type ChargePaymentMethodDetailsAmazonPay struct{} +type ChargePaymentMethodDetailsAmazonPayFundingCard struct { + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Brand string `json:"brand"` + // Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + Country string `json:"country"` + // Two-digit number representing the card's expiration month. + ExpMonth int64 `json:"exp_month"` + // Four-digit number representing the card's expiration year. + ExpYear int64 `json:"exp_year"` + // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + Funding string `json:"funding"` + // The last four digits of the card. + Last4 string `json:"last4"` +} +type ChargePaymentMethodDetailsAmazonPayFunding struct { + Card *ChargePaymentMethodDetailsAmazonPayFundingCard `json:"card"` + // funding type of the underlying payment method. + Type ChargePaymentMethodDetailsAmazonPayFundingType `json:"type"` +} +type ChargePaymentMethodDetailsAmazonPay struct { + Funding *ChargePaymentMethodDetailsAmazonPayFunding `json:"funding"` +} type ChargePaymentMethodDetailsAUBECSDebit struct { // Bank-State-Branch number of the bank account. BSBNumber string `json:"bsb_number"` @@ -877,6 +927,8 @@ type ChargePaymentMethodDetailsCard struct { // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + // Status of a card based on the card issuer. + RegulatedStatus ChargePaymentMethodDetailsCardRegulatedStatus `json:"regulated_status"` // Populated if this transaction used 3D Secure authentication. ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. @@ -1226,7 +1278,28 @@ type ChargePaymentMethodDetailsPromptPay struct { // Bill reference generated by PromptPay Reference string `json:"reference"` } -type ChargePaymentMethodDetailsRevolutPay struct{} +type ChargePaymentMethodDetailsRevolutPayFundingCard struct { + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Brand string `json:"brand"` + // Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + Country string `json:"country"` + // Two-digit number representing the card's expiration month. + ExpMonth int64 `json:"exp_month"` + // Four-digit number representing the card's expiration year. + ExpYear int64 `json:"exp_year"` + // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + Funding string `json:"funding"` + // The last four digits of the card. + Last4 string `json:"last4"` +} +type ChargePaymentMethodDetailsRevolutPayFunding struct { + Card *ChargePaymentMethodDetailsRevolutPayFundingCard `json:"card"` + // funding type of the underlying payment method. + Type ChargePaymentMethodDetailsRevolutPayFundingType `json:"type"` +} +type ChargePaymentMethodDetailsRevolutPay struct { + Funding *ChargePaymentMethodDetailsRevolutPayFunding `json:"funding"` +} type ChargePaymentMethodDetailsSamsungPay struct { // A unique identifier for the buyer as determined by the local payment processor. BuyerID string `json:"buyer_id"` diff --git a/checkout_session.go b/checkout_session.go index 0b93b9033a..daf59a14a7 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -120,21 +120,26 @@ const ( CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take const ( CheckoutSessionCustomerDetailsTaxIDTypeADNRT CheckoutSessionCustomerDetailsTaxIDType = "ad_nrt" CheckoutSessionCustomerDetailsTaxIDTypeAETRN CheckoutSessionCustomerDetailsTaxIDType = "ae_trn" + CheckoutSessionCustomerDetailsTaxIDTypeAmTin CheckoutSessionCustomerDetailsTaxIDType = "am_tin" + CheckoutSessionCustomerDetailsTaxIDTypeAoTin CheckoutSessionCustomerDetailsTaxIDType = "ao_tin" CheckoutSessionCustomerDetailsTaxIDTypeARCUIT CheckoutSessionCustomerDetailsTaxIDType = "ar_cuit" CheckoutSessionCustomerDetailsTaxIDTypeAUABN CheckoutSessionCustomerDetailsTaxIDType = "au_abn" CheckoutSessionCustomerDetailsTaxIDTypeAUARN CheckoutSessionCustomerDetailsTaxIDType = "au_arn" + CheckoutSessionCustomerDetailsTaxIDTypeBaTin CheckoutSessionCustomerDetailsTaxIDType = "ba_tin" + CheckoutSessionCustomerDetailsTaxIDTypeBbTin CheckoutSessionCustomerDetailsTaxIDType = "bb_tin" CheckoutSessionCustomerDetailsTaxIDTypeBGUIC CheckoutSessionCustomerDetailsTaxIDType = "bg_uic" CheckoutSessionCustomerDetailsTaxIDTypeBhVAT CheckoutSessionCustomerDetailsTaxIDType = "bh_vat" CheckoutSessionCustomerDetailsTaxIDTypeBOTIN CheckoutSessionCustomerDetailsTaxIDType = "bo_tin" CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj" CheckoutSessionCustomerDetailsTaxIDTypeBRCPF CheckoutSessionCustomerDetailsTaxIDType = "br_cpf" + CheckoutSessionCustomerDetailsTaxIDTypeBsTin CheckoutSessionCustomerDetailsTaxIDType = "bs_tin" CheckoutSessionCustomerDetailsTaxIDTypeByTin CheckoutSessionCustomerDetailsTaxIDType = "by_tin" CheckoutSessionCustomerDetailsTaxIDTypeCABN CheckoutSessionCustomerDetailsTaxIDType = "ca_bn" CheckoutSessionCustomerDetailsTaxIDTypeCAGSTHST CheckoutSessionCustomerDetailsTaxIDType = "ca_gst_hst" @@ -142,6 +147,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeCAPSTMB CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_mb" CheckoutSessionCustomerDetailsTaxIDTypeCAPSTSK CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_sk" CheckoutSessionCustomerDetailsTaxIDTypeCAQST CheckoutSessionCustomerDetailsTaxIDType = "ca_qst" + CheckoutSessionCustomerDetailsTaxIDTypeCdNif CheckoutSessionCustomerDetailsTaxIDType = "cd_nif" CheckoutSessionCustomerDetailsTaxIDTypeCHUID CheckoutSessionCustomerDetailsTaxIDType = "ch_uid" CheckoutSessionCustomerDetailsTaxIDTypeCHVAT CheckoutSessionCustomerDetailsTaxIDType = "ch_vat" CheckoutSessionCustomerDetailsTaxIDTypeCLTIN CheckoutSessionCustomerDetailsTaxIDType = "cl_tin" @@ -157,6 +163,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeEUVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_vat" CheckoutSessionCustomerDetailsTaxIDTypeGBVAT CheckoutSessionCustomerDetailsTaxIDType = "gb_vat" CheckoutSessionCustomerDetailsTaxIDTypeGEVAT CheckoutSessionCustomerDetailsTaxIDType = "ge_vat" + CheckoutSessionCustomerDetailsTaxIDTypeGnNif CheckoutSessionCustomerDetailsTaxIDType = "gn_nif" CheckoutSessionCustomerDetailsTaxIDTypeHKBR CheckoutSessionCustomerDetailsTaxIDType = "hk_br" CheckoutSessionCustomerDetailsTaxIDTypeHROIB CheckoutSessionCustomerDetailsTaxIDType = "hr_oib" CheckoutSessionCustomerDetailsTaxIDTypeHUTIN CheckoutSessionCustomerDetailsTaxIDType = "hu_tin" @@ -168,12 +175,16 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeJPRN CheckoutSessionCustomerDetailsTaxIDType = "jp_rn" CheckoutSessionCustomerDetailsTaxIDTypeJPTRN CheckoutSessionCustomerDetailsTaxIDType = "jp_trn" CheckoutSessionCustomerDetailsTaxIDTypeKEPIN CheckoutSessionCustomerDetailsTaxIDType = "ke_pin" + CheckoutSessionCustomerDetailsTaxIDTypeKhTin CheckoutSessionCustomerDetailsTaxIDType = "kh_tin" CheckoutSessionCustomerDetailsTaxIDTypeKRBRN CheckoutSessionCustomerDetailsTaxIDType = "kr_brn" CheckoutSessionCustomerDetailsTaxIDTypeKzBin CheckoutSessionCustomerDetailsTaxIDType = "kz_bin" CheckoutSessionCustomerDetailsTaxIDTypeLIUID CheckoutSessionCustomerDetailsTaxIDType = "li_uid" CheckoutSessionCustomerDetailsTaxIDTypeLiVAT CheckoutSessionCustomerDetailsTaxIDType = "li_vat" CheckoutSessionCustomerDetailsTaxIDTypeMaVAT CheckoutSessionCustomerDetailsTaxIDType = "ma_vat" CheckoutSessionCustomerDetailsTaxIDTypeMdVAT CheckoutSessionCustomerDetailsTaxIDType = "md_vat" + CheckoutSessionCustomerDetailsTaxIDTypeMePib CheckoutSessionCustomerDetailsTaxIDType = "me_pib" + CheckoutSessionCustomerDetailsTaxIDTypeMkVAT CheckoutSessionCustomerDetailsTaxIDType = "mk_vat" + CheckoutSessionCustomerDetailsTaxIDTypeMrNif CheckoutSessionCustomerDetailsTaxIDType = "mr_nif" CheckoutSessionCustomerDetailsTaxIDTypeMXRFC CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc" CheckoutSessionCustomerDetailsTaxIDTypeMYFRP CheckoutSessionCustomerDetailsTaxIDType = "my_frp" CheckoutSessionCustomerDetailsTaxIDTypeMYITN CheckoutSessionCustomerDetailsTaxIDType = "my_itn" @@ -181,6 +192,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeNgTin CheckoutSessionCustomerDetailsTaxIDType = "ng_tin" CheckoutSessionCustomerDetailsTaxIDTypeNOVAT CheckoutSessionCustomerDetailsTaxIDType = "no_vat" CheckoutSessionCustomerDetailsTaxIDTypeNOVOEC CheckoutSessionCustomerDetailsTaxIDType = "no_voec" + CheckoutSessionCustomerDetailsTaxIDTypeNpPan CheckoutSessionCustomerDetailsTaxIDType = "np_pan" CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst" CheckoutSessionCustomerDetailsTaxIDTypeOmVAT CheckoutSessionCustomerDetailsTaxIDType = "om_vat" CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc" @@ -193,12 +205,16 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeSGGST CheckoutSessionCustomerDetailsTaxIDType = "sg_gst" CheckoutSessionCustomerDetailsTaxIDTypeSGUEN CheckoutSessionCustomerDetailsTaxIDType = "sg_uen" CheckoutSessionCustomerDetailsTaxIDTypeSITIN CheckoutSessionCustomerDetailsTaxIDType = "si_tin" + CheckoutSessionCustomerDetailsTaxIDTypeSnNinea CheckoutSessionCustomerDetailsTaxIDType = "sn_ninea" + CheckoutSessionCustomerDetailsTaxIDTypeSrFin CheckoutSessionCustomerDetailsTaxIDType = "sr_fin" CheckoutSessionCustomerDetailsTaxIDTypeSVNIT CheckoutSessionCustomerDetailsTaxIDType = "sv_nit" CheckoutSessionCustomerDetailsTaxIDTypeTHVAT CheckoutSessionCustomerDetailsTaxIDType = "th_vat" + CheckoutSessionCustomerDetailsTaxIDTypeTjTin CheckoutSessionCustomerDetailsTaxIDType = "tj_tin" CheckoutSessionCustomerDetailsTaxIDTypeTRTIN CheckoutSessionCustomerDetailsTaxIDType = "tr_tin" CheckoutSessionCustomerDetailsTaxIDTypeTWVAT CheckoutSessionCustomerDetailsTaxIDType = "tw_vat" CheckoutSessionCustomerDetailsTaxIDTypeTzVAT CheckoutSessionCustomerDetailsTaxIDType = "tz_vat" CheckoutSessionCustomerDetailsTaxIDTypeUAVAT CheckoutSessionCustomerDetailsTaxIDType = "ua_vat" + CheckoutSessionCustomerDetailsTaxIDTypeUgTin CheckoutSessionCustomerDetailsTaxIDType = "ug_tin" CheckoutSessionCustomerDetailsTaxIDTypeUnknown CheckoutSessionCustomerDetailsTaxIDType = "unknown" CheckoutSessionCustomerDetailsTaxIDTypeUSEIN CheckoutSessionCustomerDetailsTaxIDType = "us_ein" CheckoutSessionCustomerDetailsTaxIDTypeUYRUC CheckoutSessionCustomerDetailsTaxIDType = "uy_ruc" @@ -207,6 +223,8 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeVERIF CheckoutSessionCustomerDetailsTaxIDType = "ve_rif" CheckoutSessionCustomerDetailsTaxIDTypeVNTIN CheckoutSessionCustomerDetailsTaxIDType = "vn_tin" CheckoutSessionCustomerDetailsTaxIDTypeZAVAT CheckoutSessionCustomerDetailsTaxIDType = "za_vat" + CheckoutSessionCustomerDetailsTaxIDTypeZmTin CheckoutSessionCustomerDetailsTaxIDType = "zm_tin" + CheckoutSessionCustomerDetailsTaxIDTypeZwTin CheckoutSessionCustomerDetailsTaxIDType = "zw_tin" ) // Type of the account referenced. @@ -1113,7 +1131,9 @@ type CheckoutSessionAutomaticTaxLiabilityParams struct { // Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. type CheckoutSessionAutomaticTaxParams struct { - // Set to true to enable automatic taxes. + // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + // + // Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. Enabled *bool `form:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. Liability *CheckoutSessionAutomaticTaxLiabilityParams `form:"liability"` @@ -1567,7 +1587,10 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct { } // Additional fields for Mandate creation -type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams struct{} +type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // contains details about the Bacs Debit payment method options. type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct { @@ -1947,7 +1970,10 @@ type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct { } // Additional fields for Mandate creation -type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams struct{} +type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // contains details about the Sepa Debit payment method options. type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct { @@ -2664,7 +2690,7 @@ type CheckoutSessionCustomText struct { // The customer's tax IDs after a completed Checkout Session. type CheckoutSessionCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` @@ -2815,7 +2841,10 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct { // When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"` } -type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions struct{} +type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type CheckoutSessionPaymentMethodOptionsBACSDebit struct { MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3114,7 +3143,10 @@ type CheckoutSessionPaymentMethodOptionsSamsungPay struct { // Controls when the funds will be captured from the customer's account. CaptureMethod CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod `json:"capture_method"` } -type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions struct{} +type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type CheckoutSessionPaymentMethodOptionsSEPADebit struct { MandateOptions *CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/confirmationtoken.go b/confirmationtoken.go index 6de95d0fbc..aa35e36311 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -58,6 +58,15 @@ const ( ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeUnknown ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "unknown" ) +// Status of a card based on the card issuer. +type ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus string + +// List of values that ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus can take +const ( + ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusRegulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "regulated" + ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusUnregulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "unregulated" +) + // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type ConfirmationTokenPaymentMethodPreviewCardWalletType string @@ -721,6 +730,8 @@ type ConfirmationTokenPaymentMethodPreviewCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *ConfirmationTokenPaymentMethodPreviewCardNetworks `json:"networks"` + // Status of a card based on the card issuer. + RegulatedStatus ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/customer.go b/customer.go index 53346b8178..a56f6e2a5c 100644 --- a/customer.go +++ b/customer.go @@ -194,7 +194,7 @@ func (p *CustomerListParams) AddExpand(f string) { // The customer's tax IDs. type CustomerTaxIDDataParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` diff --git a/dispute.go b/dispute.go index 6a8701d706..be63b8dbc1 100644 --- a/dispute.go +++ b/dispute.go @@ -47,6 +47,15 @@ const ( DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusRequiresAction DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "requires_action" ) +// Visa Compelling Evidence 3.0 eligibility status. +type DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus string + +// List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus can take +const ( + DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusFeeAcknowledged DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "fee_acknowledged" + DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusRequiresFeeAcknowledgement DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "requires_fee_acknowledgement" +) + // The AmazonPay dispute type, chargeback or claim type DisputePaymentMethodDetailsAmazonPayDisputeType string @@ -206,10 +215,18 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params struct { PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams `form:"prior_undisputed_transactions"` } +// Evidence provided for Visa Compliance evidence submission. +type DisputeEvidenceEnhancedEvidenceVisaComplianceParams struct { + // A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + FeeAcknowledged *bool `form:"fee_acknowledged"` +} + // Additional evidence for qualifying evidence programs. type DisputeEvidenceEnhancedEvidenceParams struct { // Evidence provided for Visa Compelling Evidence 3.0 evidence submission. VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params `form:"visa_compelling_evidence_3"` + // Evidence provided for Visa Compliance evidence submission. + VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaComplianceParams `form:"visa_compliance"` } // Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. @@ -317,8 +334,13 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 struct { // List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction `json:"prior_undisputed_transactions"` } +type DisputeEvidenceEnhancedEvidenceVisaCompliance struct { + // A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + FeeAcknowledged bool `json:"fee_acknowledged"` +} type DisputeEvidenceEnhancedEvidence struct { VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` + VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaCompliance `json:"visa_compliance"` } type DisputeEvidence struct { // Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -383,8 +405,13 @@ type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 struct { // Visa Compelling Evidence 3.0 eligibility status. Status DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status `json:"status"` } +type DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance struct { + // Visa Compelling Evidence 3.0 eligibility status. + Status DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus `json:"status"` +} type DisputeEvidenceDetailsEnhancedEligibility struct { VisaCompellingEvidence3 *DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` + VisaCompliance *DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance `json:"visa_compliance"` } type DisputeEvidenceDetails struct { // Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. diff --git a/forwarding_request.go b/forwarding_request.go index 92e7f57bad..bb2bdd8989 100644 --- a/forwarding_request.go +++ b/forwarding_request.go @@ -11,10 +11,11 @@ type ForwardingRequestReplacement string // List of values that ForwardingRequestReplacement can take const ( - ForwardingRequestReplacementCardCVC ForwardingRequestReplacement = "card_cvc" - ForwardingRequestReplacementCardExpiry ForwardingRequestReplacement = "card_expiry" - ForwardingRequestReplacementCardNumber ForwardingRequestReplacement = "card_number" - ForwardingRequestReplacementCardholderName ForwardingRequestReplacement = "cardholder_name" + ForwardingRequestReplacementCardCVC ForwardingRequestReplacement = "card_cvc" + ForwardingRequestReplacementCardExpiry ForwardingRequestReplacement = "card_expiry" + ForwardingRequestReplacementCardNumber ForwardingRequestReplacement = "card_number" + ForwardingRequestReplacementCardholderName ForwardingRequestReplacement = "cardholder_name" + ForwardingRequestReplacementRequestSignature ForwardingRequestReplacement = "request_signature" ) // The HTTP method used to call the destination endpoint. diff --git a/fundinginstructions.go b/fundinginstructions.go index 2657b80921..5db6766986 100644 --- a/fundinginstructions.go +++ b/fundinginstructions.go @@ -69,8 +69,10 @@ type FundingInstructionsBankTransferFinancialAddressABA struct { // Iban Records contain E.U. bank account details per the SEPA format. type FundingInstructionsBankTransferFinancialAddressIBAN struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The name of the person or business that owns the bank account - AccountHolderName string `json:"account_holder_name"` + AccountHolderName string `json:"account_holder_name"` + BankAddress *Address `json:"bank_address"` // The BIC/SWIFT code of the account. BIC string `json:"bic"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). @@ -81,16 +83,22 @@ type FundingInstructionsBankTransferFinancialAddressIBAN struct { // Sort Code Records contain U.K. bank account details per the sort code format. type FundingInstructionsBankTransferFinancialAddressSortCode struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The account number - AccountNumber string `json:"account_number"` + AccountNumber string `json:"account_number"` + BankAddress *Address `json:"bank_address"` // The six-digit sort code SortCode string `json:"sort_code"` } // SPEI Records contain Mexico bank account details per the SPEI format. type FundingInstructionsBankTransferFinancialAddressSpei struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` + BankAddress *Address `json:"bank_address"` // The three-digit bank code BankCode string `json:"bank_code"` // The short banking institution name @@ -117,12 +125,14 @@ type FundingInstructionsBankTransferFinancialAddressSwift struct { // Zengin Records contain Japan bank account details per the Zengin format. type FundingInstructionsBankTransferFinancialAddressZengin struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The account holder name AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The bank account type. In Japan, this can only be `futsu` or `toza`. - AccountType string `json:"account_type"` + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank code of the account BankCode string `json:"bank_code"` // The bank name of the account diff --git a/invoice.go b/invoice.go index 125ccde473..0a0b258853 100644 --- a/invoice.go +++ b/invoice.go @@ -11,6 +11,15 @@ import ( "github.com/stripe/stripe-go/v81/form" ) +// If Stripe disabled automatic tax, this enum describes why. +type InvoiceAutomaticTaxDisabledReason string + +// List of values that InvoiceAutomaticTaxDisabledReason can take +const ( + InvoiceAutomaticTaxDisabledReasonFinalizationRequiresLocationInputs InvoiceAutomaticTaxDisabledReason = "finalization_requires_location_inputs" + InvoiceAutomaticTaxDisabledReasonFinalizationSystemError InvoiceAutomaticTaxDisabledReason = "finalization_system_error" +) + // Type of the account referenced. type InvoiceAutomaticTaxLiabilityType string @@ -519,7 +528,7 @@ type InvoicePaymentSettingsParams struct { DefaultMandate *string `form:"default_mandate"` // Payment-method-specific configuration to provide to the invoice's PaymentIntent. PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"` - // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration PaymentMethodTypes []*string `form:"payment_method_types"` } @@ -711,7 +720,7 @@ type InvoiceUpcomingCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1088,7 +1097,7 @@ type InvoiceUpcomingSubscriptionDetailsItemPriceDataParams struct { type InvoiceUpcomingSubscriptionDetailsItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *InvoiceUpcomingSubscriptionDetailsItemBillingThresholdsParams `form:"billing_thresholds"` - // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` @@ -1281,7 +1290,7 @@ type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1692,7 +1701,7 @@ type InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataParams struct { type InvoiceUpcomingLinesSubscriptionDetailsItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsParams `form:"billing_thresholds"` - // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` @@ -1809,7 +1818,7 @@ type InvoiceUpcomingLinesSubscriptionItemPriceDataParams struct { type InvoiceUpcomingLinesSubscriptionItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` - // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` @@ -2346,7 +2355,7 @@ type InvoiceCreatePreviewCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceCreatePreviewCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2757,7 +2766,7 @@ type InvoiceCreatePreviewSubscriptionDetailsItemPriceDataParams struct { type InvoiceCreatePreviewSubscriptionDetailsItemParams struct { // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *InvoiceCreatePreviewSubscriptionDetailsItemBillingThresholdsParams `form:"billing_thresholds"` - // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` @@ -2897,6 +2906,8 @@ type InvoiceAutomaticTaxLiability struct { Type InvoiceAutomaticTaxLiabilityType `json:"type"` } type InvoiceAutomaticTax struct { + // If Stripe disabled automatic tax, this enum describes why. + DisabledReason InvoiceAutomaticTaxDisabledReason `json:"disabled_reason"` // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. Enabled bool `json:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. @@ -2915,7 +2926,7 @@ type InvoiceCustomField struct { // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. type InvoiceCustomerTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/issuing_authorization.go b/issuing_authorization.go index 4c9bdd3c55..0d08c71e57 100644 --- a/issuing_authorization.go +++ b/issuing_authorization.go @@ -384,6 +384,8 @@ type IssuingAuthorizationMerchantData struct { PostalCode string `json:"postal_code"` // State where the seller is located State string `json:"state"` + // The seller's tax identification number. Currently populated for French merchants only. + TaxID string `json:"tax_id"` // An ID assigned by the seller to the location of the sale. TerminalID string `json:"terminal_id"` // URL provided by the merchant on a 3DS request diff --git a/paymentintent.go b/paymentintent.go index 907bd9920b..1a19d8b626 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -1423,7 +1423,10 @@ type PaymentIntentPaymentMethodOptionsAUBECSDebitParams struct { } // Additional fields for Mandate creation -type PaymentIntentPaymentMethodOptionsBACSDebitMandateOptionsParams struct{} +type PaymentIntentPaymentMethodOptionsBACSDebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. type PaymentIntentPaymentMethodOptionsBACSDebitParams struct { @@ -2073,7 +2076,10 @@ type PaymentIntentPaymentMethodOptionsSamsungPayParams struct { } // Additional fields for Mandate creation -type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{} +type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. type PaymentIntentPaymentMethodOptionsSEPADebitParams struct { @@ -2109,7 +2115,7 @@ type PaymentIntentPaymentMethodOptionsSofortParams struct { // If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. type PaymentIntentPaymentMethodOptionsSwishParams struct { - // The order ID displayed in the Swish app after the payment is authorized. + // A reference for this payment to be displayed in the Swish app. Reference *string `form:"reference"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -2797,8 +2803,10 @@ type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressABA s // Iban Records contain E.U. bank account details per the SEPA format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The name of the person or business that owns the bank account - AccountHolderName string `json:"account_holder_name"` + AccountHolderName string `json:"account_holder_name"` + BankAddress *Address `json:"bank_address"` // The BIC/SWIFT code of the account. BIC string `json:"bic"` // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). @@ -2809,16 +2817,22 @@ type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN // Sort Code Records contain U.K. bank account details per the sort code format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The name of the person or business that owns the bank account AccountHolderName string `json:"account_holder_name"` // The account number - AccountNumber string `json:"account_number"` + AccountNumber string `json:"account_number"` + BankAddress *Address `json:"bank_address"` // The six-digit sort code SortCode string `json:"sort_code"` } // SPEI Records contain Mexico bank account details per the SPEI format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` + BankAddress *Address `json:"bank_address"` // The three-digit bank code BankCode string `json:"bank_code"` // The short banking institution name @@ -2845,12 +2859,14 @@ type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift // Zengin Records contain Japan bank account details per the Zengin format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin struct { + AccountHolderAddress *Address `json:"account_holder_address"` // The account holder name AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` // The bank account type. In Japan, this can only be `futsu` or `toza`. - AccountType string `json:"account_type"` + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank code of the account BankCode string `json:"bank_code"` // The bank name of the account @@ -3178,7 +3194,10 @@ type PaymentIntentPaymentMethodOptionsAUBECSDebit struct { // When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"` } -type PaymentIntentPaymentMethodOptionsBACSDebitMandateOptions struct{} +type PaymentIntentPaymentMethodOptionsBACSDebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type PaymentIntentPaymentMethodOptionsBACSDebit struct { MandateOptions *PaymentIntentPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3594,7 +3613,10 @@ type PaymentIntentPaymentMethodOptionsSamsungPay struct { // Controls when the funds will be captured from the customer's account. CaptureMethod PaymentIntentPaymentMethodOptionsSamsungPayCaptureMethod `json:"capture_method"` } -type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions struct{} +type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type PaymentIntentPaymentMethodOptionsSEPADebit struct { MandateOptions *PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3619,7 +3641,7 @@ type PaymentIntentPaymentMethodOptionsSofort struct { SetupFutureUsage PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage `json:"setup_future_usage"` } type PaymentIntentPaymentMethodOptionsSwish struct { - // The order ID displayed in the Swish app after the payment is authorized. + // A reference for this payment to be displayed in the Swish app. Reference string `json:"reference"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // diff --git a/paymentlink.go b/paymentlink.go index f6dfc4f2a5..39c8401805 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -254,7 +254,9 @@ type PaymentLinkAutomaticTaxLiabilityParams struct { // Configuration for automatic tax collection. type PaymentLinkAutomaticTaxParams struct { - // If `true`, tax will be calculated automatically using the customer's location. + // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + // + // Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. Enabled *bool `form:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. Liability *PaymentLinkAutomaticTaxLiabilityParams `form:"liability"` diff --git a/paymentmethod.go b/paymentmethod.go index 62385c72ec..a549e674d3 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -142,6 +142,15 @@ const ( PaymentMethodCardNetworksPreferredUnknown PaymentMethodCardNetworksPreferred = "unknown" ) +// Status of a card based on the card issuer. +type PaymentMethodCardRegulatedStatus string + +// List of values that PaymentMethodCardRegulatedStatus can take +const ( + PaymentMethodCardRegulatedStatusRegulated PaymentMethodCardRegulatedStatus = "regulated" + PaymentMethodCardRegulatedStatusUnregulated PaymentMethodCardRegulatedStatus = "unregulated" +) + // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type PaymentMethodCardWalletType string @@ -1015,6 +1024,8 @@ type PaymentMethodCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodCardNetworks `json:"networks"` + // Status of a card based on the card issuer. + RegulatedStatus PaymentMethodCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/setupintent.go b/setupintent.go index 736d49ceec..e02b066b6b 100644 --- a/setupintent.go +++ b/setupintent.go @@ -656,7 +656,10 @@ type SetupIntentPaymentMethodOptionsACSSDebitParams struct { type SetupIntentPaymentMethodOptionsAmazonPayParams struct{} // Additional fields for Mandate creation -type SetupIntentPaymentMethodOptionsBACSDebitMandateOptionsParams struct{} +type SetupIntentPaymentMethodOptionsBACSDebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. type SetupIntentPaymentMethodOptionsBACSDebitParams struct { @@ -773,7 +776,10 @@ type SetupIntentPaymentMethodOptionsPaypalParams struct { } // Additional fields for Mandate creation -type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{} +type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix *string `form:"reference_prefix"` +} // If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. type SetupIntentPaymentMethodOptionsSEPADebitParams struct { @@ -1405,7 +1411,10 @@ type SetupIntentPaymentMethodOptionsACSSDebit struct { VerificationMethod SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` } type SetupIntentPaymentMethodOptionsAmazonPay struct{} -type SetupIntentPaymentMethodOptionsBACSDebitMandateOptions struct{} +type SetupIntentPaymentMethodOptionsBACSDebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type SetupIntentPaymentMethodOptionsBACSDebit struct { MandateOptions *SetupIntentPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"` } @@ -1451,7 +1460,10 @@ type SetupIntentPaymentMethodOptionsPaypal struct { // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. BillingAgreementID string `json:"billing_agreement_id"` } -type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions struct{} +type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions struct { + // Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + ReferencePrefix string `json:"reference_prefix"` +} type SetupIntentPaymentMethodOptionsSEPADebit struct { MandateOptions *SetupIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"` } diff --git a/subscription.go b/subscription.go index 822f0aa7ca..551ea8a9ec 100644 --- a/subscription.go +++ b/subscription.go @@ -11,6 +11,14 @@ import ( "github.com/stripe/stripe-go/v81/form" ) +// If Stripe disabled automatic tax, this enum describes why. +type SubscriptionAutomaticTaxDisabledReason string + +// List of values that SubscriptionAutomaticTaxDisabledReason can take +const ( + SubscriptionAutomaticTaxDisabledReasonRequiresLocationInputs SubscriptionAutomaticTaxDisabledReason = "requires_location_inputs" +) + // Type of the account referenced. type SubscriptionAutomaticTaxLiabilityType string @@ -514,7 +522,7 @@ type SubscriptionItemsParams struct { Params `form:"*"` // Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"` - // Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`. + // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. ClearUsage *bool `form:"clear_usage"` // A flag that, if set to `true`, will delete the specified item. Deleted *bool `form:"deleted"` @@ -667,7 +675,7 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsParams struct { type SubscriptionPaymentSettingsParams struct { // Payment-method-specific configuration to provide to invoices created by the subscription. PaymentMethodOptions *SubscriptionPaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"` - // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration PaymentMethodTypes []*string `form:"payment_method_types"` // Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. SaveDefaultPaymentMethod *string `form:"save_default_payment_method"` @@ -807,6 +815,8 @@ type SubscriptionAutomaticTaxLiability struct { Type SubscriptionAutomaticTaxLiabilityType `json:"type"` } type SubscriptionAutomaticTax struct { + // If Stripe disabled automatic tax, this enum describes why. + DisabledReason SubscriptionAutomaticTaxDisabledReason `json:"disabled_reason"` // Whether Stripe automatically computes tax on this subscription. Enabled bool `json:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. diff --git a/tax_calculation.go b/tax_calculation.go index da296f495d..e8e9f7d89d 100644 --- a/tax_calculation.go +++ b/tax_calculation.go @@ -15,21 +15,26 @@ const ( TaxCalculationCustomerDetailsAddressSourceShipping TaxCalculationCustomerDetailsAddressSource = "shipping" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take const ( TaxCalculationCustomerDetailsTaxIDTypeADNRT TaxCalculationCustomerDetailsTaxIDType = "ad_nrt" TaxCalculationCustomerDetailsTaxIDTypeAETRN TaxCalculationCustomerDetailsTaxIDType = "ae_trn" + TaxCalculationCustomerDetailsTaxIDTypeAmTin TaxCalculationCustomerDetailsTaxIDType = "am_tin" + TaxCalculationCustomerDetailsTaxIDTypeAoTin TaxCalculationCustomerDetailsTaxIDType = "ao_tin" TaxCalculationCustomerDetailsTaxIDTypeARCUIT TaxCalculationCustomerDetailsTaxIDType = "ar_cuit" TaxCalculationCustomerDetailsTaxIDTypeAUABN TaxCalculationCustomerDetailsTaxIDType = "au_abn" TaxCalculationCustomerDetailsTaxIDTypeAUARN TaxCalculationCustomerDetailsTaxIDType = "au_arn" + TaxCalculationCustomerDetailsTaxIDTypeBaTin TaxCalculationCustomerDetailsTaxIDType = "ba_tin" + TaxCalculationCustomerDetailsTaxIDTypeBbTin TaxCalculationCustomerDetailsTaxIDType = "bb_tin" TaxCalculationCustomerDetailsTaxIDTypeBGUIC TaxCalculationCustomerDetailsTaxIDType = "bg_uic" TaxCalculationCustomerDetailsTaxIDTypeBhVAT TaxCalculationCustomerDetailsTaxIDType = "bh_vat" TaxCalculationCustomerDetailsTaxIDTypeBOTIN TaxCalculationCustomerDetailsTaxIDType = "bo_tin" TaxCalculationCustomerDetailsTaxIDTypeBRCNPJ TaxCalculationCustomerDetailsTaxIDType = "br_cnpj" TaxCalculationCustomerDetailsTaxIDTypeBRCPF TaxCalculationCustomerDetailsTaxIDType = "br_cpf" + TaxCalculationCustomerDetailsTaxIDTypeBsTin TaxCalculationCustomerDetailsTaxIDType = "bs_tin" TaxCalculationCustomerDetailsTaxIDTypeByTin TaxCalculationCustomerDetailsTaxIDType = "by_tin" TaxCalculationCustomerDetailsTaxIDTypeCABN TaxCalculationCustomerDetailsTaxIDType = "ca_bn" TaxCalculationCustomerDetailsTaxIDTypeCAGSTHST TaxCalculationCustomerDetailsTaxIDType = "ca_gst_hst" @@ -37,6 +42,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeCAPSTMB TaxCalculationCustomerDetailsTaxIDType = "ca_pst_mb" TaxCalculationCustomerDetailsTaxIDTypeCAPSTSK TaxCalculationCustomerDetailsTaxIDType = "ca_pst_sk" TaxCalculationCustomerDetailsTaxIDTypeCAQST TaxCalculationCustomerDetailsTaxIDType = "ca_qst" + TaxCalculationCustomerDetailsTaxIDTypeCdNif TaxCalculationCustomerDetailsTaxIDType = "cd_nif" TaxCalculationCustomerDetailsTaxIDTypeCHUID TaxCalculationCustomerDetailsTaxIDType = "ch_uid" TaxCalculationCustomerDetailsTaxIDTypeCHVAT TaxCalculationCustomerDetailsTaxIDType = "ch_vat" TaxCalculationCustomerDetailsTaxIDTypeCLTIN TaxCalculationCustomerDetailsTaxIDType = "cl_tin" @@ -52,6 +58,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeEUVAT TaxCalculationCustomerDetailsTaxIDType = "eu_vat" TaxCalculationCustomerDetailsTaxIDTypeGBVAT TaxCalculationCustomerDetailsTaxIDType = "gb_vat" TaxCalculationCustomerDetailsTaxIDTypeGEVAT TaxCalculationCustomerDetailsTaxIDType = "ge_vat" + TaxCalculationCustomerDetailsTaxIDTypeGnNif TaxCalculationCustomerDetailsTaxIDType = "gn_nif" TaxCalculationCustomerDetailsTaxIDTypeHKBR TaxCalculationCustomerDetailsTaxIDType = "hk_br" TaxCalculationCustomerDetailsTaxIDTypeHROIB TaxCalculationCustomerDetailsTaxIDType = "hr_oib" TaxCalculationCustomerDetailsTaxIDTypeHUTIN TaxCalculationCustomerDetailsTaxIDType = "hu_tin" @@ -63,12 +70,16 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeJPRN TaxCalculationCustomerDetailsTaxIDType = "jp_rn" TaxCalculationCustomerDetailsTaxIDTypeJPTRN TaxCalculationCustomerDetailsTaxIDType = "jp_trn" TaxCalculationCustomerDetailsTaxIDTypeKEPIN TaxCalculationCustomerDetailsTaxIDType = "ke_pin" + TaxCalculationCustomerDetailsTaxIDTypeKhTin TaxCalculationCustomerDetailsTaxIDType = "kh_tin" TaxCalculationCustomerDetailsTaxIDTypeKRBRN TaxCalculationCustomerDetailsTaxIDType = "kr_brn" TaxCalculationCustomerDetailsTaxIDTypeKzBin TaxCalculationCustomerDetailsTaxIDType = "kz_bin" TaxCalculationCustomerDetailsTaxIDTypeLIUID TaxCalculationCustomerDetailsTaxIDType = "li_uid" TaxCalculationCustomerDetailsTaxIDTypeLiVAT TaxCalculationCustomerDetailsTaxIDType = "li_vat" TaxCalculationCustomerDetailsTaxIDTypeMaVAT TaxCalculationCustomerDetailsTaxIDType = "ma_vat" TaxCalculationCustomerDetailsTaxIDTypeMdVAT TaxCalculationCustomerDetailsTaxIDType = "md_vat" + TaxCalculationCustomerDetailsTaxIDTypeMePib TaxCalculationCustomerDetailsTaxIDType = "me_pib" + TaxCalculationCustomerDetailsTaxIDTypeMkVAT TaxCalculationCustomerDetailsTaxIDType = "mk_vat" + TaxCalculationCustomerDetailsTaxIDTypeMrNif TaxCalculationCustomerDetailsTaxIDType = "mr_nif" TaxCalculationCustomerDetailsTaxIDTypeMXRFC TaxCalculationCustomerDetailsTaxIDType = "mx_rfc" TaxCalculationCustomerDetailsTaxIDTypeMYFRP TaxCalculationCustomerDetailsTaxIDType = "my_frp" TaxCalculationCustomerDetailsTaxIDTypeMYITN TaxCalculationCustomerDetailsTaxIDType = "my_itn" @@ -76,6 +87,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeNgTin TaxCalculationCustomerDetailsTaxIDType = "ng_tin" TaxCalculationCustomerDetailsTaxIDTypeNOVAT TaxCalculationCustomerDetailsTaxIDType = "no_vat" TaxCalculationCustomerDetailsTaxIDTypeNOVOEC TaxCalculationCustomerDetailsTaxIDType = "no_voec" + TaxCalculationCustomerDetailsTaxIDTypeNpPan TaxCalculationCustomerDetailsTaxIDType = "np_pan" TaxCalculationCustomerDetailsTaxIDTypeNZGST TaxCalculationCustomerDetailsTaxIDType = "nz_gst" TaxCalculationCustomerDetailsTaxIDTypeOmVAT TaxCalculationCustomerDetailsTaxIDType = "om_vat" TaxCalculationCustomerDetailsTaxIDTypePERUC TaxCalculationCustomerDetailsTaxIDType = "pe_ruc" @@ -88,12 +100,16 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeSGGST TaxCalculationCustomerDetailsTaxIDType = "sg_gst" TaxCalculationCustomerDetailsTaxIDTypeSGUEN TaxCalculationCustomerDetailsTaxIDType = "sg_uen" TaxCalculationCustomerDetailsTaxIDTypeSITIN TaxCalculationCustomerDetailsTaxIDType = "si_tin" + TaxCalculationCustomerDetailsTaxIDTypeSnNinea TaxCalculationCustomerDetailsTaxIDType = "sn_ninea" + TaxCalculationCustomerDetailsTaxIDTypeSrFin TaxCalculationCustomerDetailsTaxIDType = "sr_fin" TaxCalculationCustomerDetailsTaxIDTypeSVNIT TaxCalculationCustomerDetailsTaxIDType = "sv_nit" TaxCalculationCustomerDetailsTaxIDTypeTHVAT TaxCalculationCustomerDetailsTaxIDType = "th_vat" + TaxCalculationCustomerDetailsTaxIDTypeTjTin TaxCalculationCustomerDetailsTaxIDType = "tj_tin" TaxCalculationCustomerDetailsTaxIDTypeTRTIN TaxCalculationCustomerDetailsTaxIDType = "tr_tin" TaxCalculationCustomerDetailsTaxIDTypeTWVAT TaxCalculationCustomerDetailsTaxIDType = "tw_vat" TaxCalculationCustomerDetailsTaxIDTypeTzVAT TaxCalculationCustomerDetailsTaxIDType = "tz_vat" TaxCalculationCustomerDetailsTaxIDTypeUAVAT TaxCalculationCustomerDetailsTaxIDType = "ua_vat" + TaxCalculationCustomerDetailsTaxIDTypeUgTin TaxCalculationCustomerDetailsTaxIDType = "ug_tin" TaxCalculationCustomerDetailsTaxIDTypeUnknown TaxCalculationCustomerDetailsTaxIDType = "unknown" TaxCalculationCustomerDetailsTaxIDTypeUSEIN TaxCalculationCustomerDetailsTaxIDType = "us_ein" TaxCalculationCustomerDetailsTaxIDTypeUYRUC TaxCalculationCustomerDetailsTaxIDType = "uy_ruc" @@ -102,6 +118,8 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeVERIF TaxCalculationCustomerDetailsTaxIDType = "ve_rif" TaxCalculationCustomerDetailsTaxIDTypeVNTIN TaxCalculationCustomerDetailsTaxIDType = "vn_tin" TaxCalculationCustomerDetailsTaxIDTypeZAVAT TaxCalculationCustomerDetailsTaxIDType = "za_vat" + TaxCalculationCustomerDetailsTaxIDTypeZmTin TaxCalculationCustomerDetailsTaxIDType = "zm_tin" + TaxCalculationCustomerDetailsTaxIDTypeZwTin TaxCalculationCustomerDetailsTaxIDType = "zw_tin" ) // The taxability override used for taxation. @@ -280,7 +298,7 @@ func (p *TaxCalculationListLineItemsParams) AddExpand(f string) { // The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. type TaxCalculationCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -337,7 +355,7 @@ type TaxCalculationShippingCostParams struct { // The customer's tax IDs (for example, EU VAT numbers). type TaxCalculationCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/tax_transaction.go b/tax_transaction.go index 6ba87d3808..291507c3a3 100644 --- a/tax_transaction.go +++ b/tax_transaction.go @@ -15,21 +15,26 @@ const ( TaxTransactionCustomerDetailsAddressSourceShipping TaxTransactionCustomerDetailsAddressSource = "shipping" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take const ( TaxTransactionCustomerDetailsTaxIDTypeADNRT TaxTransactionCustomerDetailsTaxIDType = "ad_nrt" TaxTransactionCustomerDetailsTaxIDTypeAETRN TaxTransactionCustomerDetailsTaxIDType = "ae_trn" + TaxTransactionCustomerDetailsTaxIDTypeAmTin TaxTransactionCustomerDetailsTaxIDType = "am_tin" + TaxTransactionCustomerDetailsTaxIDTypeAoTin TaxTransactionCustomerDetailsTaxIDType = "ao_tin" TaxTransactionCustomerDetailsTaxIDTypeARCUIT TaxTransactionCustomerDetailsTaxIDType = "ar_cuit" TaxTransactionCustomerDetailsTaxIDTypeAUABN TaxTransactionCustomerDetailsTaxIDType = "au_abn" TaxTransactionCustomerDetailsTaxIDTypeAUARN TaxTransactionCustomerDetailsTaxIDType = "au_arn" + TaxTransactionCustomerDetailsTaxIDTypeBaTin TaxTransactionCustomerDetailsTaxIDType = "ba_tin" + TaxTransactionCustomerDetailsTaxIDTypeBbTin TaxTransactionCustomerDetailsTaxIDType = "bb_tin" TaxTransactionCustomerDetailsTaxIDTypeBGUIC TaxTransactionCustomerDetailsTaxIDType = "bg_uic" TaxTransactionCustomerDetailsTaxIDTypeBhVAT TaxTransactionCustomerDetailsTaxIDType = "bh_vat" TaxTransactionCustomerDetailsTaxIDTypeBOTIN TaxTransactionCustomerDetailsTaxIDType = "bo_tin" TaxTransactionCustomerDetailsTaxIDTypeBRCNPJ TaxTransactionCustomerDetailsTaxIDType = "br_cnpj" TaxTransactionCustomerDetailsTaxIDTypeBRCPF TaxTransactionCustomerDetailsTaxIDType = "br_cpf" + TaxTransactionCustomerDetailsTaxIDTypeBsTin TaxTransactionCustomerDetailsTaxIDType = "bs_tin" TaxTransactionCustomerDetailsTaxIDTypeByTin TaxTransactionCustomerDetailsTaxIDType = "by_tin" TaxTransactionCustomerDetailsTaxIDTypeCABN TaxTransactionCustomerDetailsTaxIDType = "ca_bn" TaxTransactionCustomerDetailsTaxIDTypeCAGSTHST TaxTransactionCustomerDetailsTaxIDType = "ca_gst_hst" @@ -37,6 +42,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeCAPSTMB TaxTransactionCustomerDetailsTaxIDType = "ca_pst_mb" TaxTransactionCustomerDetailsTaxIDTypeCAPSTSK TaxTransactionCustomerDetailsTaxIDType = "ca_pst_sk" TaxTransactionCustomerDetailsTaxIDTypeCAQST TaxTransactionCustomerDetailsTaxIDType = "ca_qst" + TaxTransactionCustomerDetailsTaxIDTypeCdNif TaxTransactionCustomerDetailsTaxIDType = "cd_nif" TaxTransactionCustomerDetailsTaxIDTypeCHUID TaxTransactionCustomerDetailsTaxIDType = "ch_uid" TaxTransactionCustomerDetailsTaxIDTypeCHVAT TaxTransactionCustomerDetailsTaxIDType = "ch_vat" TaxTransactionCustomerDetailsTaxIDTypeCLTIN TaxTransactionCustomerDetailsTaxIDType = "cl_tin" @@ -52,6 +58,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeEUVAT TaxTransactionCustomerDetailsTaxIDType = "eu_vat" TaxTransactionCustomerDetailsTaxIDTypeGBVAT TaxTransactionCustomerDetailsTaxIDType = "gb_vat" TaxTransactionCustomerDetailsTaxIDTypeGEVAT TaxTransactionCustomerDetailsTaxIDType = "ge_vat" + TaxTransactionCustomerDetailsTaxIDTypeGnNif TaxTransactionCustomerDetailsTaxIDType = "gn_nif" TaxTransactionCustomerDetailsTaxIDTypeHKBR TaxTransactionCustomerDetailsTaxIDType = "hk_br" TaxTransactionCustomerDetailsTaxIDTypeHROIB TaxTransactionCustomerDetailsTaxIDType = "hr_oib" TaxTransactionCustomerDetailsTaxIDTypeHUTIN TaxTransactionCustomerDetailsTaxIDType = "hu_tin" @@ -63,12 +70,16 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeJPRN TaxTransactionCustomerDetailsTaxIDType = "jp_rn" TaxTransactionCustomerDetailsTaxIDTypeJPTRN TaxTransactionCustomerDetailsTaxIDType = "jp_trn" TaxTransactionCustomerDetailsTaxIDTypeKEPIN TaxTransactionCustomerDetailsTaxIDType = "ke_pin" + TaxTransactionCustomerDetailsTaxIDTypeKhTin TaxTransactionCustomerDetailsTaxIDType = "kh_tin" TaxTransactionCustomerDetailsTaxIDTypeKRBRN TaxTransactionCustomerDetailsTaxIDType = "kr_brn" TaxTransactionCustomerDetailsTaxIDTypeKzBin TaxTransactionCustomerDetailsTaxIDType = "kz_bin" TaxTransactionCustomerDetailsTaxIDTypeLIUID TaxTransactionCustomerDetailsTaxIDType = "li_uid" TaxTransactionCustomerDetailsTaxIDTypeLiVAT TaxTransactionCustomerDetailsTaxIDType = "li_vat" TaxTransactionCustomerDetailsTaxIDTypeMaVAT TaxTransactionCustomerDetailsTaxIDType = "ma_vat" TaxTransactionCustomerDetailsTaxIDTypeMdVAT TaxTransactionCustomerDetailsTaxIDType = "md_vat" + TaxTransactionCustomerDetailsTaxIDTypeMePib TaxTransactionCustomerDetailsTaxIDType = "me_pib" + TaxTransactionCustomerDetailsTaxIDTypeMkVAT TaxTransactionCustomerDetailsTaxIDType = "mk_vat" + TaxTransactionCustomerDetailsTaxIDTypeMrNif TaxTransactionCustomerDetailsTaxIDType = "mr_nif" TaxTransactionCustomerDetailsTaxIDTypeMXRFC TaxTransactionCustomerDetailsTaxIDType = "mx_rfc" TaxTransactionCustomerDetailsTaxIDTypeMYFRP TaxTransactionCustomerDetailsTaxIDType = "my_frp" TaxTransactionCustomerDetailsTaxIDTypeMYITN TaxTransactionCustomerDetailsTaxIDType = "my_itn" @@ -76,6 +87,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeNgTin TaxTransactionCustomerDetailsTaxIDType = "ng_tin" TaxTransactionCustomerDetailsTaxIDTypeNOVAT TaxTransactionCustomerDetailsTaxIDType = "no_vat" TaxTransactionCustomerDetailsTaxIDTypeNOVOEC TaxTransactionCustomerDetailsTaxIDType = "no_voec" + TaxTransactionCustomerDetailsTaxIDTypeNpPan TaxTransactionCustomerDetailsTaxIDType = "np_pan" TaxTransactionCustomerDetailsTaxIDTypeNZGST TaxTransactionCustomerDetailsTaxIDType = "nz_gst" TaxTransactionCustomerDetailsTaxIDTypeOmVAT TaxTransactionCustomerDetailsTaxIDType = "om_vat" TaxTransactionCustomerDetailsTaxIDTypePERUC TaxTransactionCustomerDetailsTaxIDType = "pe_ruc" @@ -88,12 +100,16 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeSGGST TaxTransactionCustomerDetailsTaxIDType = "sg_gst" TaxTransactionCustomerDetailsTaxIDTypeSGUEN TaxTransactionCustomerDetailsTaxIDType = "sg_uen" TaxTransactionCustomerDetailsTaxIDTypeSITIN TaxTransactionCustomerDetailsTaxIDType = "si_tin" + TaxTransactionCustomerDetailsTaxIDTypeSnNinea TaxTransactionCustomerDetailsTaxIDType = "sn_ninea" + TaxTransactionCustomerDetailsTaxIDTypeSrFin TaxTransactionCustomerDetailsTaxIDType = "sr_fin" TaxTransactionCustomerDetailsTaxIDTypeSVNIT TaxTransactionCustomerDetailsTaxIDType = "sv_nit" TaxTransactionCustomerDetailsTaxIDTypeTHVAT TaxTransactionCustomerDetailsTaxIDType = "th_vat" + TaxTransactionCustomerDetailsTaxIDTypeTjTin TaxTransactionCustomerDetailsTaxIDType = "tj_tin" TaxTransactionCustomerDetailsTaxIDTypeTRTIN TaxTransactionCustomerDetailsTaxIDType = "tr_tin" TaxTransactionCustomerDetailsTaxIDTypeTWVAT TaxTransactionCustomerDetailsTaxIDType = "tw_vat" TaxTransactionCustomerDetailsTaxIDTypeTzVAT TaxTransactionCustomerDetailsTaxIDType = "tz_vat" TaxTransactionCustomerDetailsTaxIDTypeUAVAT TaxTransactionCustomerDetailsTaxIDType = "ua_vat" + TaxTransactionCustomerDetailsTaxIDTypeUgTin TaxTransactionCustomerDetailsTaxIDType = "ug_tin" TaxTransactionCustomerDetailsTaxIDTypeUnknown TaxTransactionCustomerDetailsTaxIDType = "unknown" TaxTransactionCustomerDetailsTaxIDTypeUSEIN TaxTransactionCustomerDetailsTaxIDType = "us_ein" TaxTransactionCustomerDetailsTaxIDTypeUYRUC TaxTransactionCustomerDetailsTaxIDType = "uy_ruc" @@ -102,6 +118,8 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeVERIF TaxTransactionCustomerDetailsTaxIDType = "ve_rif" TaxTransactionCustomerDetailsTaxIDTypeVNTIN TaxTransactionCustomerDetailsTaxIDType = "vn_tin" TaxTransactionCustomerDetailsTaxIDTypeZAVAT TaxTransactionCustomerDetailsTaxIDType = "za_vat" + TaxTransactionCustomerDetailsTaxIDTypeZmTin TaxTransactionCustomerDetailsTaxIDType = "zm_tin" + TaxTransactionCustomerDetailsTaxIDTypeZwTin TaxTransactionCustomerDetailsTaxIDType = "zw_tin" ) // The taxability override used for taxation. @@ -320,7 +338,7 @@ func (p *TaxTransactionCreateReversalParams) AddMetadata(key string, value strin // The customer's tax IDs (for example, EU VAT numbers). type TaxTransactionCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type TaxTransactionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/taxid.go b/taxid.go index 5f06da7ef0..f7834fccfc 100644 --- a/taxid.go +++ b/taxid.go @@ -19,21 +19,26 @@ const ( TaxIDOwnerTypeSelf TaxIDOwnerType = "self" ) -// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` +// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` type TaxIDType string // List of values that TaxIDType can take const ( TaxIDTypeADNRT TaxIDType = "ad_nrt" TaxIDTypeAETRN TaxIDType = "ae_trn" + TaxIDTypeAmTin TaxIDType = "am_tin" + TaxIDTypeAoTin TaxIDType = "ao_tin" TaxIDTypeARCUIT TaxIDType = "ar_cuit" TaxIDTypeAUABN TaxIDType = "au_abn" TaxIDTypeAUARN TaxIDType = "au_arn" + TaxIDTypeBaTin TaxIDType = "ba_tin" + TaxIDTypeBbTin TaxIDType = "bb_tin" TaxIDTypeBGUIC TaxIDType = "bg_uic" TaxIDTypeBhVAT TaxIDType = "bh_vat" TaxIDTypeBOTIN TaxIDType = "bo_tin" TaxIDTypeBRCNPJ TaxIDType = "br_cnpj" TaxIDTypeBRCPF TaxIDType = "br_cpf" + TaxIDTypeBsTin TaxIDType = "bs_tin" TaxIDTypeByTin TaxIDType = "by_tin" TaxIDTypeCABN TaxIDType = "ca_bn" TaxIDTypeCAGSTHST TaxIDType = "ca_gst_hst" @@ -41,6 +46,7 @@ const ( TaxIDTypeCAPSTMB TaxIDType = "ca_pst_mb" TaxIDTypeCAPSTSK TaxIDType = "ca_pst_sk" TaxIDTypeCAQST TaxIDType = "ca_qst" + TaxIDTypeCdNif TaxIDType = "cd_nif" TaxIDTypeCHUID TaxIDType = "ch_uid" TaxIDTypeCHVAT TaxIDType = "ch_vat" TaxIDTypeCLTIN TaxIDType = "cl_tin" @@ -56,6 +62,7 @@ const ( TaxIDTypeEUVAT TaxIDType = "eu_vat" TaxIDTypeGBVAT TaxIDType = "gb_vat" TaxIDTypeGEVAT TaxIDType = "ge_vat" + TaxIDTypeGnNif TaxIDType = "gn_nif" TaxIDTypeHKBR TaxIDType = "hk_br" TaxIDTypeHROIB TaxIDType = "hr_oib" TaxIDTypeHUTIN TaxIDType = "hu_tin" @@ -67,12 +74,16 @@ const ( TaxIDTypeJPRN TaxIDType = "jp_rn" TaxIDTypeJPTRN TaxIDType = "jp_trn" TaxIDTypeKEPIN TaxIDType = "ke_pin" + TaxIDTypeKhTin TaxIDType = "kh_tin" TaxIDTypeKRBRN TaxIDType = "kr_brn" TaxIDTypeKzBin TaxIDType = "kz_bin" TaxIDTypeLIUID TaxIDType = "li_uid" TaxIDTypeLiVAT TaxIDType = "li_vat" TaxIDTypeMaVAT TaxIDType = "ma_vat" TaxIDTypeMdVAT TaxIDType = "md_vat" + TaxIDTypeMePib TaxIDType = "me_pib" + TaxIDTypeMkVAT TaxIDType = "mk_vat" + TaxIDTypeMrNif TaxIDType = "mr_nif" TaxIDTypeMXRFC TaxIDType = "mx_rfc" TaxIDTypeMYFRP TaxIDType = "my_frp" TaxIDTypeMYITN TaxIDType = "my_itn" @@ -80,6 +91,7 @@ const ( TaxIDTypeNgTin TaxIDType = "ng_tin" TaxIDTypeNOVAT TaxIDType = "no_vat" TaxIDTypeNOVOEC TaxIDType = "no_voec" + TaxIDTypeNpPan TaxIDType = "np_pan" TaxIDTypeNZGST TaxIDType = "nz_gst" TaxIDTypeOmVAT TaxIDType = "om_vat" TaxIDTypePERUC TaxIDType = "pe_ruc" @@ -92,12 +104,16 @@ const ( TaxIDTypeSGGST TaxIDType = "sg_gst" TaxIDTypeSGUEN TaxIDType = "sg_uen" TaxIDTypeSITIN TaxIDType = "si_tin" + TaxIDTypeSnNinea TaxIDType = "sn_ninea" + TaxIDTypeSrFin TaxIDType = "sr_fin" TaxIDTypeSVNIT TaxIDType = "sv_nit" TaxIDTypeTHVAT TaxIDType = "th_vat" + TaxIDTypeTjTin TaxIDType = "tj_tin" TaxIDTypeTRTIN TaxIDType = "tr_tin" TaxIDTypeTWVAT TaxIDType = "tw_vat" TaxIDTypeTzVAT TaxIDType = "tz_vat" TaxIDTypeUAVAT TaxIDType = "ua_vat" + TaxIDTypeUgTin TaxIDType = "ug_tin" TaxIDTypeUnknown TaxIDType = "unknown" TaxIDTypeUSEIN TaxIDType = "us_ein" TaxIDTypeUYRUC TaxIDType = "uy_ruc" @@ -106,6 +122,8 @@ const ( TaxIDTypeVERIF TaxIDType = "ve_rif" TaxIDTypeVNTIN TaxIDType = "vn_tin" TaxIDTypeZAVAT TaxIDType = "za_vat" + TaxIDTypeZmTin TaxIDType = "zm_tin" + TaxIDTypeZwTin TaxIDType = "zw_tin" ) // Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. @@ -125,7 +143,7 @@ type TaxIDParams struct { Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -192,7 +210,7 @@ type TaxID struct { Object string `json:"object"` // The account or customer the tax ID belongs to. Owner *TaxIDOwner `json:"owner"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` Type TaxIDType `json:"type"` // Value of the tax ID. Value string `json:"value"` diff --git a/terminal_location.go b/terminal_location.go index 1b8cecd221..ce572430dd 100644 --- a/terminal_location.go +++ b/terminal_location.go @@ -11,7 +11,7 @@ import "encoding/json" // Deletes a Location object. type TerminalLocationParams struct { Params `form:"*"` - // The full address of the location. If you're updating the `address` field, avoid changing the `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + // The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. Address *AddressParams `form:"address"` // The ID of a configuration that will be used to customize all readers in this location. ConfigurationOverrides *string `form:"configuration_overrides"` diff --git a/treasury_financialaccountfeatures.go b/treasury_financialaccountfeatures.go index b35cacc694..80947d9b44 100644 --- a/treasury_financialaccountfeatures.go +++ b/treasury_financialaccountfeatures.go @@ -487,7 +487,7 @@ type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail struct { Restriction TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction `json:"restriction"` } -// Toggle settings for enabling/disabling an ACH specific feature +// Toggle settings for enabling/disabling an inbound ACH specific feature type TreasuryFinancialAccountFeaturesInboundTransfersACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` @@ -499,7 +499,7 @@ type TreasuryFinancialAccountFeaturesInboundTransfersACH struct { // InboundTransfers contains inbound transfers features for a FinancialAccount. type TreasuryFinancialAccountFeaturesInboundTransfers struct { - // Toggle settings for enabling/disabling an ACH specific feature + // Toggle settings for enabling/disabling an inbound ACH specific feature ACH *TreasuryFinancialAccountFeaturesInboundTransfersACH `json:"ach"` } @@ -533,7 +533,7 @@ type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail struct { Restriction TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction `json:"restriction"` } -// Toggle settings for enabling/disabling an ACH specific feature +// Toggle settings for enabling/disabling an outbound ACH specific feature type TreasuryFinancialAccountFeaturesOutboundPaymentsACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` @@ -565,7 +565,7 @@ type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire struct { // Settings related to Outbound Payments features on a Financial Account type TreasuryFinancialAccountFeaturesOutboundPayments struct { - // Toggle settings for enabling/disabling an ACH specific feature + // Toggle settings for enabling/disabling an outbound ACH specific feature ACH *TreasuryFinancialAccountFeaturesOutboundPaymentsACH `json:"ach"` // Toggle settings for enabling/disabling a feature USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire `json:"us_domestic_wire"` @@ -581,7 +581,7 @@ type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail struct { Restriction TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction `json:"restriction"` } -// Toggle settings for enabling/disabling an ACH specific feature +// Toggle settings for enabling/disabling an outbound ACH specific feature type TreasuryFinancialAccountFeaturesOutboundTransfersACH struct { // Whether the FinancialAccount should have the Feature. Requested bool `json:"requested"` @@ -613,7 +613,7 @@ type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire struct { // OutboundTransfers contains outbound transfers features for a FinancialAccount. type TreasuryFinancialAccountFeaturesOutboundTransfers struct { - // Toggle settings for enabling/disabling an ACH specific feature + // Toggle settings for enabling/disabling an outbound ACH specific feature ACH *TreasuryFinancialAccountFeaturesOutboundTransfersACH `json:"ach"` // Toggle settings for enabling/disabling a feature USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire `json:"us_domestic_wire"` From 8580d89ca72693b1064eac47100e97cc6fbf6748 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:27:18 +0000 Subject: [PATCH 2/4] Update generated code for v1402 --- OPENAPI_VERSION | 2 +- charge.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9fc97dcb22..98d845ab65 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1399 \ No newline at end of file +v1402 \ No newline at end of file diff --git a/charge.go b/charge.go index 8bdb4e1399..d722c50283 100644 --- a/charge.go +++ b/charge.go @@ -926,7 +926,9 @@ type ChargePaymentMethodDetailsCard struct { Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` - Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + NetworkTransactionID string `json:"network_transaction_id"` + Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` // Status of a card based on the card issuer. RegulatedStatus ChargePaymentMethodDetailsCardRegulatedStatus `json:"regulated_status"` // Populated if this transaction used 3D Secure authentication. From 6e1ce3d403b2375d558cb8ef26cb606f57dd3080 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:27:04 +0000 Subject: [PATCH 3/4] Update generated code for v1409 --- OPENAPI_VERSION | 2 +- accountsession.go | 20 ++++++++++---------- api_version.go | 2 +- card.go | 11 ----------- charge.go | 15 +-------------- confirmationtoken.go | 11 ----------- dispute.go | 27 --------------------------- paymentmethod.go | 11 ----------- 8 files changed, 13 insertions(+), 86 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 98d845ab65..85b34541d5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1402 \ No newline at end of file +v1409 \ No newline at end of file diff --git a/accountsession.go b/accountsession.go index 9ec8399155..a5807ece96 100644 --- a/accountsession.go +++ b/accountsession.go @@ -8,7 +8,7 @@ package stripe // The list of features enabled in the embedded component. type AccountSessionComponentsAccountManagementFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -24,7 +24,7 @@ type AccountSessionComponentsAccountManagementParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsAccountOnboardingFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -40,7 +40,7 @@ type AccountSessionComponentsAccountOnboardingParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsBalancesFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -73,7 +73,7 @@ type AccountSessionComponentsDocumentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsNotificationBannerFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -129,7 +129,7 @@ type AccountSessionComponentsPaymentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsPayoutsFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -225,7 +225,7 @@ func (p *AccountSessionParams) AddExpand(f string) { } type AccountSessionComponentsAccountManagementFeatures struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -236,7 +236,7 @@ type AccountSessionComponentsAccountManagement struct { Features *AccountSessionComponentsAccountManagementFeatures `json:"features"` } type AccountSessionComponentsAccountOnboardingFeatures struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -247,7 +247,7 @@ type AccountSessionComponentsAccountOnboarding struct { Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"` } type AccountSessionComponentsBalancesFeatures struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` @@ -270,7 +270,7 @@ type AccountSessionComponentsDocuments struct { Features *AccountSessionComponentsDocumentsFeatures `json:"features"` } type AccountSessionComponentsNotificationBannerFeatures struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -311,7 +311,7 @@ type AccountSessionComponentsPayments struct { Features *AccountSessionComponentsPaymentsFeatures `json:"features"` } type AccountSessionComponentsPayoutsFeatures struct { - // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` diff --git a/api_version.go b/api_version.go index 1906349c36..3eefda0919 100644 --- a/api_version.go +++ b/api_version.go @@ -7,5 +7,5 @@ package stripe const ( - apiVersion string = "2024-12-18.acacia" + apiVersion string = "2024-11-20.acacia" ) diff --git a/card.go b/card.go index 3673dbdf8e..c10835b4c3 100644 --- a/card.go +++ b/card.go @@ -80,15 +80,6 @@ const ( CardFundingUnknown CardFunding = "unknown" ) -// Status of a card based on the card issuer. -type CardRegulatedStatus string - -// List of values that CardRegulatedStatus can take -const ( - CardRegulatedStatusRegulated CardRegulatedStatus = "regulated" - CardRegulatedStatusUnregulated CardRegulatedStatus = "unregulated" -) - // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. type CardTokenizationMethod string @@ -378,8 +369,6 @@ type Card struct { Networks *CardNetworks `json:"networks"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // Status of a card based on the card issuer. - RegulatedStatus CardRegulatedStatus `json:"regulated_status"` // For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. Status string `json:"status"` // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. diff --git a/charge.go b/charge.go index d722c50283..b702d2c542 100644 --- a/charge.go +++ b/charge.go @@ -119,15 +119,6 @@ const ( ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable" ) -// Status of a card based on the card issuer. -type ChargePaymentMethodDetailsCardRegulatedStatus string - -// List of values that ChargePaymentMethodDetailsCardRegulatedStatus can take -const ( - ChargePaymentMethodDetailsCardRegulatedStatusRegulated ChargePaymentMethodDetailsCardRegulatedStatus = "regulated" - ChargePaymentMethodDetailsCardRegulatedStatusUnregulated ChargePaymentMethodDetailsCardRegulatedStatus = "unregulated" -) - // For authenticated transactions: how the customer was authenticated by // the issuing bank. type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string @@ -926,11 +917,7 @@ type ChargePaymentMethodDetailsCard struct { Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` - // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. - NetworkTransactionID string `json:"network_transaction_id"` - Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` - // Status of a card based on the card issuer. - RegulatedStatus ChargePaymentMethodDetailsCardRegulatedStatus `json:"regulated_status"` + Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` // Populated if this transaction used 3D Secure authentication. ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/confirmationtoken.go b/confirmationtoken.go index aa35e36311..6de95d0fbc 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -58,15 +58,6 @@ const ( ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeUnknown ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "unknown" ) -// Status of a card based on the card issuer. -type ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus string - -// List of values that ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus can take -const ( - ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusRegulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "regulated" - ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusUnregulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "unregulated" -) - // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type ConfirmationTokenPaymentMethodPreviewCardWalletType string @@ -730,8 +721,6 @@ type ConfirmationTokenPaymentMethodPreviewCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *ConfirmationTokenPaymentMethodPreviewCardNetworks `json:"networks"` - // Status of a card based on the card issuer. - RegulatedStatus ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/dispute.go b/dispute.go index be63b8dbc1..6a8701d706 100644 --- a/dispute.go +++ b/dispute.go @@ -47,15 +47,6 @@ const ( DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusRequiresAction DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "requires_action" ) -// Visa Compelling Evidence 3.0 eligibility status. -type DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus string - -// List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus can take -const ( - DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusFeeAcknowledged DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "fee_acknowledged" - DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusRequiresFeeAcknowledgement DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "requires_fee_acknowledgement" -) - // The AmazonPay dispute type, chargeback or claim type DisputePaymentMethodDetailsAmazonPayDisputeType string @@ -215,18 +206,10 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params struct { PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams `form:"prior_undisputed_transactions"` } -// Evidence provided for Visa Compliance evidence submission. -type DisputeEvidenceEnhancedEvidenceVisaComplianceParams struct { - // A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. - FeeAcknowledged *bool `form:"fee_acknowledged"` -} - // Additional evidence for qualifying evidence programs. type DisputeEvidenceEnhancedEvidenceParams struct { // Evidence provided for Visa Compelling Evidence 3.0 evidence submission. VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params `form:"visa_compelling_evidence_3"` - // Evidence provided for Visa Compliance evidence submission. - VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaComplianceParams `form:"visa_compliance"` } // Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. @@ -334,13 +317,8 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 struct { // List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction `json:"prior_undisputed_transactions"` } -type DisputeEvidenceEnhancedEvidenceVisaCompliance struct { - // A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. - FeeAcknowledged bool `json:"fee_acknowledged"` -} type DisputeEvidenceEnhancedEvidence struct { VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` - VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaCompliance `json:"visa_compliance"` } type DisputeEvidence struct { // Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -405,13 +383,8 @@ type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 struct { // Visa Compelling Evidence 3.0 eligibility status. Status DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status `json:"status"` } -type DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance struct { - // Visa Compelling Evidence 3.0 eligibility status. - Status DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus `json:"status"` -} type DisputeEvidenceDetailsEnhancedEligibility struct { VisaCompellingEvidence3 *DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` - VisaCompliance *DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance `json:"visa_compliance"` } type DisputeEvidenceDetails struct { // Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. diff --git a/paymentmethod.go b/paymentmethod.go index a549e674d3..62385c72ec 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -142,15 +142,6 @@ const ( PaymentMethodCardNetworksPreferredUnknown PaymentMethodCardNetworksPreferred = "unknown" ) -// Status of a card based on the card issuer. -type PaymentMethodCardRegulatedStatus string - -// List of values that PaymentMethodCardRegulatedStatus can take -const ( - PaymentMethodCardRegulatedStatusRegulated PaymentMethodCardRegulatedStatus = "regulated" - PaymentMethodCardRegulatedStatusUnregulated PaymentMethodCardRegulatedStatus = "unregulated" -) - // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type PaymentMethodCardWalletType string @@ -1024,8 +1015,6 @@ type PaymentMethodCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodCardNetworks `json:"networks"` - // Status of a card based on the card issuer. - RegulatedStatus PaymentMethodCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. From c1346ecec2f9ed6a2b2356722745b5f20448f8eb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 00:08:53 +0000 Subject: [PATCH 4/4] Update generated code for v1412 --- OPENAPI_VERSION | 2 +- account.go | 4 +- accountsession.go | 20 +- api_version.go | 2 +- capability.go | 4 +- card.go | 23 +++ charge.go | 15 +- checkout_session.go | 5 +- confirmationtoken.go | 11 ++ customer.go | 2 +- dispute.go | 27 +++ invoice.go | 8 +- paymentmethod.go | 11 ++ person.go | 4 +- source.go | 12 ++ tax_calculation.go | 7 +- tax_registration.go | 441 +++++++++++++++++++++++++++++++++++++++++++ tax_transaction.go | 5 +- taxid.go | 7 +- 19 files changed, 576 insertions(+), 34 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 85b34541d5..bf0daa66a7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1409 \ No newline at end of file +v1412 \ No newline at end of file diff --git a/account.go b/account.go index 92e368885c..7bbe506f6e 100644 --- a/account.go +++ b/account.go @@ -1475,7 +1475,7 @@ type AccountFutureRequirements struct { DisabledReason AccountFutureRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountFutureRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` @@ -1517,7 +1517,7 @@ type AccountRequirements struct { DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. PastDue []string `json:"past_due"` diff --git a/accountsession.go b/accountsession.go index a5807ece96..9ec8399155 100644 --- a/accountsession.go +++ b/accountsession.go @@ -8,7 +8,7 @@ package stripe // The list of features enabled in the embedded component. type AccountSessionComponentsAccountManagementFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -24,7 +24,7 @@ type AccountSessionComponentsAccountManagementParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsAccountOnboardingFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -40,7 +40,7 @@ type AccountSessionComponentsAccountOnboardingParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsBalancesFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -73,7 +73,7 @@ type AccountSessionComponentsDocumentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsNotificationBannerFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -129,7 +129,7 @@ type AccountSessionComponentsPaymentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsPayoutsFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -225,7 +225,7 @@ func (p *AccountSessionParams) AddExpand(f string) { } type AccountSessionComponentsAccountManagementFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -236,7 +236,7 @@ type AccountSessionComponentsAccountManagement struct { Features *AccountSessionComponentsAccountManagementFeatures `json:"features"` } type AccountSessionComponentsAccountOnboardingFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -247,7 +247,7 @@ type AccountSessionComponentsAccountOnboarding struct { Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"` } type AccountSessionComponentsBalancesFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` @@ -270,7 +270,7 @@ type AccountSessionComponentsDocuments struct { Features *AccountSessionComponentsDocumentsFeatures `json:"features"` } type AccountSessionComponentsNotificationBannerFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -311,7 +311,7 @@ type AccountSessionComponentsPayments struct { Features *AccountSessionComponentsPaymentsFeatures `json:"features"` } type AccountSessionComponentsPayoutsFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` diff --git a/api_version.go b/api_version.go index 3eefda0919..1906349c36 100644 --- a/api_version.go +++ b/api_version.go @@ -7,5 +7,5 @@ package stripe const ( - apiVersion string = "2024-11-20.acacia" + apiVersion string = "2024-12-18.acacia" ) diff --git a/capability.go b/capability.go index d8a9f8d77f..f0bdbc5a0f 100644 --- a/capability.go +++ b/capability.go @@ -110,7 +110,7 @@ type CapabilityFutureRequirements struct { DisabledReason CapabilityFutureRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*CapabilityFutureRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` @@ -136,7 +136,7 @@ type CapabilityRequirements struct { DisabledReason CapabilityDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. PastDue []string `json:"past_due"` diff --git a/card.go b/card.go index c10835b4c3..a368bce7f7 100644 --- a/card.go +++ b/card.go @@ -34,6 +34,16 @@ const ( CardAddressZipCheckUnchecked CardAddressZipCheck = "unchecked" ) +// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. +type CardAllowRedisplay string + +// List of values that CardAllowRedisplay can take +const ( + CardAllowRedisplayAlways CardAllowRedisplay = "always" + CardAllowRedisplayLimited CardAllowRedisplay = "limited" + CardAllowRedisplayUnspecified CardAllowRedisplay = "unspecified" +) + // A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. type CardAvailablePayoutMethod string @@ -80,6 +90,15 @@ const ( CardFundingUnknown CardFunding = "unknown" ) +// Status of a card based on the card issuer. +type CardRegulatedStatus string + +// List of values that CardRegulatedStatus can take +const ( + CardRegulatedStatusRegulated CardRegulatedStatus = "regulated" + CardRegulatedStatusUnregulated CardRegulatedStatus = "unregulated" +) + // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. type CardTokenizationMethod string @@ -313,6 +332,8 @@ type Card struct { AddressZip string `json:"address_zip"` // If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. AddressZipCheck CardAddressZipCheck `json:"address_zip_check"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + AllowRedisplay CardAllowRedisplay `json:"allow_redisplay"` // A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"` // Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. @@ -369,6 +390,8 @@ type Card struct { Networks *CardNetworks `json:"networks"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` + // Status of a card based on the card issuer. + RegulatedStatus CardRegulatedStatus `json:"regulated_status"` // For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. Status string `json:"status"` // If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. diff --git a/charge.go b/charge.go index b702d2c542..d722c50283 100644 --- a/charge.go +++ b/charge.go @@ -119,6 +119,15 @@ const ( ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable" ) +// Status of a card based on the card issuer. +type ChargePaymentMethodDetailsCardRegulatedStatus string + +// List of values that ChargePaymentMethodDetailsCardRegulatedStatus can take +const ( + ChargePaymentMethodDetailsCardRegulatedStatusRegulated ChargePaymentMethodDetailsCardRegulatedStatus = "regulated" + ChargePaymentMethodDetailsCardRegulatedStatusUnregulated ChargePaymentMethodDetailsCardRegulatedStatus = "unregulated" +) + // For authenticated transactions: how the customer was authenticated by // the issuing bank. type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string @@ -917,7 +926,11 @@ type ChargePaymentMethodDetailsCard struct { Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` - Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + NetworkTransactionID string `json:"network_transaction_id"` + Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + // Status of a card based on the card issuer. + RegulatedStatus ChargePaymentMethodDetailsCardRegulatedStatus `json:"regulated_status"` // Populated if this transaction used 3D Secure authentication. ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/checkout_session.go b/checkout_session.go index daf59a14a7..5fb4d5e308 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -120,13 +120,14 @@ const ( CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take const ( CheckoutSessionCustomerDetailsTaxIDTypeADNRT CheckoutSessionCustomerDetailsTaxIDType = "ad_nrt" CheckoutSessionCustomerDetailsTaxIDTypeAETRN CheckoutSessionCustomerDetailsTaxIDType = "ae_trn" + CheckoutSessionCustomerDetailsTaxIDTypeAlTin CheckoutSessionCustomerDetailsTaxIDType = "al_tin" CheckoutSessionCustomerDetailsTaxIDTypeAmTin CheckoutSessionCustomerDetailsTaxIDType = "am_tin" CheckoutSessionCustomerDetailsTaxIDTypeAoTin CheckoutSessionCustomerDetailsTaxIDType = "ao_tin" CheckoutSessionCustomerDetailsTaxIDTypeARCUIT CheckoutSessionCustomerDetailsTaxIDType = "ar_cuit" @@ -2690,7 +2691,7 @@ type CheckoutSessionCustomText struct { // The customer's tax IDs after a completed Checkout Session. type CheckoutSessionCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/confirmationtoken.go b/confirmationtoken.go index 6de95d0fbc..aa35e36311 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -58,6 +58,15 @@ const ( ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeUnknown ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "unknown" ) +// Status of a card based on the card issuer. +type ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus string + +// List of values that ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus can take +const ( + ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusRegulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "regulated" + ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusUnregulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "unregulated" +) + // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type ConfirmationTokenPaymentMethodPreviewCardWalletType string @@ -721,6 +730,8 @@ type ConfirmationTokenPaymentMethodPreviewCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *ConfirmationTokenPaymentMethodPreviewCardNetworks `json:"networks"` + // Status of a card based on the card issuer. + RegulatedStatus ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/customer.go b/customer.go index a56f6e2a5c..b43bdf5847 100644 --- a/customer.go +++ b/customer.go @@ -194,7 +194,7 @@ func (p *CustomerListParams) AddExpand(f string) { // The customer's tax IDs. type CustomerTaxIDDataParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` diff --git a/dispute.go b/dispute.go index 6a8701d706..2dd2a78b49 100644 --- a/dispute.go +++ b/dispute.go @@ -47,6 +47,15 @@ const ( DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusRequiresAction DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "requires_action" ) +// Visa compliance eligibility status. +type DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus string + +// List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus can take +const ( + DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusFeeAcknowledged DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "fee_acknowledged" + DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusRequiresFeeAcknowledgement DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "requires_fee_acknowledgement" +) + // The AmazonPay dispute type, chargeback or claim type DisputePaymentMethodDetailsAmazonPayDisputeType string @@ -206,10 +215,18 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params struct { PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams `form:"prior_undisputed_transactions"` } +// Evidence provided for Visa compliance evidence submission. +type DisputeEvidenceEnhancedEvidenceVisaComplianceParams struct { + // A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + FeeAcknowledged *bool `form:"fee_acknowledged"` +} + // Additional evidence for qualifying evidence programs. type DisputeEvidenceEnhancedEvidenceParams struct { // Evidence provided for Visa Compelling Evidence 3.0 evidence submission. VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params `form:"visa_compelling_evidence_3"` + // Evidence provided for Visa compliance evidence submission. + VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaComplianceParams `form:"visa_compliance"` } // Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. @@ -317,8 +334,13 @@ type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 struct { // List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction `json:"prior_undisputed_transactions"` } +type DisputeEvidenceEnhancedEvidenceVisaCompliance struct { + // A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + FeeAcknowledged bool `json:"fee_acknowledged"` +} type DisputeEvidenceEnhancedEvidence struct { VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` + VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaCompliance `json:"visa_compliance"` } type DisputeEvidence struct { // Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. @@ -383,8 +405,13 @@ type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 struct { // Visa Compelling Evidence 3.0 eligibility status. Status DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status `json:"status"` } +type DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance struct { + // Visa compliance eligibility status. + Status DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus `json:"status"` +} type DisputeEvidenceDetailsEnhancedEligibility struct { VisaCompellingEvidence3 *DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"` + VisaCompliance *DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance `json:"visa_compliance"` } type DisputeEvidenceDetails struct { // Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. diff --git a/invoice.go b/invoice.go index 0a0b258853..ececb1d833 100644 --- a/invoice.go +++ b/invoice.go @@ -720,7 +720,7 @@ type InvoiceUpcomingCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1290,7 +1290,7 @@ type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2355,7 +2355,7 @@ type InvoiceCreatePreviewCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceCreatePreviewCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2926,7 +2926,7 @@ type InvoiceCustomField struct { // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. type InvoiceCustomerTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/paymentmethod.go b/paymentmethod.go index 62385c72ec..a549e674d3 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -142,6 +142,15 @@ const ( PaymentMethodCardNetworksPreferredUnknown PaymentMethodCardNetworksPreferred = "unknown" ) +// Status of a card based on the card issuer. +type PaymentMethodCardRegulatedStatus string + +// List of values that PaymentMethodCardRegulatedStatus can take +const ( + PaymentMethodCardRegulatedStatusRegulated PaymentMethodCardRegulatedStatus = "regulated" + PaymentMethodCardRegulatedStatusUnregulated PaymentMethodCardRegulatedStatus = "unregulated" +) + // The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. type PaymentMethodCardWalletType string @@ -1015,6 +1024,8 @@ type PaymentMethodCard struct { Last4 string `json:"last4"` // Contains information about card networks that can be used to process the payment. Networks *PaymentMethodCardNetworks `json:"networks"` + // Status of a card based on the card issuer. + RegulatedStatus PaymentMethodCardRegulatedStatus `json:"regulated_status"` // Contains details on how this Card may be used for 3D Secure authentication. ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/person.go b/person.go index b54922487d..0bde2384a4 100644 --- a/person.go +++ b/person.go @@ -385,7 +385,7 @@ type PersonFutureRequirements struct { CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*PersonFutureRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` @@ -427,7 +427,7 @@ type PersonRequirements struct { CurrentlyDue []string `json:"currently_due"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` - // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + // Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. PastDue []string `json:"past_due"` diff --git a/source.go b/source.go index 6229f6ae5e..61b589539c 100644 --- a/source.go +++ b/source.go @@ -6,6 +6,16 @@ package stripe +// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. +type SourceAllowRedisplay string + +// List of values that SourceAllowRedisplay can take +const ( + SourceAllowRedisplayAlways SourceAllowRedisplay = "always" + SourceAllowRedisplayLimited SourceAllowRedisplay = "limited" + SourceAllowRedisplayUnspecified SourceAllowRedisplay = "unspecified" +) + // The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). type SourceCodeVerificationStatus string @@ -562,6 +572,8 @@ type Source struct { ACHDebit *SourceACHDebit `json:"ach_debit"` ACSSDebit *SourceACSSDebit `json:"acss_debit"` Alipay *SourceAlipay `json:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + AllowRedisplay SourceAllowRedisplay `json:"allow_redisplay"` // A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Amount int64 `json:"amount"` AUBECSDebit *SourceAUBECSDebit `json:"au_becs_debit"` diff --git a/tax_calculation.go b/tax_calculation.go index e8e9f7d89d..350ad69b53 100644 --- a/tax_calculation.go +++ b/tax_calculation.go @@ -15,13 +15,14 @@ const ( TaxCalculationCustomerDetailsAddressSourceShipping TaxCalculationCustomerDetailsAddressSource = "shipping" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take const ( TaxCalculationCustomerDetailsTaxIDTypeADNRT TaxCalculationCustomerDetailsTaxIDType = "ad_nrt" TaxCalculationCustomerDetailsTaxIDTypeAETRN TaxCalculationCustomerDetailsTaxIDType = "ae_trn" + TaxCalculationCustomerDetailsTaxIDTypeAlTin TaxCalculationCustomerDetailsTaxIDType = "al_tin" TaxCalculationCustomerDetailsTaxIDTypeAmTin TaxCalculationCustomerDetailsTaxIDType = "am_tin" TaxCalculationCustomerDetailsTaxIDTypeAoTin TaxCalculationCustomerDetailsTaxIDType = "ao_tin" TaxCalculationCustomerDetailsTaxIDTypeARCUIT TaxCalculationCustomerDetailsTaxIDType = "ar_cuit" @@ -298,7 +299,7 @@ func (p *TaxCalculationListLineItemsParams) AddExpand(f string) { // The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. type TaxCalculationCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -355,7 +356,7 @@ type TaxCalculationShippingCostParams struct { // The customer's tax IDs (for example, EU VAT numbers). type TaxCalculationCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/tax_registration.go b/tax_registration.go index da45eaa239..85ccea3b36 100644 --- a/tax_registration.go +++ b/tax_registration.go @@ -16,6 +16,30 @@ const ( TaxRegistrationCountryOptionsAeTypeStandard TaxRegistrationCountryOptionsAeType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsAlType string + +// List of values that TaxRegistrationCountryOptionsAlType can take +const ( + TaxRegistrationCountryOptionsAlTypeStandard TaxRegistrationCountryOptionsAlType = "standard" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsAmType string + +// List of values that TaxRegistrationCountryOptionsAmType can take +const ( + TaxRegistrationCountryOptionsAmTypeSimplified TaxRegistrationCountryOptionsAmType = "simplified" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsAoType string + +// List of values that TaxRegistrationCountryOptionsAoType can take +const ( + TaxRegistrationCountryOptionsAoTypeStandard TaxRegistrationCountryOptionsAoType = "standard" +) + // Place of supply scheme used in an EU standard registration. type TaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme string @@ -44,6 +68,22 @@ const ( TaxRegistrationCountryOptionsAuTypeStandard TaxRegistrationCountryOptionsAuType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsBaType string + +// List of values that TaxRegistrationCountryOptionsBaType can take +const ( + TaxRegistrationCountryOptionsBaTypeStandard TaxRegistrationCountryOptionsBaType = "standard" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsBbType string + +// List of values that TaxRegistrationCountryOptionsBbType can take +const ( + TaxRegistrationCountryOptionsBbTypeStandard TaxRegistrationCountryOptionsBbType = "standard" +) + // Place of supply scheme used in an EU standard registration. type TaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme string @@ -92,6 +132,14 @@ const ( TaxRegistrationCountryOptionsBhTypeStandard TaxRegistrationCountryOptionsBhType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsBsType string + +// List of values that TaxRegistrationCountryOptionsBsType can take +const ( + TaxRegistrationCountryOptionsBsTypeStandard TaxRegistrationCountryOptionsBsType = "standard" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsByType string @@ -110,6 +158,14 @@ const ( TaxRegistrationCountryOptionsCaTypeStandard TaxRegistrationCountryOptionsCaType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsCdType string + +// List of values that TaxRegistrationCountryOptionsCdType can take +const ( + TaxRegistrationCountryOptionsCdTypeStandard TaxRegistrationCountryOptionsCdType = "standard" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsChType string @@ -334,6 +390,14 @@ const ( TaxRegistrationCountryOptionsGeTypeSimplified TaxRegistrationCountryOptionsGeType = "simplified" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsGnType string + +// List of values that TaxRegistrationCountryOptionsGnType can take +const ( + TaxRegistrationCountryOptionsGnTypeStandard TaxRegistrationCountryOptionsGnType = "standard" +) + // Place of supply scheme used in an EU standard registration. type TaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme string @@ -466,6 +530,14 @@ const ( TaxRegistrationCountryOptionsKeTypeSimplified TaxRegistrationCountryOptionsKeType = "simplified" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsKhType string + +// List of values that TaxRegistrationCountryOptionsKhType can take +const ( + TaxRegistrationCountryOptionsKhTypeSimplified TaxRegistrationCountryOptionsKhType = "simplified" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsKrType string @@ -558,6 +630,30 @@ const ( TaxRegistrationCountryOptionsMdTypeSimplified TaxRegistrationCountryOptionsMdType = "simplified" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsMeType string + +// List of values that TaxRegistrationCountryOptionsMeType can take +const ( + TaxRegistrationCountryOptionsMeTypeStandard TaxRegistrationCountryOptionsMeType = "standard" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsMkType string + +// List of values that TaxRegistrationCountryOptionsMkType can take +const ( + TaxRegistrationCountryOptionsMkTypeStandard TaxRegistrationCountryOptionsMkType = "standard" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsMrType string + +// List of values that TaxRegistrationCountryOptionsMrType can take +const ( + TaxRegistrationCountryOptionsMrTypeStandard TaxRegistrationCountryOptionsMrType = "standard" +) + // Place of supply scheme used in an EU standard registration. type TaxRegistrationCountryOptionsMTStandardPlaceOfSupplyScheme string @@ -630,6 +726,14 @@ const ( TaxRegistrationCountryOptionsNoTypeStandard TaxRegistrationCountryOptionsNoType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsNpType string + +// List of values that TaxRegistrationCountryOptionsNpType can take +const ( + TaxRegistrationCountryOptionsNpTypeSimplified TaxRegistrationCountryOptionsNpType = "simplified" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsNzType string @@ -646,6 +750,14 @@ const ( TaxRegistrationCountryOptionsOmTypeStandard TaxRegistrationCountryOptionsOmType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsPeType string + +// List of values that TaxRegistrationCountryOptionsPeType can take +const ( + TaxRegistrationCountryOptionsPeTypeSimplified TaxRegistrationCountryOptionsPeType = "simplified" +) + // Place of supply scheme used in an EU standard registration. type TaxRegistrationCountryOptionsPLStandardPlaceOfSupplyScheme string @@ -798,6 +910,22 @@ const ( TaxRegistrationCountryOptionsSKTypeStandard TaxRegistrationCountryOptionsSKType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsSnType string + +// List of values that TaxRegistrationCountryOptionsSnType can take +const ( + TaxRegistrationCountryOptionsSnTypeSimplified TaxRegistrationCountryOptionsSnType = "simplified" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsSrType string + +// List of values that TaxRegistrationCountryOptionsSrType can take +const ( + TaxRegistrationCountryOptionsSrTypeStandard TaxRegistrationCountryOptionsSrType = "standard" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsTHType string @@ -806,6 +934,14 @@ const ( TaxRegistrationCountryOptionsTHTypeSimplified TaxRegistrationCountryOptionsTHType = "simplified" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsTjType string + +// List of values that TaxRegistrationCountryOptionsTjType can take +const ( + TaxRegistrationCountryOptionsTjTypeSimplified TaxRegistrationCountryOptionsTjType = "simplified" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsTRType string @@ -822,6 +958,14 @@ const ( TaxRegistrationCountryOptionsTzTypeSimplified TaxRegistrationCountryOptionsTzType = "simplified" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsUgType string + +// List of values that TaxRegistrationCountryOptionsUgType can take +const ( + TaxRegistrationCountryOptionsUgTypeSimplified TaxRegistrationCountryOptionsUgType = "simplified" +) + // The type of the election for the state sales tax registration. type TaxRegistrationCountryOptionsUSStateSalesTaxElectionType string @@ -844,6 +988,14 @@ const ( TaxRegistrationCountryOptionsUSTypeStateSalesTax TaxRegistrationCountryOptionsUSType = "state_sales_tax" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsUyType string + +// List of values that TaxRegistrationCountryOptionsUyType can take +const ( + TaxRegistrationCountryOptionsUyTypeStandard TaxRegistrationCountryOptionsUyType = "standard" +) + // Type of registration in `country`. type TaxRegistrationCountryOptionsUzType string @@ -868,6 +1020,22 @@ const ( TaxRegistrationCountryOptionsZaTypeStandard TaxRegistrationCountryOptionsZaType = "standard" ) +// Type of registration in `country`. +type TaxRegistrationCountryOptionsZmType string + +// List of values that TaxRegistrationCountryOptionsZmType can take +const ( + TaxRegistrationCountryOptionsZmTypeSimplified TaxRegistrationCountryOptionsZmType = "simplified" +) + +// Type of registration in `country`. +type TaxRegistrationCountryOptionsZwType string + +// List of values that TaxRegistrationCountryOptionsZwType can take +const ( + TaxRegistrationCountryOptionsZwTypeStandard TaxRegistrationCountryOptionsZwType = "standard" +) + // The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. type TaxRegistrationStatus string @@ -898,6 +1066,24 @@ type TaxRegistrationCountryOptionsAeParams struct { Type *string `form:"type"` } +// Options for the registration in AL. +type TaxRegistrationCountryOptionsAlParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in AM. +type TaxRegistrationCountryOptionsAmParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in AO. +type TaxRegistrationCountryOptionsAoParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the standard registration. type TaxRegistrationCountryOptionsAtStandardParams struct { // Place of supply scheme used in an EU standard registration. @@ -918,6 +1104,18 @@ type TaxRegistrationCountryOptionsAuParams struct { Type *string `form:"type"` } +// Options for the registration in BA. +type TaxRegistrationCountryOptionsBaParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in BB. +type TaxRegistrationCountryOptionsBbParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the standard registration. type TaxRegistrationCountryOptionsBeStandardParams struct { // Place of supply scheme used in an EU standard registration. @@ -952,6 +1150,12 @@ type TaxRegistrationCountryOptionsBhParams struct { Type *string `form:"type"` } +// Options for the registration in BS. +type TaxRegistrationCountryOptionsBsParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in BY. type TaxRegistrationCountryOptionsByParams struct { // Type of registration to be created in `country`. @@ -972,6 +1176,12 @@ type TaxRegistrationCountryOptionsCaParams struct { Type *string `form:"type"` } +// Options for the registration in CD. +type TaxRegistrationCountryOptionsCdParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in CH. type TaxRegistrationCountryOptionsChParams struct { // Type of registration to be created in `country`. @@ -1132,6 +1342,12 @@ type TaxRegistrationCountryOptionsGeParams struct { Type *string `form:"type"` } +// Options for the registration in GN. +type TaxRegistrationCountryOptionsGnParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the standard registration. type TaxRegistrationCountryOptionsGrStandardParams struct { // Place of supply scheme used in an EU standard registration. @@ -1226,6 +1442,12 @@ type TaxRegistrationCountryOptionsKeParams struct { Type *string `form:"type"` } +// Options for the registration in KH. +type TaxRegistrationCountryOptionsKhParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in KR. type TaxRegistrationCountryOptionsKrParams struct { // Type of registration to be created in `country`. @@ -1292,6 +1514,24 @@ type TaxRegistrationCountryOptionsMdParams struct { Type *string `form:"type"` } +// Options for the registration in ME. +type TaxRegistrationCountryOptionsMeParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in MK. +type TaxRegistrationCountryOptionsMkParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in MR. +type TaxRegistrationCountryOptionsMrParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the standard registration. type TaxRegistrationCountryOptionsMTStandardParams struct { // Place of supply scheme used in an EU standard registration. @@ -1344,6 +1584,12 @@ type TaxRegistrationCountryOptionsNoParams struct { Type *string `form:"type"` } +// Options for the registration in NP. +type TaxRegistrationCountryOptionsNpParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in NZ. type TaxRegistrationCountryOptionsNzParams struct { // Type of registration to be created in `country`. @@ -1356,6 +1602,12 @@ type TaxRegistrationCountryOptionsOmParams struct { Type *string `form:"type"` } +// Options for the registration in PE. +type TaxRegistrationCountryOptionsPeParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the standard registration. type TaxRegistrationCountryOptionsPLStandardParams struct { // Place of supply scheme used in an EU standard registration. @@ -1464,12 +1716,30 @@ type TaxRegistrationCountryOptionsSKParams struct { Type *string `form:"type"` } +// Options for the registration in SN. +type TaxRegistrationCountryOptionsSnParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in SR. +type TaxRegistrationCountryOptionsSrParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in TH. type TaxRegistrationCountryOptionsTHParams struct { // Type of registration to be created in `country`. Type *string `form:"type"` } +// Options for the registration in TJ. +type TaxRegistrationCountryOptionsTjParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in TR. type TaxRegistrationCountryOptionsTRParams struct { // Type of registration to be created in `country`. @@ -1482,6 +1752,12 @@ type TaxRegistrationCountryOptionsTzParams struct { Type *string `form:"type"` } +// Options for the registration in UG. +type TaxRegistrationCountryOptionsUgParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the local amusement tax registration. type TaxRegistrationCountryOptionsUSLocalAmusementTaxParams struct { // A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). @@ -1522,6 +1798,12 @@ type TaxRegistrationCountryOptionsUSParams struct { Type *string `form:"type"` } +// Options for the registration in UY. +type TaxRegistrationCountryOptionsUyParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Options for the registration in UZ. type TaxRegistrationCountryOptionsUzParams struct { // Type of registration to be created in `country`. @@ -1540,24 +1822,50 @@ type TaxRegistrationCountryOptionsZaParams struct { Type *string `form:"type"` } +// Options for the registration in ZM. +type TaxRegistrationCountryOptionsZmParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + +// Options for the registration in ZW. +type TaxRegistrationCountryOptionsZwParams struct { + // Type of registration to be created in `country`. + Type *string `form:"type"` +} + // Specific options for a registration in the specified `country`. type TaxRegistrationCountryOptionsParams struct { // Options for the registration in AE. Ae *TaxRegistrationCountryOptionsAeParams `form:"ae"` + // Options for the registration in AL. + Al *TaxRegistrationCountryOptionsAlParams `form:"al"` + // Options for the registration in AM. + Am *TaxRegistrationCountryOptionsAmParams `form:"am"` + // Options for the registration in AO. + Ao *TaxRegistrationCountryOptionsAoParams `form:"ao"` // Options for the registration in AT. At *TaxRegistrationCountryOptionsAtParams `form:"at"` // Options for the registration in AU. Au *TaxRegistrationCountryOptionsAuParams `form:"au"` + // Options for the registration in BA. + Ba *TaxRegistrationCountryOptionsBaParams `form:"ba"` + // Options for the registration in BB. + Bb *TaxRegistrationCountryOptionsBbParams `form:"bb"` // Options for the registration in BE. Be *TaxRegistrationCountryOptionsBeParams `form:"be"` // Options for the registration in BG. BG *TaxRegistrationCountryOptionsBGParams `form:"bg"` // Options for the registration in BH. Bh *TaxRegistrationCountryOptionsBhParams `form:"bh"` + // Options for the registration in BS. + Bs *TaxRegistrationCountryOptionsBsParams `form:"bs"` // Options for the registration in BY. By *TaxRegistrationCountryOptionsByParams `form:"by"` // Options for the registration in CA. Ca *TaxRegistrationCountryOptionsCaParams `form:"ca"` + // Options for the registration in CD. + Cd *TaxRegistrationCountryOptionsCdParams `form:"cd"` // Options for the registration in CH. Ch *TaxRegistrationCountryOptionsChParams `form:"ch"` // Options for the registration in CL. @@ -1590,6 +1898,8 @@ type TaxRegistrationCountryOptionsParams struct { GB *TaxRegistrationCountryOptionsGBParams `form:"gb"` // Options for the registration in GE. Ge *TaxRegistrationCountryOptionsGeParams `form:"ge"` + // Options for the registration in GN. + Gn *TaxRegistrationCountryOptionsGnParams `form:"gn"` // Options for the registration in GR. Gr *TaxRegistrationCountryOptionsGrParams `form:"gr"` // Options for the registration in HR. @@ -1608,6 +1918,8 @@ type TaxRegistrationCountryOptionsParams struct { JP *TaxRegistrationCountryOptionsJPParams `form:"jp"` // Options for the registration in KE. Ke *TaxRegistrationCountryOptionsKeParams `form:"ke"` + // Options for the registration in KH. + Kh *TaxRegistrationCountryOptionsKhParams `form:"kh"` // Options for the registration in KR. Kr *TaxRegistrationCountryOptionsKrParams `form:"kr"` // Options for the registration in KZ. @@ -1622,6 +1934,12 @@ type TaxRegistrationCountryOptionsParams struct { Ma *TaxRegistrationCountryOptionsMaParams `form:"ma"` // Options for the registration in MD. Md *TaxRegistrationCountryOptionsMdParams `form:"md"` + // Options for the registration in ME. + Me *TaxRegistrationCountryOptionsMeParams `form:"me"` + // Options for the registration in MK. + Mk *TaxRegistrationCountryOptionsMkParams `form:"mk"` + // Options for the registration in MR. + Mr *TaxRegistrationCountryOptionsMrParams `form:"mr"` // Options for the registration in MT. MT *TaxRegistrationCountryOptionsMTParams `form:"mt"` // Options for the registration in MX. @@ -1634,10 +1952,14 @@ type TaxRegistrationCountryOptionsParams struct { NL *TaxRegistrationCountryOptionsNLParams `form:"nl"` // Options for the registration in NO. No *TaxRegistrationCountryOptionsNoParams `form:"no"` + // Options for the registration in NP. + Np *TaxRegistrationCountryOptionsNpParams `form:"np"` // Options for the registration in NZ. Nz *TaxRegistrationCountryOptionsNzParams `form:"nz"` // Options for the registration in OM. Om *TaxRegistrationCountryOptionsOmParams `form:"om"` + // Options for the registration in PE. + Pe *TaxRegistrationCountryOptionsPeParams `form:"pe"` // Options for the registration in PL. PL *TaxRegistrationCountryOptionsPLParams `form:"pl"` // Options for the registration in PT. @@ -1658,20 +1980,34 @@ type TaxRegistrationCountryOptionsParams struct { Si *TaxRegistrationCountryOptionsSiParams `form:"si"` // Options for the registration in SK. SK *TaxRegistrationCountryOptionsSKParams `form:"sk"` + // Options for the registration in SN. + Sn *TaxRegistrationCountryOptionsSnParams `form:"sn"` + // Options for the registration in SR. + Sr *TaxRegistrationCountryOptionsSrParams `form:"sr"` // Options for the registration in TH. TH *TaxRegistrationCountryOptionsTHParams `form:"th"` + // Options for the registration in TJ. + Tj *TaxRegistrationCountryOptionsTjParams `form:"tj"` // Options for the registration in TR. TR *TaxRegistrationCountryOptionsTRParams `form:"tr"` // Options for the registration in TZ. Tz *TaxRegistrationCountryOptionsTzParams `form:"tz"` + // Options for the registration in UG. + Ug *TaxRegistrationCountryOptionsUgParams `form:"ug"` // Options for the registration in US. US *TaxRegistrationCountryOptionsUSParams `form:"us"` + // Options for the registration in UY. + Uy *TaxRegistrationCountryOptionsUyParams `form:"uy"` // Options for the registration in UZ. Uz *TaxRegistrationCountryOptionsUzParams `form:"uz"` // Options for the registration in VN. Vn *TaxRegistrationCountryOptionsVnParams `form:"vn"` // Options for the registration in ZA. Za *TaxRegistrationCountryOptionsZaParams `form:"za"` + // Options for the registration in ZM. + Zm *TaxRegistrationCountryOptionsZmParams `form:"zm"` + // Options for the registration in ZW. + Zw *TaxRegistrationCountryOptionsZwParams `form:"zw"` } // Creates a new Tax Registration object. @@ -1710,6 +2046,18 @@ type TaxRegistrationCountryOptionsAe struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsAeType `json:"type"` } +type TaxRegistrationCountryOptionsAl struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsAlType `json:"type"` +} +type TaxRegistrationCountryOptionsAm struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsAmType `json:"type"` +} +type TaxRegistrationCountryOptionsAo struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsAoType `json:"type"` +} type TaxRegistrationCountryOptionsAtStandard struct { // Place of supply scheme used in an EU standard registration. PlaceOfSupplyScheme TaxRegistrationCountryOptionsAtStandardPlaceOfSupplyScheme `json:"place_of_supply_scheme"` @@ -1723,6 +2071,14 @@ type TaxRegistrationCountryOptionsAu struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsAuType `json:"type"` } +type TaxRegistrationCountryOptionsBa struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsBaType `json:"type"` +} +type TaxRegistrationCountryOptionsBb struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsBbType `json:"type"` +} type TaxRegistrationCountryOptionsBeStandard struct { // Place of supply scheme used in an EU standard registration. PlaceOfSupplyScheme TaxRegistrationCountryOptionsBeStandardPlaceOfSupplyScheme `json:"place_of_supply_scheme"` @@ -1745,6 +2101,10 @@ type TaxRegistrationCountryOptionsBh struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsBhType `json:"type"` } +type TaxRegistrationCountryOptionsBs struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsBsType `json:"type"` +} type TaxRegistrationCountryOptionsBy struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsByType `json:"type"` @@ -1758,6 +2118,10 @@ type TaxRegistrationCountryOptionsCa struct { // Type of registration in Canada. Type TaxRegistrationCountryOptionsCaType `json:"type"` } +type TaxRegistrationCountryOptionsCd struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsCdType `json:"type"` +} type TaxRegistrationCountryOptionsCh struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsChType `json:"type"` @@ -1862,6 +2226,10 @@ type TaxRegistrationCountryOptionsGe struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsGeType `json:"type"` } +type TaxRegistrationCountryOptionsGn struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsGnType `json:"type"` +} type TaxRegistrationCountryOptionsGrStandard struct { // Place of supply scheme used in an EU standard registration. PlaceOfSupplyScheme TaxRegistrationCountryOptionsGrStandardPlaceOfSupplyScheme `json:"place_of_supply_scheme"` @@ -1923,6 +2291,10 @@ type TaxRegistrationCountryOptionsKe struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsKeType `json:"type"` } +type TaxRegistrationCountryOptionsKh struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsKhType `json:"type"` +} type TaxRegistrationCountryOptionsKr struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsKrType `json:"type"` @@ -1966,6 +2338,18 @@ type TaxRegistrationCountryOptionsMd struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsMdType `json:"type"` } +type TaxRegistrationCountryOptionsMe struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsMeType `json:"type"` +} +type TaxRegistrationCountryOptionsMk struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsMkType `json:"type"` +} +type TaxRegistrationCountryOptionsMr struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsMrType `json:"type"` +} type TaxRegistrationCountryOptionsMTStandard struct { // Place of supply scheme used in an EU standard registration. PlaceOfSupplyScheme TaxRegistrationCountryOptionsMTStandardPlaceOfSupplyScheme `json:"place_of_supply_scheme"` @@ -2000,6 +2384,10 @@ type TaxRegistrationCountryOptionsNo struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsNoType `json:"type"` } +type TaxRegistrationCountryOptionsNp struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsNpType `json:"type"` +} type TaxRegistrationCountryOptionsNz struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsNzType `json:"type"` @@ -2008,6 +2396,10 @@ type TaxRegistrationCountryOptionsOm struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsOmType `json:"type"` } +type TaxRegistrationCountryOptionsPe struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsPeType `json:"type"` +} type TaxRegistrationCountryOptionsPLStandard struct { // Place of supply scheme used in an EU standard registration. PlaceOfSupplyScheme TaxRegistrationCountryOptionsPLStandardPlaceOfSupplyScheme `json:"place_of_supply_scheme"` @@ -2078,10 +2470,22 @@ type TaxRegistrationCountryOptionsSK struct { // Type of registration in an EU country. Type TaxRegistrationCountryOptionsSKType `json:"type"` } +type TaxRegistrationCountryOptionsSn struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsSnType `json:"type"` +} +type TaxRegistrationCountryOptionsSr struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsSrType `json:"type"` +} type TaxRegistrationCountryOptionsTH struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsTHType `json:"type"` } +type TaxRegistrationCountryOptionsTj struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsTjType `json:"type"` +} type TaxRegistrationCountryOptionsTR struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsTRType `json:"type"` @@ -2090,6 +2494,10 @@ type TaxRegistrationCountryOptionsTz struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsTzType `json:"type"` } +type TaxRegistrationCountryOptionsUg struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsUgType `json:"type"` +} type TaxRegistrationCountryOptionsUSLocalAmusementTax struct { // A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Jurisdiction string `json:"jurisdiction"` @@ -2119,6 +2527,10 @@ type TaxRegistrationCountryOptionsUS struct { // Type of registration in the US. Type TaxRegistrationCountryOptionsUSType `json:"type"` } +type TaxRegistrationCountryOptionsUy struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsUyType `json:"type"` +} type TaxRegistrationCountryOptionsUz struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsUzType `json:"type"` @@ -2131,15 +2543,30 @@ type TaxRegistrationCountryOptionsZa struct { // Type of registration in `country`. Type TaxRegistrationCountryOptionsZaType `json:"type"` } +type TaxRegistrationCountryOptionsZm struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsZmType `json:"type"` +} +type TaxRegistrationCountryOptionsZw struct { + // Type of registration in `country`. + Type TaxRegistrationCountryOptionsZwType `json:"type"` +} type TaxRegistrationCountryOptions struct { Ae *TaxRegistrationCountryOptionsAe `json:"ae"` + Al *TaxRegistrationCountryOptionsAl `json:"al"` + Am *TaxRegistrationCountryOptionsAm `json:"am"` + Ao *TaxRegistrationCountryOptionsAo `json:"ao"` At *TaxRegistrationCountryOptionsAt `json:"at"` Au *TaxRegistrationCountryOptionsAu `json:"au"` + Ba *TaxRegistrationCountryOptionsBa `json:"ba"` + Bb *TaxRegistrationCountryOptionsBb `json:"bb"` Be *TaxRegistrationCountryOptionsBe `json:"be"` BG *TaxRegistrationCountryOptionsBG `json:"bg"` Bh *TaxRegistrationCountryOptionsBh `json:"bh"` + Bs *TaxRegistrationCountryOptionsBs `json:"bs"` By *TaxRegistrationCountryOptionsBy `json:"by"` Ca *TaxRegistrationCountryOptionsCa `json:"ca"` + Cd *TaxRegistrationCountryOptionsCd `json:"cd"` Ch *TaxRegistrationCountryOptionsCh `json:"ch"` Cl *TaxRegistrationCountryOptionsCl `json:"cl"` Co *TaxRegistrationCountryOptionsCo `json:"co"` @@ -2156,6 +2583,7 @@ type TaxRegistrationCountryOptions struct { FR *TaxRegistrationCountryOptionsFR `json:"fr"` GB *TaxRegistrationCountryOptionsGB `json:"gb"` Ge *TaxRegistrationCountryOptionsGe `json:"ge"` + Gn *TaxRegistrationCountryOptionsGn `json:"gn"` Gr *TaxRegistrationCountryOptionsGr `json:"gr"` HR *TaxRegistrationCountryOptionsHR `json:"hr"` HU *TaxRegistrationCountryOptionsHU `json:"hu"` @@ -2165,6 +2593,7 @@ type TaxRegistrationCountryOptions struct { IT *TaxRegistrationCountryOptionsIT `json:"it"` JP *TaxRegistrationCountryOptionsJP `json:"jp"` Ke *TaxRegistrationCountryOptionsKe `json:"ke"` + Kh *TaxRegistrationCountryOptionsKh `json:"kh"` Kr *TaxRegistrationCountryOptionsKr `json:"kr"` Kz *TaxRegistrationCountryOptionsKz `json:"kz"` LT *TaxRegistrationCountryOptionsLT `json:"lt"` @@ -2172,14 +2601,19 @@ type TaxRegistrationCountryOptions struct { LV *TaxRegistrationCountryOptionsLV `json:"lv"` Ma *TaxRegistrationCountryOptionsMa `json:"ma"` Md *TaxRegistrationCountryOptionsMd `json:"md"` + Me *TaxRegistrationCountryOptionsMe `json:"me"` + Mk *TaxRegistrationCountryOptionsMk `json:"mk"` + Mr *TaxRegistrationCountryOptionsMr `json:"mr"` MT *TaxRegistrationCountryOptionsMT `json:"mt"` MX *TaxRegistrationCountryOptionsMX `json:"mx"` My *TaxRegistrationCountryOptionsMy `json:"my"` Ng *TaxRegistrationCountryOptionsNg `json:"ng"` NL *TaxRegistrationCountryOptionsNL `json:"nl"` No *TaxRegistrationCountryOptionsNo `json:"no"` + Np *TaxRegistrationCountryOptionsNp `json:"np"` Nz *TaxRegistrationCountryOptionsNz `json:"nz"` Om *TaxRegistrationCountryOptionsOm `json:"om"` + Pe *TaxRegistrationCountryOptionsPe `json:"pe"` PL *TaxRegistrationCountryOptionsPL `json:"pl"` PT *TaxRegistrationCountryOptionsPT `json:"pt"` RO *TaxRegistrationCountryOptionsRO `json:"ro"` @@ -2190,13 +2624,20 @@ type TaxRegistrationCountryOptions struct { Sg *TaxRegistrationCountryOptionsSg `json:"sg"` Si *TaxRegistrationCountryOptionsSi `json:"si"` SK *TaxRegistrationCountryOptionsSK `json:"sk"` + Sn *TaxRegistrationCountryOptionsSn `json:"sn"` + Sr *TaxRegistrationCountryOptionsSr `json:"sr"` TH *TaxRegistrationCountryOptionsTH `json:"th"` + Tj *TaxRegistrationCountryOptionsTj `json:"tj"` TR *TaxRegistrationCountryOptionsTR `json:"tr"` Tz *TaxRegistrationCountryOptionsTz `json:"tz"` + Ug *TaxRegistrationCountryOptionsUg `json:"ug"` US *TaxRegistrationCountryOptionsUS `json:"us"` + Uy *TaxRegistrationCountryOptionsUy `json:"uy"` Uz *TaxRegistrationCountryOptionsUz `json:"uz"` Vn *TaxRegistrationCountryOptionsVn `json:"vn"` Za *TaxRegistrationCountryOptionsZa `json:"za"` + Zm *TaxRegistrationCountryOptionsZm `json:"zm"` + Zw *TaxRegistrationCountryOptionsZw `json:"zw"` } // A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax). diff --git a/tax_transaction.go b/tax_transaction.go index 291507c3a3..ba7b9e26c3 100644 --- a/tax_transaction.go +++ b/tax_transaction.go @@ -15,13 +15,14 @@ const ( TaxTransactionCustomerDetailsAddressSourceShipping TaxTransactionCustomerDetailsAddressSource = "shipping" ) -// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` +// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take const ( TaxTransactionCustomerDetailsTaxIDTypeADNRT TaxTransactionCustomerDetailsTaxIDType = "ad_nrt" TaxTransactionCustomerDetailsTaxIDTypeAETRN TaxTransactionCustomerDetailsTaxIDType = "ae_trn" + TaxTransactionCustomerDetailsTaxIDTypeAlTin TaxTransactionCustomerDetailsTaxIDType = "al_tin" TaxTransactionCustomerDetailsTaxIDTypeAmTin TaxTransactionCustomerDetailsTaxIDType = "am_tin" TaxTransactionCustomerDetailsTaxIDTypeAoTin TaxTransactionCustomerDetailsTaxIDType = "ao_tin" TaxTransactionCustomerDetailsTaxIDTypeARCUIT TaxTransactionCustomerDetailsTaxIDType = "ar_cuit" @@ -338,7 +339,7 @@ func (p *TaxTransactionCreateReversalParams) AddMetadata(key string, value strin // The customer's tax IDs (for example, EU VAT numbers). type TaxTransactionCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` Type TaxTransactionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/taxid.go b/taxid.go index f7834fccfc..3b1bd60377 100644 --- a/taxid.go +++ b/taxid.go @@ -19,13 +19,14 @@ const ( TaxIDOwnerTypeSelf TaxIDOwnerType = "self" ) -// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` +// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` type TaxIDType string // List of values that TaxIDType can take const ( TaxIDTypeADNRT TaxIDType = "ad_nrt" TaxIDTypeAETRN TaxIDType = "ae_trn" + TaxIDTypeAlTin TaxIDType = "al_tin" TaxIDTypeAmTin TaxIDType = "am_tin" TaxIDTypeAoTin TaxIDType = "ao_tin" TaxIDTypeARCUIT TaxIDType = "ar_cuit" @@ -143,7 +144,7 @@ type TaxIDParams struct { Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -210,7 +211,7 @@ type TaxID struct { Object string `json:"object"` // The account or customer the tax ID belongs to. Owner *TaxIDOwner `json:"owner"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` Type TaxIDType `json:"type"` // Value of the tax ID. Value string `json:"value"`