From 21e8e99860d05ff9cebfca7054e88b99380cf9d0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:58:45 +0000 Subject: [PATCH] Update generated code for v1319 --- OPENAPI_VERSION | 2 +- account.go | 37 ++++++ accountsession.go | 18 ++- api_version.go | 2 +- charge.go | 25 ++++ checkout_session.go | 163 ++++++++++++++++++++++++++ confirmationtoken.go | 19 +++ error.go | 1 - event.go | 1 + invoice.go | 13 +++ loginlink.go | 2 +- loginlink/client.go | 4 +- paymentintent.go | 73 ++++++++++++ paymentintent/client.go | 13 +++ paymentmethod.go | 27 +++++ paymentmethodconfiguration.go | 192 ++++++++++++++++++++++++++++++- quotepreviewinvoice.go | 6 + refund.go | 10 +- setupattempt.go | 61 +++++++--- setupintent.go | 16 +++ subscription.go | 11 ++ testhelpers_confirmationtoken.go | 8 ++ 22 files changed, 668 insertions(+), 36 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 622f807666..c626f7dd81 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1314 \ No newline at end of file +v1319 \ No newline at end of file diff --git a/account.go b/account.go index 72edf2d262..f8c1cbe965 100644 --- a/account.go +++ b/account.go @@ -438,6 +438,18 @@ type AccountCapabilitiesGrabpayPaymentsParams struct { Requested *bool `form:"requested"` } +// The id_bank_transfer_payments capability. +type AccountCapabilitiesIDBankTransferPaymentsParams struct { + // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + Requested *bool `form:"requested"` +} + +// The id_bank_transfer_payments_bca capability. +type AccountCapabilitiesIDBankTransferPaymentsBcaParams struct { + // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + Requested *bool `form:"requested"` +} + // The ideal_payments capability. type AccountCapabilitiesIDEALPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. @@ -741,6 +753,10 @@ type AccountCapabilitiesParams struct { GopayPayments *AccountCapabilitiesGopayPaymentsParams `form:"gopay_payments"` // The grabpay_payments capability. GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"` + // The id_bank_transfer_payments capability. + IDBankTransferPayments *AccountCapabilitiesIDBankTransferPaymentsParams `form:"id_bank_transfer_payments"` + // The id_bank_transfer_payments_bca capability. + IDBankTransferPaymentsBca *AccountCapabilitiesIDBankTransferPaymentsBcaParams `form:"id_bank_transfer_payments_bca"` // The ideal_payments capability. IDEALPayments *AccountCapabilitiesIDEALPaymentsParams `form:"ideal_payments"` // The india_international_payments capability. @@ -1059,6 +1075,14 @@ type AccountSettingsBACSDebitPaymentsParams struct { DisplayName *string `form:"display_name"` } +// Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. +type AccountSettingsBankBcaOnboardingParams struct { + // Bank BCA business account holder name + AccountHolderName *string `form:"account_holder_name"` + // Bank BCA business account number + BusinessAccountNumber *string `form:"business_account_number"` +} + // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. type AccountSettingsBrandingParams struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. @@ -1187,6 +1211,8 @@ type AccountSettingsTreasuryParams struct { type AccountSettingsParams struct { // Settings specific to Bacs Direct Debit payments. BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"` + // Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + BankBcaOnboarding *AccountSettingsBankBcaOnboardingParams `form:"bank_bca_onboarding"` // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. Branding *AccountSettingsBrandingParams `form:"branding"` // Settings specific to the account's use of the Capital product. @@ -1384,6 +1410,10 @@ type AccountCapabilities struct { GopayPayments AccountCapabilityStatus `json:"gopay_payments"` // The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"` + // The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. + IDBankTransferPayments AccountCapabilityStatus `json:"id_bank_transfer_payments"` + // The status of Bank BCA onboarding of the account. + IDBankTransferPaymentsBca AccountCapabilityStatus `json:"id_bank_transfer_payments_bca"` // The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. IDEALPayments AccountCapabilityStatus `json:"ideal_payments"` // The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. @@ -1700,6 +1730,12 @@ type AccountSettingsBACSDebitPayments struct { // The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. ServiceUserNumber string `json:"service_user_number"` } +type AccountSettingsBankBcaOnboarding struct { + // Bank BCA business account holder name. + AccountHolderName string `json:"account_holder_name"` + // Bank BCA business account number. + BusinessAccountNumber string `json:"business_account_number"` +} type AccountSettingsBranding struct { // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. Icon *File `json:"icon"` @@ -1804,6 +1840,7 @@ type AccountSettingsTreasury struct { // Options for customizing how the account functions within Stripe. type AccountSettings struct { BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"` + BankBcaOnboarding *AccountSettingsBankBcaOnboarding `json:"bank_bca_onboarding"` Branding *AccountSettingsBranding `json:"branding"` Capital *AccountSettingsCapital `json:"capital"` CardIssuing *AccountSettingsCardIssuing `json:"card_issuing"` diff --git a/accountsession.go b/accountsession.go index 0c0ddba778..28452b5ffe 100644 --- a/accountsession.go +++ b/accountsession.go @@ -142,6 +142,8 @@ type AccountSessionComponentsDocumentsParams struct { // The list of features enabled in the embedded component. Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"` } + +// The list of features enabled in the embedded component. type AccountSessionComponentsFinancialAccountFeaturesParams 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. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` @@ -158,7 +160,8 @@ type AccountSessionComponentsFinancialAccountFeaturesParams struct { // Configuration for the financial account component. type AccountSessionComponentsFinancialAccountParams struct { // Whether the embedded component is enabled. - Enabled *bool `form:"enabled"` + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. Features *AccountSessionComponentsFinancialAccountFeaturesParams `form:"features"` } type AccountSessionComponentsFinancialAccountTransactionsFeaturesParams struct { @@ -303,13 +306,15 @@ type AccountSessionComponentsPayoutsListParams struct { // The list of features enabled in the embedded component. Features *AccountSessionComponentsPayoutsListFeaturesParams `form:"features"` } +type AccountSessionComponentsRecipientsFeaturesParams struct { + // Whether to allow sending money. + SendMoney *bool `form:"send_money"` +} -// The list of features enabled in the embedded component. -type AccountSessionComponentsRecipientsFeaturesParams struct{} +// Configuration for the recipients component. type AccountSessionComponentsRecipientsParams struct { // Whether the embedded component is enabled. - Enabled *bool `form:"enabled"` - // The list of features enabled in the embedded component. + Enabled *bool `form:"enabled"` Features *AccountSessionComponentsRecipientsFeaturesParams `form:"features"` } @@ -388,7 +393,8 @@ type AccountSessionComponentsParams struct { Payouts *AccountSessionComponentsPayoutsParams `form:"payouts"` // Configuration for the payouts list embedded component. PayoutsList *AccountSessionComponentsPayoutsListParams `form:"payouts_list"` - Recipients *AccountSessionComponentsRecipientsParams `form:"recipients"` + // Configuration for the recipients component. + Recipients *AccountSessionComponentsRecipientsParams `form:"recipients"` // Configuration for the reporting chart embedded component. ReportingChart *AccountSessionComponentsReportingChartParams `form:"reporting_chart"` // Configuration for the tax registrations embedded component. diff --git a/api_version.go b/api_version.go index 667ebc2877..839b7f9f2f 100644 --- a/api_version.go +++ b/api_version.go @@ -7,5 +7,5 @@ package stripe const ( - apiVersion string = "2024-09-30.acacia" + apiVersion string = "2024-10-28.acacia" ) diff --git a/charge.go b/charge.go index 7bc385a686..e7805f6f1d 100644 --- a/charge.go +++ b/charge.go @@ -227,6 +227,18 @@ const ( ChargePaymentMethodDetailsCardPresentWalletTypeUnknown ChargePaymentMethodDetailsCardPresentWalletType = "unknown" ) +// Bank where the account is located. +type ChargePaymentMethodDetailsIDBankTransferBank string + +// List of values that ChargePaymentMethodDetailsIDBankTransferBank can take +const ( + ChargePaymentMethodDetailsIDBankTransferBankBca ChargePaymentMethodDetailsIDBankTransferBank = "bca" + ChargePaymentMethodDetailsIDBankTransferBankBni ChargePaymentMethodDetailsIDBankTransferBank = "bni" + ChargePaymentMethodDetailsIDBankTransferBankBri ChargePaymentMethodDetailsIDBankTransferBank = "bri" + ChargePaymentMethodDetailsIDBankTransferBankCimb ChargePaymentMethodDetailsIDBankTransferBank = "cimb" + ChargePaymentMethodDetailsIDBankTransferBankPermata ChargePaymentMethodDetailsIDBankTransferBank = "permata" +) + // The Klarna payment method used for this transaction. // Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string @@ -1657,6 +1669,18 @@ type ChargePaymentMethodDetailsGrabpay struct { // Unique transaction id generated by GrabPay TransactionID string `json:"transaction_id"` } +type ChargePaymentMethodDetailsIDBankTransfer struct { + // Account number of the bank account to transfer funds to. + AccountNumber string `json:"account_number"` + // Bank where the account is located. + Bank ChargePaymentMethodDetailsIDBankTransferBank `json:"bank"` + // Local bank code of the bank. + BankCode string `json:"bank_code"` + // Name of the bank associated with the bank account. + BankName string `json:"bank_name"` + // Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + DisplayName string `json:"display_name"` +} type ChargePaymentMethodDetailsIDEAL struct { // The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` @@ -2003,6 +2027,7 @@ type ChargePaymentMethodDetails struct { Giropay *ChargePaymentMethodDetailsGiropay `json:"giropay"` Gopay *ChargePaymentMethodDetailsGopay `json:"gopay"` Grabpay *ChargePaymentMethodDetailsGrabpay `json:"grabpay"` + IDBankTransfer *ChargePaymentMethodDetailsIDBankTransfer `json:"id_bank_transfer"` IDEAL *ChargePaymentMethodDetailsIDEAL `json:"ideal"` InteracPresent *ChargePaymentMethodDetailsInteracPresent `json:"interac_present"` KakaoPay *ChargePaymentMethodDetailsKakaoPay `json:"kakao_pay"` diff --git a/checkout_session.go b/checkout_session.go index 3b0a4bfdb1..ddcb4071e9 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -655,6 +655,29 @@ const ( CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage = "none" ) +// Controls when the funds will be captured from the customer's account. +type CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod string + +// List of values that CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod can take +const ( + CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod = "manual" +) + +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. +// +// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. +// +// 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). +type CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage string + +// List of values that CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage can take +const ( + CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage = "none" + CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage = "off_session" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -685,6 +708,29 @@ const ( CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage = "none" ) +// Controls when the funds will be captured from the customer's account. +type CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod string + +// List of values that CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod can take +const ( + CheckoutSessionPaymentMethodOptionsKrCardCaptureMethodManual CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod = "manual" +) + +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. +// +// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. +// +// 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). +type CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage string + +// List of values that CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage can take +const ( + CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage = "none" + CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage = "off_session" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -728,6 +774,14 @@ const ( CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage = "none" ) +// Controls when the funds will be captured from the customer's account. +type CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod string + +// List of values that CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod can take +const ( + CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod = "manual" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -756,6 +810,14 @@ const ( CheckoutSessionPaymentMethodOptionsP24SetupFutureUsageNone CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage = "none" ) +// Controls when the funds will be captured from the customer's account. +type CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod string + +// List of values that CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod can take +const ( + CheckoutSessionPaymentMethodOptionsPaycoCaptureMethodManual CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod = "manual" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -865,6 +927,14 @@ const ( CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage = "off_session" ) +// Controls when the funds will be captured from the customer's account. +type CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod string + +// List of values that CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod can take +const ( + CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod = "manual" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1792,6 +1862,18 @@ type CheckoutSessionPaymentMethodOptionsIDEALParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Kakao Pay payment method options. +type CheckoutSessionPaymentMethodOptionsKakaoPayParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 *string `form:"setup_future_usage"` +} + // contains details about the Klarna payment method options. type CheckoutSessionPaymentMethodOptionsKlarnaParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1818,6 +1900,18 @@ type CheckoutSessionPaymentMethodOptionsKonbiniParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Korean card payment method options. +type CheckoutSessionPaymentMethodOptionsKrCardParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 *string `form:"setup_future_usage"` +} + // contains details about the Link payment method options. type CheckoutSessionPaymentMethodOptionsLinkParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1854,6 +1948,18 @@ type CheckoutSessionPaymentMethodOptionsMultibancoParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Kakao Pay payment method options. +type CheckoutSessionPaymentMethodOptionsNaverPayParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 *string `form:"setup_future_usage"` +} + // contains details about the OXXO payment method options. type CheckoutSessionPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1882,6 +1988,9 @@ type CheckoutSessionPaymentMethodOptionsP24Params struct { TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"` } +// contains details about the PAYCO payment method options. +type CheckoutSessionPaymentMethodOptionsPaycoParams struct{} + // contains details about the PayNow payment method options. type CheckoutSessionPaymentMethodOptionsPayNowParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1970,6 +2079,9 @@ type CheckoutSessionPaymentMethodOptionsRevolutPayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Samsung Pay payment method options. +type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct{} + // contains details about the Sepa Debit payment method options. type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2076,20 +2188,28 @@ type CheckoutSessionPaymentMethodOptionsParams struct { Grabpay *CheckoutSessionPaymentMethodOptionsGrabpayParams `form:"grabpay"` // contains details about the Ideal payment method options. IDEAL *CheckoutSessionPaymentMethodOptionsIDEALParams `form:"ideal"` + // contains details about the Kakao Pay payment method options. + KakaoPay *CheckoutSessionPaymentMethodOptionsKakaoPayParams `form:"kakao_pay"` // contains details about the Klarna payment method options. Klarna *CheckoutSessionPaymentMethodOptionsKlarnaParams `form:"klarna"` // contains details about the Konbini payment method options. Konbini *CheckoutSessionPaymentMethodOptionsKonbiniParams `form:"konbini"` + // contains details about the Korean card payment method options. + KrCard *CheckoutSessionPaymentMethodOptionsKrCardParams `form:"kr_card"` // contains details about the Link payment method options. Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"` // contains details about the Mobilepay payment method options. Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"` // contains details about the Multibanco payment method options. Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"` + // contains details about the Kakao Pay payment method options. + NaverPay *CheckoutSessionPaymentMethodOptionsNaverPayParams `form:"naver_pay"` // contains details about the OXXO payment method options. OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"` // contains details about the P24 payment method options. P24 *CheckoutSessionPaymentMethodOptionsP24Params `form:"p24"` + // contains details about the PAYCO payment method options. + Payco *CheckoutSessionPaymentMethodOptionsPaycoParams `form:"payco"` // contains details about the PayNow payment method options. PayNow *CheckoutSessionPaymentMethodOptionsPayNowParams `form:"paynow"` // contains details about the PayPal payment method options. @@ -2100,6 +2220,8 @@ type CheckoutSessionPaymentMethodOptionsParams struct { Pix *CheckoutSessionPaymentMethodOptionsPixParams `form:"pix"` // contains details about the RevolutPay payment method options. RevolutPay *CheckoutSessionPaymentMethodOptionsRevolutPayParams `form:"revolut_pay"` + // contains details about the Samsung Pay payment method options. + SamsungPay *CheckoutSessionPaymentMethodOptionsSamsungPayParams `form:"samsung_pay"` // contains details about the Sepa Debit payment method options. SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"` // contains details about the Sofort payment method options. @@ -3017,6 +3139,18 @@ type CheckoutSessionPaymentMethodOptionsIDEAL 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 CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsKakaoPay struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod `json:"capture_method"` + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage `json:"setup_future_usage"` +} type CheckoutSessionPaymentMethodOptionsKlarna struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -3039,6 +3173,18 @@ type CheckoutSessionPaymentMethodOptionsKonbini 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 CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsKrCard struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod `json:"capture_method"` + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage `json:"setup_future_usage"` +} type CheckoutSessionPaymentMethodOptionsLink struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -3069,6 +3215,10 @@ type CheckoutSessionPaymentMethodOptionsMultibanco 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 CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsNaverPay struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod `json:"capture_method"` +} type CheckoutSessionPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` @@ -3091,6 +3241,10 @@ type CheckoutSessionPaymentMethodOptionsP24 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 CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsPayco struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod `json:"capture_method"` +} type CheckoutSessionPaymentMethodOptionsPayNow struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -3160,6 +3314,10 @@ type CheckoutSessionPaymentMethodOptionsRevolutPay 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 CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsSamsungPay struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod `json:"capture_method"` +} type CheckoutSessionPaymentMethodOptionsSEPADebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -3237,18 +3395,23 @@ type CheckoutSessionPaymentMethodOptions struct { Giropay *CheckoutSessionPaymentMethodOptionsGiropay `json:"giropay"` Grabpay *CheckoutSessionPaymentMethodOptionsGrabpay `json:"grabpay"` IDEAL *CheckoutSessionPaymentMethodOptionsIDEAL `json:"ideal"` + KakaoPay *CheckoutSessionPaymentMethodOptionsKakaoPay `json:"kakao_pay"` Klarna *CheckoutSessionPaymentMethodOptionsKlarna `json:"klarna"` Konbini *CheckoutSessionPaymentMethodOptionsKonbini `json:"konbini"` + KrCard *CheckoutSessionPaymentMethodOptionsKrCard `json:"kr_card"` Link *CheckoutSessionPaymentMethodOptionsLink `json:"link"` Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepay `json:"mobilepay"` Multibanco *CheckoutSessionPaymentMethodOptionsMultibanco `json:"multibanco"` + NaverPay *CheckoutSessionPaymentMethodOptionsNaverPay `json:"naver_pay"` OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"` P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"` + Payco *CheckoutSessionPaymentMethodOptionsPayco `json:"payco"` PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"` Paypal *CheckoutSessionPaymentMethodOptionsPaypal `json:"paypal"` Payto *CheckoutSessionPaymentMethodOptionsPayto `json:"payto"` Pix *CheckoutSessionPaymentMethodOptionsPix `json:"pix"` RevolutPay *CheckoutSessionPaymentMethodOptionsRevolutPay `json:"revolut_pay"` + SamsungPay *CheckoutSessionPaymentMethodOptionsSamsungPay `json:"samsung_pay"` SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebit `json:"sepa_debit"` Sofort *CheckoutSessionPaymentMethodOptionsSofort `json:"sofort"` Swish *CheckoutSessionPaymentMethodOptionsSwish `json:"swish"` diff --git a/confirmationtoken.go b/confirmationtoken.go index c2f1d77da5..784e8ee465 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -176,6 +176,17 @@ const ( ConfirmationTokenPaymentMethodPreviewFPXBankUob ConfirmationTokenPaymentMethodPreviewFPXBank = "uob" ) +type ConfirmationTokenPaymentMethodPreviewIDBankTransferBank string + +// List of values that ConfirmationTokenPaymentMethodPreviewIDBankTransferBank can take +const ( + ConfirmationTokenPaymentMethodPreviewIDBankTransferBankBca ConfirmationTokenPaymentMethodPreviewIDBankTransferBank = "bca" + ConfirmationTokenPaymentMethodPreviewIDBankTransferBankBni ConfirmationTokenPaymentMethodPreviewIDBankTransferBank = "bni" + ConfirmationTokenPaymentMethodPreviewIDBankTransferBankBri ConfirmationTokenPaymentMethodPreviewIDBankTransferBank = "bri" + ConfirmationTokenPaymentMethodPreviewIDBankTransferBankCimb ConfirmationTokenPaymentMethodPreviewIDBankTransferBank = "cimb" + ConfirmationTokenPaymentMethodPreviewIDBankTransferBankPermata ConfirmationTokenPaymentMethodPreviewIDBankTransferBank = "permata" +) + // The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. type ConfirmationTokenPaymentMethodPreviewIDEALBank string @@ -331,6 +342,7 @@ const ( ConfirmationTokenPaymentMethodPreviewTypeGiropay ConfirmationTokenPaymentMethodPreviewType = "giropay" ConfirmationTokenPaymentMethodPreviewTypeGopay ConfirmationTokenPaymentMethodPreviewType = "gopay" ConfirmationTokenPaymentMethodPreviewTypeGrabpay ConfirmationTokenPaymentMethodPreviewType = "grabpay" + ConfirmationTokenPaymentMethodPreviewTypeIDBankTransfer ConfirmationTokenPaymentMethodPreviewType = "id_bank_transfer" ConfirmationTokenPaymentMethodPreviewTypeIDEAL ConfirmationTokenPaymentMethodPreviewType = "ideal" ConfirmationTokenPaymentMethodPreviewTypeInteracPresent ConfirmationTokenPaymentMethodPreviewType = "interac_present" ConfirmationTokenPaymentMethodPreviewTypeKakaoPay ConfirmationTokenPaymentMethodPreviewType = "kakao_pay" @@ -809,6 +821,12 @@ type ConfirmationTokenPaymentMethodPreviewFPX struct { type ConfirmationTokenPaymentMethodPreviewGiropay struct{} type ConfirmationTokenPaymentMethodPreviewGopay struct{} type ConfirmationTokenPaymentMethodPreviewGrabpay struct{} +type ConfirmationTokenPaymentMethodPreviewIDBankTransfer struct { + Bank ConfirmationTokenPaymentMethodPreviewIDBankTransferBank `json:"bank"` + BankCode string `json:"bank_code"` + BankName string `json:"bank_name"` + DisplayName string `json:"display_name"` +} type ConfirmationTokenPaymentMethodPreviewIDEAL struct { // The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank ConfirmationTokenPaymentMethodPreviewIDEALBank `json:"bank"` @@ -1034,6 +1052,7 @@ type ConfirmationTokenPaymentMethodPreview struct { Giropay *ConfirmationTokenPaymentMethodPreviewGiropay `json:"giropay"` Gopay *ConfirmationTokenPaymentMethodPreviewGopay `json:"gopay"` Grabpay *ConfirmationTokenPaymentMethodPreviewGrabpay `json:"grabpay"` + IDBankTransfer *ConfirmationTokenPaymentMethodPreviewIDBankTransfer `json:"id_bank_transfer"` IDEAL *ConfirmationTokenPaymentMethodPreviewIDEAL `json:"ideal"` InteracPresent *ConfirmationTokenPaymentMethodPreviewInteracPresent `json:"interac_present"` KakaoPay *ConfirmationTokenPaymentMethodPreviewKakaoPay `json:"kakao_pay"` diff --git a/error.go b/error.go index 0fe8e0ff56..41628a44d7 100644 --- a/error.go +++ b/error.go @@ -153,7 +153,6 @@ const ( ErrorCodePaymentMethodUnexpectedState ErrorCode = "payment_method_unexpected_state" ErrorCodePaymentMethodUnsupportedType ErrorCode = "payment_method_unsupported_type" ErrorCodePayoutReconciliationNotReady ErrorCode = "payout_reconciliation_not_ready" - ErrorCodePayoutStatementDescriptorProfanity ErrorCode = "payout_statement_descriptor_profanity" ErrorCodePayoutsLimitExceeded ErrorCode = "payouts_limit_exceeded" ErrorCodePayoutsNotAllowed ErrorCode = "payouts_not_allowed" ErrorCodePlatformAPIKeyExpired ErrorCode = "platform_api_key_expired" diff --git a/event.go b/event.go index f2b8c0694c..7f80fdd53f 100644 --- a/event.go +++ b/event.go @@ -177,6 +177,7 @@ const ( EventTypeIssuingTokenCreated EventType = "issuing_token.created" EventTypeIssuingTokenUpdated EventType = "issuing_token.updated" EventTypeIssuingTransactionCreated EventType = "issuing_transaction.created" + EventTypeIssuingTransactionPurchaseDetailsReceiptUpdated EventType = "issuing_transaction.purchase_details_receipt_updated" EventTypeIssuingTransactionUpdated EventType = "issuing_transaction.updated" EventTypeMandateUpdated EventType = "mandate.updated" EventTypePaymentIntentAmountCapturableUpdated EventType = "payment_intent.amount_capturable_updated" diff --git a/invoice.go b/invoice.go index 6cbfcd8fc8..5fb8425e58 100644 --- a/invoice.go +++ b/invoice.go @@ -180,6 +180,7 @@ const ( InvoicePaymentSettingsPaymentMethodTypeFPX InvoicePaymentSettingsPaymentMethodType = "fpx" InvoicePaymentSettingsPaymentMethodTypeGiropay InvoicePaymentSettingsPaymentMethodType = "giropay" InvoicePaymentSettingsPaymentMethodTypeGrabpay InvoicePaymentSettingsPaymentMethodType = "grabpay" + InvoicePaymentSettingsPaymentMethodTypeIDBankTransfer InvoicePaymentSettingsPaymentMethodType = "id_bank_transfer" InvoicePaymentSettingsPaymentMethodTypeIDEAL InvoicePaymentSettingsPaymentMethodType = "ideal" InvoicePaymentSettingsPaymentMethodTypeJPCreditTransfer InvoicePaymentSettingsPaymentMethodType = "jp_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeKakaoPay InvoicePaymentSettingsPaymentMethodType = "kakao_pay" @@ -299,6 +300,8 @@ type InvoiceParams struct { ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. AutoAdvance *bool `form:"auto_advance"` + // The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + AutomaticallyFinalizesAt *int64 `form:"automatically_finalizes_at"` // Settings for automatic tax lookup for this invoice. AutomaticTax *InvoiceAutomaticTaxParams `form:"automatic_tax"` // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. @@ -521,6 +524,9 @@ type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct { FundingType *string `form:"funding_type"` } +// If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. +type InvoicePaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{} + // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams struct{} @@ -563,6 +569,8 @@ type InvoicePaymentSettingsPaymentMethodOptionsParams struct { Card *InvoicePaymentSettingsPaymentMethodOptionsCardParams `form:"card"` // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` + // If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + IDBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"` // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"` // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. @@ -4706,6 +4714,9 @@ type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance struct { FundingType InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` } +// If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. +type InvoicePaymentSettingsPaymentMethodOptionsIDBankTransfer struct{} + // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. type InvoicePaymentSettingsPaymentMethodOptionsKonbini struct{} @@ -4742,6 +4753,8 @@ type InvoicePaymentSettingsPaymentMethodOptions struct { Card *InvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"` // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"` + // If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + IDBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsIDBankTransfer `json:"id_bank_transfer"` // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"` // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. diff --git a/loginlink.go b/loginlink.go index e9b73555b7..16acb4a2d9 100644 --- a/loginlink.go +++ b/loginlink.go @@ -6,7 +6,7 @@ package stripe -// Creates a single-use login link for a connected account to access the Express Dashboard. +// Creates a login link for a connected account to access the Express Dashboard. // // You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. type LoginLinkParams struct { diff --git a/loginlink/client.go b/loginlink/client.go index fd4858aad3..43b63d261f 100644 --- a/loginlink/client.go +++ b/loginlink/client.go @@ -20,14 +20,14 @@ type Client struct { Key string } -// Creates a single-use login link for a connected account to access the Express Dashboard. +// Creates a login link for a connected account to access the Express Dashboard. // // You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. func New(params *stripe.LoginLinkParams) (*stripe.LoginLink, error) { return getC().New(params) } -// Creates a single-use login link for a connected account to access the Express Dashboard. +// Creates a login link for a connected account to access the Express Dashboard. // // You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. func (c Client) New(params *stripe.LoginLinkParams) (*stripe.LoginLink, error) { diff --git a/paymentintent.go b/paymentintent.go index 9c58404d97..0399ba3bde 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -677,6 +677,20 @@ const ( PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage = "none" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. +// +// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. +// +// 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). +type PaymentIntentPaymentMethodOptionsIDBankTransferSetupFutureUsage string + +// List of values that PaymentIntentPaymentMethodOptionsIDBankTransferSetupFutureUsage can take +const ( + PaymentIntentPaymentMethodOptionsIDBankTransferSetupFutureUsageNone PaymentIntentPaymentMethodOptionsIDBankTransferSetupFutureUsage = "none" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1764,6 +1778,8 @@ type PaymentIntentPaymentMethodDataParams struct { Gopay *PaymentMethodGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` + // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + IDBankTransfer *PaymentMethodIDBankTransferParams `form:"id_bank_transfer"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *PaymentMethodIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. @@ -2350,6 +2366,24 @@ type PaymentIntentPaymentMethodOptionsGrabpayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. +type PaymentIntentPaymentMethodOptionsIDBankTransferParams struct { + // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + ExpiresAfter *int64 `form:"expires_after"` + // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + ExpiresAt *int64 `form:"expires_at"` + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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). + // + // If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + SetupFutureUsage *string `form:"setup_future_usage"` +} + // If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. type PaymentIntentPaymentMethodOptionsIDEALParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2966,6 +3000,8 @@ type PaymentIntentPaymentMethodOptionsParams struct { Gopay *PaymentIntentPaymentMethodOptionsGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. Grabpay *PaymentIntentPaymentMethodOptionsGrabpayParams `form:"grabpay"` + // If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + IDBankTransfer *PaymentIntentPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"` // If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. IDEAL *PaymentIntentPaymentMethodOptionsIDEALParams `form:"ideal"` // If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. @@ -4199,6 +4235,28 @@ func (p *PaymentIntentVerifyMicrodepositsParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } +// True to simulate success, false to simulate failure. +type PaymentIntentTriggerActionScanQRCodeParams struct { + // Whether the QR Code scan's payment should succeed or fail. + Result *string `form:"result"` +} + +// Trigger an external action on a PaymentIntent. +type PaymentIntentTriggerActionParams struct { + Params `form:"*"` + // Specifies which fields in the response should be expanded. + Expand []*string `form:"expand"` + // True to simulate success, false to simulate failure. + ScanQRCode *PaymentIntentTriggerActionScanQRCodeParams `form:"scan_qr_code"` + // The type of action to be simulated. + Type *string `form:"type"` +} + +// AddExpand appends a new field to expand. +func (p *PaymentIntentTriggerActionParams) AddExpand(f string) { + p.Expand = append(p.Expand, &f) +} + type PaymentIntentAmountDetailsTip struct { // Portion of the amount that corresponds to a tip. Amount int64 `json:"amount"` @@ -5011,6 +5069,20 @@ type PaymentIntentPaymentMethodOptionsGrabpay 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 PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage `json:"setup_future_usage"` } +type PaymentIntentPaymentMethodOptionsIDBankTransfer struct { + // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. + ExpiresAfter int64 `json:"expires_after"` + // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + ExpiresAt int64 `json:"expires_at"` + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + // + // If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + // + // 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 PaymentIntentPaymentMethodOptionsIDBankTransferSetupFutureUsage `json:"setup_future_usage"` +} type PaymentIntentPaymentMethodOptionsIDEAL struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -5431,6 +5503,7 @@ type PaymentIntentPaymentMethodOptions struct { Giropay *PaymentIntentPaymentMethodOptionsGiropay `json:"giropay"` Gopay *PaymentIntentPaymentMethodOptionsGopay `json:"gopay"` Grabpay *PaymentIntentPaymentMethodOptionsGrabpay `json:"grabpay"` + IDBankTransfer *PaymentIntentPaymentMethodOptionsIDBankTransfer `json:"id_bank_transfer"` IDEAL *PaymentIntentPaymentMethodOptionsIDEAL `json:"ideal"` InteracPresent *PaymentIntentPaymentMethodOptionsInteracPresent `json:"interac_present"` KakaoPay *PaymentIntentPaymentMethodOptionsKakaoPay `json:"kakao_pay"` diff --git a/paymentintent/client.go b/paymentintent/client.go index 4bac3026ff..1693f9020f 100644 --- a/paymentintent/client.go +++ b/paymentintent/client.go @@ -329,6 +329,19 @@ func (c Client) IncrementAuthorization(id string, params *stripe.PaymentIntentIn return paymentintent, err } +// Trigger an external action on a PaymentIntent. +func TriggerAction(id string, params *stripe.PaymentIntentTriggerActionParams) (*stripe.PaymentIntent, error) { + return getC().TriggerAction(id, params) +} + +// Trigger an external action on a PaymentIntent. +func (c Client) TriggerAction(id string, params *stripe.PaymentIntentTriggerActionParams) (*stripe.PaymentIntent, error) { + path := stripe.FormatURLPath("/v1/test/payment_intents/%s/trigger_action", id) + paymentintent := &stripe.PaymentIntent{} + err := c.B.Call(http.MethodPost, path, c.Key, params, paymentintent) + return paymentintent, err +} + // Verifies microdeposits on a PaymentIntent object. func VerifyMicrodeposits(id string, params *stripe.PaymentIntentVerifyMicrodepositsParams) (*stripe.PaymentIntent, error) { return getC().VerifyMicrodeposits(id, params) diff --git a/paymentmethod.go b/paymentmethod.go index 84267d35b0..e9f3f76dd9 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -196,6 +196,17 @@ const ( PaymentMethodFPXAccountHolderTypeIndividual PaymentMethodFPXAccountHolderType = "individual" ) +type PaymentMethodIDBankTransferBank string + +// List of values that PaymentMethodIDBankTransferBank can take +const ( + PaymentMethodIDBankTransferBankBca PaymentMethodIDBankTransferBank = "bca" + PaymentMethodIDBankTransferBankBni PaymentMethodIDBankTransferBank = "bni" + PaymentMethodIDBankTransferBankBri PaymentMethodIDBankTransferBank = "bri" + PaymentMethodIDBankTransferBankCimb PaymentMethodIDBankTransferBank = "cimb" + PaymentMethodIDBankTransferBankPermata PaymentMethodIDBankTransferBank = "permata" +) + // How card details were read in this transaction. type PaymentMethodInteracPresentReadMethod string @@ -271,6 +282,7 @@ const ( PaymentMethodTypeGiropay PaymentMethodType = "giropay" PaymentMethodTypeGopay PaymentMethodType = "gopay" PaymentMethodTypeGrabpay PaymentMethodType = "grabpay" + PaymentMethodTypeIDBankTransfer PaymentMethodType = "id_bank_transfer" PaymentMethodTypeIDEAL PaymentMethodType = "ideal" PaymentMethodTypeInteracPresent PaymentMethodType = "interac_present" PaymentMethodTypeKakaoPay PaymentMethodType = "kakao_pay" @@ -495,6 +507,12 @@ type PaymentMethodGopayParams struct{} // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. type PaymentMethodGrabpayParams struct{} +// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. +type PaymentMethodIDBankTransferParams struct { + // Bank where the account is held. + Bank *string `form:"bank"` +} + // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. type PaymentMethodIDEALParams struct { // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. @@ -702,6 +720,8 @@ type PaymentMethodParams struct { Gopay *PaymentMethodGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *PaymentMethodGrabpayParams `form:"grabpay"` + // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + IDBankTransfer *PaymentMethodIDBankTransferParams `form:"id_bank_transfer"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *PaymentMethodIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. @@ -1161,6 +1181,12 @@ type PaymentMethodFPX struct { type PaymentMethodGiropay struct{} type PaymentMethodGopay struct{} type PaymentMethodGrabpay struct{} +type PaymentMethodIDBankTransfer struct { + Bank PaymentMethodIDBankTransferBank `json:"bank"` + BankCode string `json:"bank_code"` + BankName string `json:"bank_name"` + DisplayName string `json:"display_name"` +} type PaymentMethodIDEAL struct { // The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` @@ -1401,6 +1427,7 @@ type PaymentMethod struct { Grabpay *PaymentMethodGrabpay `json:"grabpay"` // Unique identifier for the object. ID string `json:"id"` + IDBankTransfer *PaymentMethodIDBankTransfer `json:"id_bank_transfer"` IDEAL *PaymentMethodIDEAL `json:"ideal"` InteracPresent *PaymentMethodInteracPresent `json:"interac_present"` KakaoPay *PaymentMethodKakaoPay `json:"kakao_pay"` diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go index 2ee67604bf..c48fdd01bb 100644 --- a/paymentmethodconfiguration.go +++ b/paymentmethodconfiguration.go @@ -386,6 +386,25 @@ const ( PaymentMethodConfigurationGooglePayDisplayPreferenceValueOn PaymentMethodConfigurationGooglePayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationGopayDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationGopayDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationGopayDisplayPreferencePreferenceNone PaymentMethodConfigurationGopayDisplayPreferencePreference = "none" + PaymentMethodConfigurationGopayDisplayPreferencePreferenceOff PaymentMethodConfigurationGopayDisplayPreferencePreference = "off" + PaymentMethodConfigurationGopayDisplayPreferencePreferenceOn PaymentMethodConfigurationGopayDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationGopayDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationGopayDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationGopayDisplayPreferenceValueOff PaymentMethodConfigurationGopayDisplayPreferenceValue = "off" + PaymentMethodConfigurationGopayDisplayPreferenceValueOn PaymentMethodConfigurationGopayDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationGrabpayDisplayPreferencePreference string @@ -405,6 +424,25 @@ const ( PaymentMethodConfigurationGrabpayDisplayPreferenceValueOn PaymentMethodConfigurationGrabpayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceNone PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "none" + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOff PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "off" + PaymentMethodConfigurationIDBankTransferDisplayPreferencePreferenceOn PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOff PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "off" + PaymentMethodConfigurationIDBankTransferDisplayPreferenceValueOn PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationIDEALDisplayPreferencePreference string @@ -652,6 +690,25 @@ const ( PaymentMethodConfigurationPromptPayDisplayPreferenceValueOn PaymentMethodConfigurationPromptPayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationQrisDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationQrisDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationQrisDisplayPreferencePreferenceNone PaymentMethodConfigurationQrisDisplayPreferencePreference = "none" + PaymentMethodConfigurationQrisDisplayPreferencePreferenceOff PaymentMethodConfigurationQrisDisplayPreferencePreference = "off" + PaymentMethodConfigurationQrisDisplayPreferencePreferenceOn PaymentMethodConfigurationQrisDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationQrisDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationQrisDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationQrisDisplayPreferenceValueOff PaymentMethodConfigurationQrisDisplayPreferenceValue = "off" + PaymentMethodConfigurationQrisDisplayPreferenceValueOn PaymentMethodConfigurationQrisDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationRevolutPayDisplayPreferencePreference string @@ -690,6 +747,25 @@ const ( PaymentMethodConfigurationSEPADebitDisplayPreferenceValueOn PaymentMethodConfigurationSEPADebitDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationShopeepayDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationShopeepayDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationShopeepayDisplayPreferencePreferenceNone PaymentMethodConfigurationShopeepayDisplayPreferencePreference = "none" + PaymentMethodConfigurationShopeepayDisplayPreferencePreferenceOff PaymentMethodConfigurationShopeepayDisplayPreferencePreference = "off" + PaymentMethodConfigurationShopeepayDisplayPreferencePreferenceOn PaymentMethodConfigurationShopeepayDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationShopeepayDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationShopeepayDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationShopeepayDisplayPreferenceValueOff PaymentMethodConfigurationShopeepayDisplayPreferenceValue = "off" + PaymentMethodConfigurationShopeepayDisplayPreferenceValueOn PaymentMethodConfigurationShopeepayDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationSofortDisplayPreferencePreference string @@ -1070,6 +1146,18 @@ type PaymentMethodConfigurationGooglePayParams struct { DisplayPreference *PaymentMethodConfigurationGooglePayDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationGopayDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. +type PaymentMethodConfigurationGopayParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationGopayDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationGrabpayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1082,6 +1170,18 @@ type PaymentMethodConfigurationGrabpayParams struct { DisplayPreference *PaymentMethodConfigurationGrabpayDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationIDBankTransferDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. +type PaymentMethodConfigurationIDBankTransferParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationIDBankTransferDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationIDEALDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1238,6 +1338,18 @@ type PaymentMethodConfigurationPromptPayParams struct { DisplayPreference *PaymentMethodConfigurationPromptPayDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationQrisDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. +type PaymentMethodConfigurationQrisParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationQrisDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationRevolutPayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1262,6 +1374,18 @@ type PaymentMethodConfigurationSEPADebitParams struct { DisplayPreference *PaymentMethodConfigurationSEPADebitDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationShopeepayDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. +type PaymentMethodConfigurationShopeepayParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationShopeepayDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationSofortDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1383,8 +1507,12 @@ type PaymentMethodConfigurationParams struct { Giropay *PaymentMethodConfigurationGiropayParams `form:"giropay"` // Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. GooglePay *PaymentMethodConfigurationGooglePayParams `form:"google_pay"` + // GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + Gopay *PaymentMethodConfigurationGopayParams `form:"gopay"` // GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. Grabpay *PaymentMethodConfigurationGrabpayParams `form:"grabpay"` + // Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + IDBankTransfer *PaymentMethodConfigurationIDBankTransferParams `form:"id_bank_transfer"` // iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. IDEAL *PaymentMethodConfigurationIDEALParams `form:"ideal"` // JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. @@ -1415,10 +1543,14 @@ type PaymentMethodConfigurationParams struct { Payto *PaymentMethodConfigurationPaytoParams `form:"payto"` // PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. PromptPay *PaymentMethodConfigurationPromptPayParams `form:"promptpay"` + // QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + Qris *PaymentMethodConfigurationQrisParams `form:"qris"` // Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. RevolutPay *PaymentMethodConfigurationRevolutPayParams `form:"revolut_pay"` // The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. SEPADebit *PaymentMethodConfigurationSEPADebitParams `form:"sepa_debit"` + // ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + Shopeepay *PaymentMethodConfigurationShopeepayParams `form:"shopeepay"` // Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. Sofort *PaymentMethodConfigurationSofortParams `form:"sofort"` // Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. @@ -1698,6 +1830,19 @@ type PaymentMethodConfigurationGooglePay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGooglePayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationGopayDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationGopayDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationGopayDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationGopay struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationGopayDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationGrabpayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1711,6 +1856,19 @@ type PaymentMethodConfigurationGrabpay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationGrabpayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationIDBankTransferDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationIDBankTransferDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationIDBankTransferDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationIDBankTransfer struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationIDBankTransferDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationIDEALDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1880,6 +2038,19 @@ type PaymentMethodConfigurationPromptPay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationPromptPayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationQrisDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationQrisDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationQrisDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationQris struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationQrisDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationRevolutPayDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1906,6 +2077,19 @@ type PaymentMethodConfigurationSEPADebit struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationSEPADebitDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationShopeepayDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationShopeepayDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationShopeepayDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationShopeepay struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationShopeepayDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationSofortDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -2025,10 +2209,12 @@ type PaymentMethodConfiguration struct { FPX *PaymentMethodConfigurationFPX `json:"fpx"` Giropay *PaymentMethodConfigurationGiropay `json:"giropay"` GooglePay *PaymentMethodConfigurationGooglePay `json:"google_pay"` + Gopay *PaymentMethodConfigurationGopay `json:"gopay"` Grabpay *PaymentMethodConfigurationGrabpay `json:"grabpay"` // Unique identifier for the object. - ID string `json:"id"` - IDEAL *PaymentMethodConfigurationIDEAL `json:"ideal"` + ID string `json:"id"` + IDBankTransfer *PaymentMethodConfigurationIDBankTransfer `json:"id_bank_transfer"` + IDEAL *PaymentMethodConfigurationIDEAL `json:"ideal"` // The default configuration is used whenever a payment method configuration is not specified. IsDefault bool `json:"is_default"` JCB *PaymentMethodConfigurationJCB `json:"jcb"` @@ -2051,8 +2237,10 @@ type PaymentMethodConfiguration struct { Paypal *PaymentMethodConfigurationPaypal `json:"paypal"` Payto *PaymentMethodConfigurationPayto `json:"payto"` PromptPay *PaymentMethodConfigurationPromptPay `json:"promptpay"` + Qris *PaymentMethodConfigurationQris `json:"qris"` RevolutPay *PaymentMethodConfigurationRevolutPay `json:"revolut_pay"` SEPADebit *PaymentMethodConfigurationSEPADebit `json:"sepa_debit"` + Shopeepay *PaymentMethodConfigurationShopeepay `json:"shopeepay"` Sofort *PaymentMethodConfigurationSofort `json:"sofort"` Swish *PaymentMethodConfigurationSwish `json:"swish"` TWINT *PaymentMethodConfigurationTWINT `json:"twint"` diff --git a/quotepreviewinvoice.go b/quotepreviewinvoice.go index 705678c256..38bac6ec25 100644 --- a/quotepreviewinvoice.go +++ b/quotepreviewinvoice.go @@ -306,6 +306,7 @@ const ( QuotePreviewInvoicePaymentSettingsPaymentMethodTypeFPX QuotePreviewInvoicePaymentSettingsPaymentMethodType = "fpx" QuotePreviewInvoicePaymentSettingsPaymentMethodTypeGiropay QuotePreviewInvoicePaymentSettingsPaymentMethodType = "giropay" QuotePreviewInvoicePaymentSettingsPaymentMethodTypeGrabpay QuotePreviewInvoicePaymentSettingsPaymentMethodType = "grabpay" + QuotePreviewInvoicePaymentSettingsPaymentMethodTypeIDBankTransfer QuotePreviewInvoicePaymentSettingsPaymentMethodType = "id_bank_transfer" QuotePreviewInvoicePaymentSettingsPaymentMethodTypeIDEAL QuotePreviewInvoicePaymentSettingsPaymentMethodType = "ideal" QuotePreviewInvoicePaymentSettingsPaymentMethodTypeJPCreditTransfer QuotePreviewInvoicePaymentSettingsPaymentMethodType = "jp_credit_transfer" QuotePreviewInvoicePaymentSettingsPaymentMethodTypeKakaoPay QuotePreviewInvoicePaymentSettingsPaymentMethodType = "kakao_pay" @@ -545,6 +546,9 @@ type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance struc FundingType QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` } +// If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. +type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsIDBankTransfer struct{} + // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsKonbini struct{} @@ -581,6 +585,8 @@ type QuotePreviewInvoicePaymentSettingsPaymentMethodOptions struct { Card *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"` // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"` + // If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + IDBankTransfer *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsIDBankTransfer `json:"id_bank_transfer"` // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"` // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. diff --git a/refund.go b/refund.go index 6e97ed535f..de5e67db7b 100644 --- a/refund.go +++ b/refund.go @@ -184,6 +184,12 @@ type RefundDestinationDetailsGBBankTransfer struct { } type RefundDestinationDetailsGiropay struct{} type RefundDestinationDetailsGrabpay struct{} +type RefundDestinationDetailsIDBankTransfer struct { + // The reference assigned to the refund. + Reference string `json:"reference"` + // Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + ReferenceStatus string `json:"reference_status"` +} type RefundDestinationDetailsJPBankTransfer struct { // The reference assigned to the refund. Reference string `json:"reference"` @@ -251,6 +257,7 @@ type RefundDestinationDetails struct { GBBankTransfer *RefundDestinationDetailsGBBankTransfer `json:"gb_bank_transfer"` Giropay *RefundDestinationDetailsGiropay `json:"giropay"` Grabpay *RefundDestinationDetailsGrabpay `json:"grabpay"` + IDBankTransfer *RefundDestinationDetailsIDBankTransfer `json:"id_bank_transfer"` JPBankTransfer *RefundDestinationDetailsJPBankTransfer `json:"jp_bank_transfer"` Klarna *RefundDestinationDetailsKlarna `json:"klarna"` Multibanco *RefundDestinationDetailsMultibanco `json:"multibanco"` @@ -275,15 +282,12 @@ type RefundNextActionDisplayDetailsEmailSent struct { // The recipient's email address. EmailSentTo string `json:"email_sent_to"` } - -// Contains the refund details. type RefundNextActionDisplayDetails struct { EmailSent *RefundNextActionDisplayDetailsEmailSent `json:"email_sent"` // The expiry timestamp. ExpiresAt int64 `json:"expires_at"` } type RefundNextAction struct { - // Contains the refund details. DisplayDetails *RefundNextActionDisplayDetails `json:"display_details"` // Type of the next action to perform. Type string `json:"type"` diff --git a/setupattempt.go b/setupattempt.go index 5606b35272..1a0da4a771 100644 --- a/setupattempt.go +++ b/setupattempt.go @@ -88,6 +88,18 @@ const ( SetupAttemptPaymentMethodDetailsCardPresentOfflineTypeDeferred SetupAttemptPaymentMethodDetailsCardPresentOfflineType = "deferred" ) +// Bank where the account is located. +type SetupAttemptPaymentMethodDetailsIDBankTransferBank string + +// List of values that SetupAttemptPaymentMethodDetailsIDBankTransferBank can take +const ( + SetupAttemptPaymentMethodDetailsIDBankTransferBankBca SetupAttemptPaymentMethodDetailsIDBankTransferBank = "bca" + SetupAttemptPaymentMethodDetailsIDBankTransferBankBni SetupAttemptPaymentMethodDetailsIDBankTransferBank = "bni" + SetupAttemptPaymentMethodDetailsIDBankTransferBankBri SetupAttemptPaymentMethodDetailsIDBankTransferBank = "bri" + SetupAttemptPaymentMethodDetailsIDBankTransferBankCimb SetupAttemptPaymentMethodDetailsIDBankTransferBank = "cimb" + SetupAttemptPaymentMethodDetailsIDBankTransferBankPermata SetupAttemptPaymentMethodDetailsIDBankTransferBank = "permata" +) + // The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. type SetupAttemptPaymentMethodDetailsType string @@ -253,6 +265,16 @@ type SetupAttemptPaymentMethodDetailsCardPresent struct { Offline *SetupAttemptPaymentMethodDetailsCardPresentOffline `json:"offline"` } type SetupAttemptPaymentMethodDetailsCashApp struct{} +type SetupAttemptPaymentMethodDetailsIDBankTransfer struct { + // Bank where the account is located. + Bank SetupAttemptPaymentMethodDetailsIDBankTransferBank `json:"bank"` + // Local bank code of the bank. + BankCode string `json:"bank_code"` + // Name of the bank associated with the bank account. + BankName string `json:"bank_name"` + // Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + DisplayName string `json:"display_name"` +} type SetupAttemptPaymentMethodDetailsIDEAL struct { // The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. Bank string `json:"bank"` @@ -298,25 +320,26 @@ type SetupAttemptPaymentMethodDetailsSofort struct { } type SetupAttemptPaymentMethodDetailsUSBankAccount struct{} type SetupAttemptPaymentMethodDetails struct { - ACSSDebit *SetupAttemptPaymentMethodDetailsACSSDebit `json:"acss_debit"` - AmazonPay *SetupAttemptPaymentMethodDetailsAmazonPay `json:"amazon_pay"` - AUBECSDebit *SetupAttemptPaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` - BACSDebit *SetupAttemptPaymentMethodDetailsBACSDebit `json:"bacs_debit"` - Bancontact *SetupAttemptPaymentMethodDetailsBancontact `json:"bancontact"` - Boleto *SetupAttemptPaymentMethodDetailsBoleto `json:"boleto"` - Card *SetupAttemptPaymentMethodDetailsCard `json:"card"` - CardPresent *SetupAttemptPaymentMethodDetailsCardPresent `json:"card_present"` - CashApp *SetupAttemptPaymentMethodDetailsCashApp `json:"cashapp"` - IDEAL *SetupAttemptPaymentMethodDetailsIDEAL `json:"ideal"` - KakaoPay *SetupAttemptPaymentMethodDetailsKakaoPay `json:"kakao_pay"` - Klarna *SetupAttemptPaymentMethodDetailsKlarna `json:"klarna"` - KrCard *SetupAttemptPaymentMethodDetailsKrCard `json:"kr_card"` - Link *SetupAttemptPaymentMethodDetailsLink `json:"link"` - Paypal *SetupAttemptPaymentMethodDetailsPaypal `json:"paypal"` - Payto *SetupAttemptPaymentMethodDetailsPayto `json:"payto"` - RevolutPay *SetupAttemptPaymentMethodDetailsRevolutPay `json:"revolut_pay"` - SEPADebit *SetupAttemptPaymentMethodDetailsSEPADebit `json:"sepa_debit"` - Sofort *SetupAttemptPaymentMethodDetailsSofort `json:"sofort"` + ACSSDebit *SetupAttemptPaymentMethodDetailsACSSDebit `json:"acss_debit"` + AmazonPay *SetupAttemptPaymentMethodDetailsAmazonPay `json:"amazon_pay"` + AUBECSDebit *SetupAttemptPaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` + BACSDebit *SetupAttemptPaymentMethodDetailsBACSDebit `json:"bacs_debit"` + Bancontact *SetupAttemptPaymentMethodDetailsBancontact `json:"bancontact"` + Boleto *SetupAttemptPaymentMethodDetailsBoleto `json:"boleto"` + Card *SetupAttemptPaymentMethodDetailsCard `json:"card"` + CardPresent *SetupAttemptPaymentMethodDetailsCardPresent `json:"card_present"` + CashApp *SetupAttemptPaymentMethodDetailsCashApp `json:"cashapp"` + IDBankTransfer *SetupAttemptPaymentMethodDetailsIDBankTransfer `json:"id_bank_transfer"` + IDEAL *SetupAttemptPaymentMethodDetailsIDEAL `json:"ideal"` + KakaoPay *SetupAttemptPaymentMethodDetailsKakaoPay `json:"kakao_pay"` + Klarna *SetupAttemptPaymentMethodDetailsKlarna `json:"klarna"` + KrCard *SetupAttemptPaymentMethodDetailsKrCard `json:"kr_card"` + Link *SetupAttemptPaymentMethodDetailsLink `json:"link"` + Paypal *SetupAttemptPaymentMethodDetailsPaypal `json:"paypal"` + Payto *SetupAttemptPaymentMethodDetailsPayto `json:"payto"` + RevolutPay *SetupAttemptPaymentMethodDetailsRevolutPay `json:"revolut_pay"` + SEPADebit *SetupAttemptPaymentMethodDetailsSEPADebit `json:"sepa_debit"` + Sofort *SetupAttemptPaymentMethodDetailsSofort `json:"sofort"` // The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. Type SetupAttemptPaymentMethodDetailsType `json:"type"` USBankAccount *SetupAttemptPaymentMethodDetailsUSBankAccount `json:"us_bank_account"` diff --git a/setupintent.go b/setupintent.go index e5954d2750..ba0524faac 100644 --- a/setupintent.go +++ b/setupintent.go @@ -447,6 +447,12 @@ type SetupIntentPaymentMethodDataGopayParams struct{} // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. type SetupIntentPaymentMethodDataGrabpayParams struct{} +// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. +type SetupIntentPaymentMethodDataIDBankTransferParams struct { + // Bank where the account is held. + Bank *string `form:"bank"` +} + // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. type SetupIntentPaymentMethodDataIDEALParams struct { // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. @@ -648,6 +654,8 @@ type SetupIntentPaymentMethodDataParams struct { Gopay *SetupIntentPaymentMethodDataGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *SetupIntentPaymentMethodDataGrabpayParams `form:"grabpay"` + // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + IDBankTransfer *SetupIntentPaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *SetupIntentPaymentMethodDataIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. @@ -1176,6 +1184,12 @@ type SetupIntentConfirmPaymentMethodDataGopayParams struct{} // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. type SetupIntentConfirmPaymentMethodDataGrabpayParams struct{} +// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. +type SetupIntentConfirmPaymentMethodDataIDBankTransferParams struct { + // Bank where the account is held. + Bank *string `form:"bank"` +} + // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. type SetupIntentConfirmPaymentMethodDataIDEALParams struct { // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. @@ -1377,6 +1391,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { Gopay *SetupIntentConfirmPaymentMethodDataGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *SetupIntentConfirmPaymentMethodDataGrabpayParams `form:"grabpay"` + // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + IDBankTransfer *SetupIntentConfirmPaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *SetupIntentConfirmPaymentMethodDataIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. diff --git a/subscription.go b/subscription.go index 503d34bd38..285a0bcb01 100644 --- a/subscription.go +++ b/subscription.go @@ -207,6 +207,7 @@ const ( SubscriptionPaymentSettingsPaymentMethodTypeFPX SubscriptionPaymentSettingsPaymentMethodType = "fpx" SubscriptionPaymentSettingsPaymentMethodTypeGiropay SubscriptionPaymentSettingsPaymentMethodType = "giropay" SubscriptionPaymentSettingsPaymentMethodTypeGrabpay SubscriptionPaymentSettingsPaymentMethodType = "grabpay" + SubscriptionPaymentSettingsPaymentMethodTypeIDBankTransfer SubscriptionPaymentSettingsPaymentMethodType = "id_bank_transfer" SubscriptionPaymentSettingsPaymentMethodTypeIDEAL SubscriptionPaymentSettingsPaymentMethodType = "ideal" SubscriptionPaymentSettingsPaymentMethodTypeJPCreditTransfer SubscriptionPaymentSettingsPaymentMethodType = "jp_credit_transfer" SubscriptionPaymentSettingsPaymentMethodTypeKakaoPay SubscriptionPaymentSettingsPaymentMethodType = "kakao_pay" @@ -676,6 +677,9 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct FundingType *string `form:"funding_type"` } +// This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. +type SubscriptionPaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{} + // This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams struct{} @@ -718,6 +722,8 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsParams struct { Card *SubscriptionPaymentSettingsPaymentMethodOptionsCardParams `form:"card"` // This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"` + // This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + IDBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"` // This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"` // This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. @@ -1003,6 +1009,9 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance struct { FundingType SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"` } +// This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. +type SubscriptionPaymentSettingsPaymentMethodOptionsIDBankTransfer struct{} + // This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini struct{} @@ -1039,6 +1048,8 @@ type SubscriptionPaymentSettingsPaymentMethodOptions struct { Card *SubscriptionPaymentSettingsPaymentMethodOptionsCard `json:"card"` // This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"` + // This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. + IDBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsIDBankTransfer `json:"id_bank_transfer"` // This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"` // This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. diff --git a/testhelpers_confirmationtoken.go b/testhelpers_confirmationtoken.go index 9e2145f93e..2b5f28f103 100644 --- a/testhelpers_confirmationtoken.go +++ b/testhelpers_confirmationtoken.go @@ -100,6 +100,12 @@ type TestHelpersConfirmationTokenPaymentMethodDataGopayParams struct{} // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. type TestHelpersConfirmationTokenPaymentMethodDataGrabpayParams struct{} +// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. +type TestHelpersConfirmationTokenPaymentMethodDataIDBankTransferParams struct { + // Bank where the account is held. + Bank *string `form:"bank"` +} + // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. type TestHelpersConfirmationTokenPaymentMethodDataIDEALParams struct { // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. @@ -300,6 +306,8 @@ type TestHelpersConfirmationTokenPaymentMethodDataParams struct { Gopay *TestHelpersConfirmationTokenPaymentMethodDataGopayParams `form:"gopay"` // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. Grabpay *TestHelpersConfirmationTokenPaymentMethodDataGrabpayParams `form:"grabpay"` + // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + IDBankTransfer *TestHelpersConfirmationTokenPaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"` // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. IDEAL *TestHelpersConfirmationTokenPaymentMethodDataIDEALParams `form:"ideal"` // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.