diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 19d71b607a..3c560ddf20 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v468 \ No newline at end of file +v482 \ No newline at end of file diff --git a/billingportal_session.go b/billingportal_session.go index e3aae66368..e032604c6c 100644 --- a/billingportal_session.go +++ b/billingportal_session.go @@ -16,6 +16,14 @@ const ( BillingPortalSessionFlowAfterCompletionTypeRedirect BillingPortalSessionFlowAfterCompletionType = "redirect" ) +// Type of retention strategy that will be used. +type BillingPortalSessionFlowSubscriptionCancelRetentionType string + +// List of values that BillingPortalSessionFlowSubscriptionCancelRetentionType can take +const ( + BillingPortalSessionFlowSubscriptionCancelRetentionTypeCouponOffer BillingPortalSessionFlowSubscriptionCancelRetentionType = "coupon_offer" +) + // Type of flow that the customer will go through. type BillingPortalSessionFlowType string @@ -49,8 +57,24 @@ type BillingPortalSessionFlowDataAfterCompletionParams struct { Type *string `form:"type"` } +// Configuration when `retention.type=coupon_offer`. +type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams struct { + // The ID of the coupon to be offered. + Coupon *string `form:"coupon"` +} + +// Specify a retention strategy to be used in the cancellation flow. +type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams struct { + // Configuration when `retention.type=coupon_offer`. + CouponOffer *BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams `form:"coupon_offer"` + // Type of retention strategy to use with the customer. + Type *string `form:"type"` +} + // Configuration when `flow_data.type=subscription_cancel`. type BillingPortalSessionFlowDataSubscriptionCancelParams struct { + // Specify a retention strategy to be used in the cancellation flow. + Retention *BillingPortalSessionFlowDataSubscriptionCancelRetentionParams `form:"retention"` // The ID of the subscription to be canceled. Subscription *string `form:"subscription"` } @@ -147,8 +171,24 @@ type BillingPortalSessionFlowAfterCompletion struct { Type BillingPortalSessionFlowAfterCompletionType `json:"type"` } +// Configuration when `retention.type=coupon_offer`. +type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer struct { + // The ID of the coupon to be offered. + Coupon string `json:"coupon"` +} + +// Specify a retention strategy to be used in the cancellation flow. +type BillingPortalSessionFlowSubscriptionCancelRetention struct { + // Configuration when `retention.type=coupon_offer`. + CouponOffer *BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer `json:"coupon_offer"` + // Type of retention strategy that will be used. + Type BillingPortalSessionFlowSubscriptionCancelRetentionType `json:"type"` +} + // Configuration when `flow.type=subscription_cancel`. type BillingPortalSessionFlowSubscriptionCancel struct { + // Specify a retention strategy to be used in the cancellation flow. + Retention *BillingPortalSessionFlowSubscriptionCancelRetention `json:"retention"` // The ID of the subscription to be canceled. Subscription string `json:"subscription"` } diff --git a/card.go b/card.go index d4150ff5fa..d4fcc27beb 100644 --- a/card.go +++ b/card.go @@ -337,7 +337,7 @@ type Card struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` diff --git a/charge.go b/charge.go index 82095e5cc4..8988aee3a3 100644 --- a/charge.go +++ b/charge.go @@ -699,7 +699,7 @@ type ChargePaymentMethodDetailsCard struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` @@ -771,7 +771,7 @@ type ChargePaymentMethodDetailsCardPresent struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` @@ -889,7 +889,7 @@ type ChargePaymentMethodDetailsInteracPresent struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` diff --git a/checkout_session.go b/checkout_session.go index e06c091556..43b1129af7 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -579,6 +579,14 @@ const ( CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string + +// List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take +const ( + CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -1025,7 +1033,7 @@ type CheckoutSessionPaymentIntentDataParams struct { // The parameters used to automatically create a Transfer when the payment succeeds. // For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"` - // A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + // A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. TransferGroup *string `form:"transfer_group"` } @@ -1373,6 +1381,8 @@ type CheckoutSessionPaymentMethodOptionsSofortParams struct { type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` } // contains details about the Us Bank Account payment method options. @@ -1567,7 +1577,7 @@ func (p *CheckoutSessionShippingOptionShippingRateDataParams) AddMetadata(key st p.Metadata[key] = value } -// The shipping rate options to apply to this Session. +// The shipping rate options to apply to this Session. Up to a maximum of 5. type CheckoutSessionShippingOptionParams struct { // The ID of the Shipping Rate to use for this shipping option. ShippingRate *string `form:"shipping_rate"` @@ -1750,7 +1760,7 @@ type CheckoutSessionParams struct { SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"` // When set, provides configuration for Checkout to collect a shipping address from a customer. ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"` - // The shipping rate options to apply to this Session. + // The shipping rate options to apply to this Session. Up to a maximum of 5. ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"` // Describes the type of transaction being performed by Checkout in order to customize // relevant text on the page, such as the submit button. `submit_type` can only be @@ -2248,6 +2258,8 @@ type CheckoutSessionPaymentMethodOptionsSofort struct { type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` } diff --git a/customercashbalancetransaction.go b/customercashbalancetransaction.go index 5e87c6c110..5478e08bc1 100644 --- a/customercashbalancetransaction.go +++ b/customercashbalancetransaction.go @@ -72,6 +72,8 @@ func (p *CustomerCashBalanceTransactionListParams) AddExpand(f string) { } type CustomerCashBalanceTransactionAdjustedForOverdraft struct { + // The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + BalanceTransaction *BalanceTransaction `json:"balance_transaction"` // The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"` } diff --git a/dispute.go b/dispute.go index b8b1776779..2ca5b92a48 100644 --- a/dispute.go +++ b/dispute.go @@ -8,6 +8,14 @@ package stripe import "encoding/json" +// Payment method type. +type DisputePaymentMethodDetailsType string + +// List of values that DisputePaymentMethodDetailsType can take +const ( + DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card" +) + // Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). type DisputeReason string @@ -212,6 +220,20 @@ type DisputeEvidenceDetails struct { SubmissionCount int64 `json:"submission_count"` } +// Card specific dispute details. +type DisputePaymentMethodDetailsCard struct { + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Brand string `json:"brand"` + // The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + NetworkReasonCode string `json:"network_reason_code"` +} +type DisputePaymentMethodDetails struct { + // Card specific dispute details. + Card *DisputePaymentMethodDetailsCard `json:"card"` + // Payment method type. + Type DisputePaymentMethodDetailsType `json:"type"` +} + // A dispute occurs when a customer questions your charge with their card issuer. // When this happens, you're given the opportunity to respond to the dispute with // evidence that shows that the charge is legitimate. You can find more @@ -246,7 +268,8 @@ type Dispute struct { // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // ID of the PaymentIntent that was disputed. - PaymentIntent *PaymentIntent `json:"payment_intent"` + PaymentIntent *PaymentIntent `json:"payment_intent"` + PaymentMethodDetails *DisputePaymentMethodDetails `json:"payment_method_details"` // Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). Reason DisputeReason `json:"reason"` // Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. diff --git a/financialconnections_session.go b/financialconnections_session.go index 19477f7e31..c48f79b4eb 100644 --- a/financialconnections_session.go +++ b/financialconnections_session.go @@ -26,6 +26,15 @@ const ( FinancialConnectionsSessionPermissionTransactions FinancialConnectionsSessionPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type FinancialConnectionsSessionPrefetch string + +// List of values that FinancialConnectionsSessionPrefetch can take +const ( + FinancialConnectionsSessionPrefetchBalances FinancialConnectionsSessionPrefetch = "balances" + FinancialConnectionsSessionPrefetchOwnership FinancialConnectionsSessionPrefetch = "ownership" +) + // The account holder to link accounts for. type FinancialConnectionsSessionAccountHolderParams struct { // The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. @@ -55,6 +64,8 @@ type FinancialConnectionsSessionParams struct { // // Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` } @@ -96,6 +107,8 @@ type FinancialConnectionsSession struct { Object string `json:"object"` // Permissions requested for accounts collected during this session. Permissions []FinancialConnectionsSessionPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []FinancialConnectionsSessionPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` } diff --git a/invoice.go b/invoice.go index c795110f89..2f6b21f47b 100644 --- a/invoice.go +++ b/invoice.go @@ -92,6 +92,14 @@ const ( InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string + +// List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take +const ( + InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" +) + // Bank account verification method. type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string @@ -477,6 +485,8 @@ type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams struct{} type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` } // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. @@ -1159,6 +1169,8 @@ type InvoicePaymentSettingsPaymentMethodOptionsKonbini struct{} type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` } // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. diff --git a/paymentintent.go b/paymentintent.go index 256fc077dd..82e105e123 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -657,6 +657,14 @@ const ( PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string + +// List of values that PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take +const ( + PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" +) + // Preferred transaction settlement speed type PaymentIntentPaymentMethodOptionsUSBankAccountPreferredSettlementSpeed string @@ -1497,6 +1505,8 @@ type PaymentIntentPaymentMethodOptionsSofortParams struct { type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` } @@ -2670,6 +2680,8 @@ type PaymentIntentPaymentMethodOptionsSofort struct { type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` } @@ -2869,7 +2881,7 @@ type PaymentIntent struct { Status PaymentIntentStatus `json:"status"` // The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. TransferData *PaymentIntentTransferData `json:"transfer_data"` - // A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + // A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. TransferGroup string `json:"transfer_group"` } diff --git a/paymentmethod.go b/paymentmethod.go index 81fc9fc168..ddb2818078 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -702,7 +702,7 @@ type PaymentMethodCard struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding CardFunding `json:"funding"` @@ -746,7 +746,7 @@ type PaymentMethodCardPresent struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` @@ -809,7 +809,7 @@ type PaymentMethodInteracPresent struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` diff --git a/payout.go b/payout.go index 416b8ad0a7..c206fdefc1 100644 --- a/payout.go +++ b/payout.go @@ -38,7 +38,7 @@ const ( PayoutFailureCodeUnsupportedCard PayoutFailureCode = "unsupported_card" ) -// The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) +// The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.) type PayoutMethodType string // List of values that PayoutMethodType can take @@ -103,7 +103,7 @@ type PayoutParams struct { Expand []*string `form:"expand"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata map[string]string `form:"metadata"` - // The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + // The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.) Method *string `form:"method"` // The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. SourceType *string `form:"source_type"` @@ -208,7 +208,7 @@ type Payout struct { Livemode bool `json:"livemode"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Metadata map[string]string `json:"metadata"` - // The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.) + // The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.) Method PayoutMethodType `json:"method"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` diff --git a/setupattempt.go b/setupattempt.go index 9ee6e61fd4..d35802fe50 100644 --- a/setupattempt.go +++ b/setupattempt.go @@ -193,7 +193,7 @@ type SetupAttemptPaymentMethodDetailsCard struct { ExpYear int64 `json:"exp_year"` // Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. // - // *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + // *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* Fingerprint string `json:"fingerprint"` // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. Funding string `json:"funding"` diff --git a/setupintent.go b/setupintent.go index 615151cca0..93c116c2f8 100644 --- a/setupintent.go +++ b/setupintent.go @@ -176,6 +176,14 @@ const ( SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string + +// List of values that SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take +const ( + SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" +) + // Bank account verification method. type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod string @@ -597,6 +605,8 @@ type SetupIntentPaymentMethodOptionsSEPADebitParams struct { type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL *string `form:"return_url"` } @@ -1181,6 +1191,8 @@ type SetupIntentPaymentMethodOptionsSEPADebit struct { type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. ReturnURL string `json:"return_url"` } diff --git a/subscription.go b/subscription.go index f3c1b6f7e6..e8b2ba5c18 100644 --- a/subscription.go +++ b/subscription.go @@ -128,6 +128,14 @@ const ( SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) +// Data features requested to be retrieved upon account creation. +type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string + +// List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take +const ( + SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" +) + // Bank account verification method. type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string @@ -406,6 +414,8 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams struct{} type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. Permissions []*string `form:"permissions"` + // List of data features that you would like to retrieve upon account creation. + Prefetch []*string `form:"prefetch"` } // This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. @@ -745,6 +755,8 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini struct{} type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` + // Data features requested to be retrieved upon account creation. + Prefetch []SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"` } // This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.