diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2b4f3461d7..d13b3bd2b4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v157 \ No newline at end of file +v158 \ No newline at end of file diff --git a/account.go b/account.go index 025970987a..dfb2a399f8 100644 --- a/account.go +++ b/account.go @@ -110,6 +110,16 @@ const ( AccountCapabilitiesPayNowPaymentsPending AccountCapabilitiesPayNowPayments = "pending" ) +// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. +type AccountCapabilitiesPromptpayPayments string + +// List of values that AccountCapabilitiesPromptpayPayments can take +const ( + AccountCapabilitiesPromptpayPaymentsActive AccountCapabilitiesPromptpayPayments = "active" + AccountCapabilitiesPromptpayPaymentsInactive AccountCapabilitiesPromptpayPayments = "inactive" + AccountCapabilitiesPromptpayPaymentsPending AccountCapabilitiesPromptpayPayments = "pending" +) + // The status of the banking capability, or whether the account can have bank accounts. type AccountCapabilitiesTreasury string @@ -447,6 +457,12 @@ type AccountCapabilitiesPayNowPaymentsParams struct { Requested *bool `form:"requested"` } +// The promptpay_payments capability. +type AccountCapabilitiesPromptpayPaymentsParams 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 sepa_debit_payments capability. type AccountCapabilitiesSEPADebitPaymentsParams 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. @@ -539,6 +555,8 @@ type AccountCapabilitiesParams struct { P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"` // The paynow_payments capability. PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"` + // The promptpay_payments capability. + PromptpayPayments *AccountCapabilitiesPromptpayPaymentsParams `form:"promptpay_payments"` // The sepa_debit_payments capability. SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"` // The sofort_payments capability. @@ -945,6 +963,8 @@ type AccountCapabilities struct { P24Payments AccountCapabilityStatus `json:"p24_payments"` // The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. PayNowPayments AccountCapabilitiesPayNowPayments `json:"paynow_payments"` + // The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + PromptpayPayments AccountCapabilitiesPromptpayPayments `json:"promptpay_payments"` // The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"` // The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. diff --git a/charge.go b/charge.go index f50928121e..c4bd500cb6 100644 --- a/charge.go +++ b/charge.go @@ -782,6 +782,10 @@ type ChargePaymentMethodDetailsPayNow struct { // Reference number associated with this PayNow payment Reference string `json:"reference"` } +type ChargePaymentMethodDetailsPromptpay struct { + // Bill reference generated by PromptPay + Reference string `json:"reference"` +} type ChargePaymentMethodDetailsSepaCreditTransfer struct { // Name of the bank associated with the bank account. BankName string `json:"bank_name"` @@ -877,6 +881,7 @@ type ChargePaymentMethodDetails struct { OXXO *ChargePaymentMethodDetailsOXXO `json:"oxxo"` P24 *ChargePaymentMethodDetailsP24 `json:"p24"` PayNow *ChargePaymentMethodDetailsPayNow `json:"paynow"` + Promptpay *ChargePaymentMethodDetailsPromptpay `json:"promptpay"` SepaCreditTransfer *ChargePaymentMethodDetailsSepaCreditTransfer `json:"sepa_credit_transfer"` SepaDebit *ChargePaymentMethodDetailsSepaDebit `json:"sepa_debit"` Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"` diff --git a/creditnote.go b/creditnote.go index c9b163d699..44d79fa493 100644 --- a/creditnote.go +++ b/creditnote.go @@ -225,6 +225,8 @@ type CreditNote struct { Status CreditNoteStatus `json:"status"` // The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. Subtotal int64 `json:"subtotal"` + // The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. + SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"` // The integer amount in %s representing the total amount of the credit note, including tax and all discount. diff --git a/creditnotelineitem.go b/creditnotelineitem.go index 408dec3edc..1fe93f8d68 100644 --- a/creditnotelineitem.go +++ b/creditnotelineitem.go @@ -28,6 +28,8 @@ type CreditNoteLineItemDiscountAmount struct { type CreditNoteLineItem struct { // The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. Amount int64 `json:"amount"` + // The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. + AmountExcludingTax int64 `json:"amount_excluding_tax"` // Description of the item being credited. Description string `json:"description"` // The integer amount in %s representing the discount being credited for this line item. @@ -54,6 +56,8 @@ type CreditNoteLineItem struct { UnitAmount int64 `json:"unit_amount"` // Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. UnitAmountDecimal float64 `json:"unit_amount_decimal,string"` + // The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` } // CreditNoteLineItemList is a list of CreditNoteLineItems as retrieved from a list endpoint. diff --git a/invoice.go b/invoice.go index 440dce1b33..dc25f27e89 100644 --- a/invoice.go +++ b/invoice.go @@ -123,6 +123,7 @@ const ( InvoicePaymentSettingsPaymentMethodTypeKonbini InvoicePaymentSettingsPaymentMethodType = "konbini" InvoicePaymentSettingsPaymentMethodTypeLink InvoicePaymentSettingsPaymentMethodType = "link" InvoicePaymentSettingsPaymentMethodTypePayNow InvoicePaymentSettingsPaymentMethodType = "paynow" + InvoicePaymentSettingsPaymentMethodTypePromptpay InvoicePaymentSettingsPaymentMethodType = "promptpay" InvoicePaymentSettingsPaymentMethodTypeSepaCreditTransfer InvoicePaymentSettingsPaymentMethodType = "sepa_credit_transfer" InvoicePaymentSettingsPaymentMethodTypeSepaDebit InvoicePaymentSettingsPaymentMethodType = "sepa_debit" InvoicePaymentSettingsPaymentMethodTypeSofort InvoicePaymentSettingsPaymentMethodType = "sofort" @@ -281,6 +282,12 @@ type InvoicePaymentSettingsParams struct { PaymentMethodTypes []*string `form:"payment_method_types"` } +// Options for invoice PDF rendering. +type InvoiceRenderingOptionsParams struct { + // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + AmountTaxDisplay *string `form:"amount_tax_display"` +} + // If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. type InvoiceTransferDataParams struct { // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. @@ -329,6 +336,8 @@ type InvoiceParams struct { PaymentSettings *InvoicePaymentSettingsParams `form:"payment_settings"` // How to handle pending invoice items on invoice creation. One of `include`, `exclude`, or `include_and_require`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `include_and_require` will include any pending invoice items, if no pending invoice items exist then the request will fail. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `include_and_require` if the parameter is omitted. PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"` + // Options for invoice PDF rendering. + RenderingOptions *InvoiceRenderingOptionsParams `form:"rendering_options"` // The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. Schedule *string `form:"schedule"` // Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. @@ -832,6 +841,8 @@ type Invoice struct { SubscriptionProrationDate int64 `json:"subscription_proration_date"` // Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated Subtotal int64 `json:"subtotal"` + // The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"` // The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. Tax int64 `json:"tax"` // ID of the test clock this invoice belongs to. @@ -841,6 +852,8 @@ type Invoice struct { Total int64 `json:"total"` // The aggregate amounts calculated per discount across all line items. TotalDiscountAmounts []*InvoiceDiscountAmount `json:"total_discount_amounts"` + // The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. + TotalExcludingTax int64 `json:"total_excluding_tax"` // The aggregate amounts calculated per tax rate for all line items. TotalTaxAmounts []*InvoiceTaxAmount `json:"total_tax_amounts"` // The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. diff --git a/invoicelineitem.go b/invoicelineitem.go index da69d2dc7d..82e51d3a2c 100644 --- a/invoicelineitem.go +++ b/invoicelineitem.go @@ -39,6 +39,8 @@ type InvoiceLineProrationDetails struct { type InvoiceLine struct { // The amount, in %s. Amount int64 `json:"amount"` + // The integer amount in %s representing the amount for this line item, excluding all tax and discounts. + AmountExcludingTax int64 `json:"amount_excluding_tax"` // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Currency Currency `json:"currency"` // An arbitrary string attached to the object. Often useful for displaying to users. @@ -81,6 +83,8 @@ type InvoiceLine struct { // A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. Type InvoiceLineType `json:"type"` UnifiedProration bool `json:"unified_proration"` + // The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"` } // Period is a structure representing a start and end dates. diff --git a/paymentintent.go b/paymentintent.go index 4f8129445c..b31aab5dc1 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -525,6 +525,18 @@ const ( PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsageNone PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage = "none" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. +// +// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). +type PaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage string + +// List of values that PaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage can take +const ( + PaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage = "none" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -702,6 +714,9 @@ type PaymentIntentPaymentMethodDataLinkParams struct{} // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. type PaymentIntentPaymentMethodDataPayNowParams struct{} +// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. +type PaymentIntentPaymentMethodDataPromptpayParams struct{} + // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. type PaymentIntentPaymentMethodDataRadarOptionsParams struct { // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. @@ -773,6 +788,8 @@ type PaymentIntentPaymentMethodDataParams struct { P24 *PaymentMethodP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *PaymentIntentPaymentMethodDataPayNowParams `form:"paynow"` + // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + Promptpay *PaymentIntentPaymentMethodDataPromptpayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -1207,6 +1224,18 @@ type PaymentIntentPaymentMethodOptionsPayNowParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. +type PaymentIntentPaymentMethodOptionsPromptpayParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + // + // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + SetupFutureUsage *string `form:"setup_future_usage"` +} + // Additional fields for Mandate creation type PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsParams struct{} @@ -1334,6 +1363,8 @@ type PaymentIntentPaymentMethodOptionsParams struct { P24 *PaymentIntentPaymentMethodOptionsP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. PayNow *PaymentIntentPaymentMethodOptionsPayNowParams `form:"paynow"` + // If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + Promptpay *PaymentIntentPaymentMethodOptionsPromptpayParams `form:"promptpay"` // If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. SepaDebit *PaymentIntentPaymentMethodOptionsSepaDebitParams `form:"sepa_debit"` // If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. @@ -1813,6 +1844,16 @@ type PaymentIntentNextActionPayNowDisplayQRCode struct { // The image_url_svg string used to render QR code ImageURLSVG string `json:"image_url_svg"` } +type PaymentIntentNextActionPromptpayDisplayQRCode struct { + // The raw data string used to generate QR code, it should be used together with QR code library. + Data string `json:"data"` + // The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + HostedInstructionsURL string `json:"hosted_instructions_url"` + // ​​The image_url_png string used to render QR code, can be used as + ImageURLPNG string `json:"image_url_png"` + // ​​The image_url_svg string used to render QR code, can be used as + ImageURLSVG string `json:"image_url_svg"` +} type PaymentIntentNextActionRedirectToURL struct { // If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. ReturnURL string `json:"return_url"` @@ -1870,6 +1911,7 @@ type PaymentIntentNextAction struct { KonbiniDisplayDetails *PaymentIntentNextActionKonbiniDisplayDetails `json:"konbini_display_details"` OXXODisplayDetails *PaymentIntentNextActionOXXODisplayDetails `json:"oxxo_display_details"` PayNowDisplayQRCode *PaymentIntentNextActionPayNowDisplayQRCode `json:"paynow_display_qr_code"` + PromptpayDisplayQRCode *PaymentIntentNextActionPromptpayDisplayQRCode `json:"promptpay_display_qr_code"` RedirectToURL *PaymentIntentNextActionRedirectToURL `json:"redirect_to_url"` // Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. Type PaymentIntentNextActionType `json:"type"` @@ -2186,6 +2228,14 @@ type PaymentIntentPaymentMethodOptionsPayNow struct { // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"` } +type PaymentIntentPaymentMethodOptionsPromptpay struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage PaymentIntentPaymentMethodOptionsPromptpaySetupFutureUsage `json:"setup_future_usage"` +} type PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions struct{} // PaymentIntentPaymentMethodOptionsSepaDebit is the set of SEPA Debit-specific options associated @@ -2264,6 +2314,7 @@ type PaymentIntentPaymentMethodOptions struct { OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"` P24 *PaymentIntentPaymentMethodOptionsP24 `json:"p24"` PayNow *PaymentIntentPaymentMethodOptionsPayNow `json:"paynow"` + Promptpay *PaymentIntentPaymentMethodOptionsPromptpay `json:"promptpay"` SepaDebit *PaymentIntentPaymentMethodOptionsSepaDebit `json:"sepa_debit"` Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"` USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` diff --git a/paymentmethod.go b/paymentmethod.go index 412e551b7d..918e8a0042 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -89,6 +89,7 @@ const ( PaymentMethodTypeOXXO PaymentMethodType = "oxxo" PaymentMethodTypeP24 PaymentMethodType = "p24" PaymentMethodTypePayNow PaymentMethodType = "paynow" + PaymentMethodTypePromptpay PaymentMethodType = "promptpay" PaymentMethodTypeSepaDebit PaymentMethodType = "sepa_debit" PaymentMethodTypeSofort PaymentMethodType = "sofort" PaymentMethodTypeUSBankAccount PaymentMethodType = "us_bank_account" @@ -258,6 +259,9 @@ type PaymentMethodP24Params struct { // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. type PaymentMethodPayNowParams struct{} +// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. +type PaymentMethodPromptpayParams struct{} + // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. type PaymentMethodRadarOptionsParams struct { // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. @@ -344,6 +348,8 @@ type PaymentMethodParams struct { P24 *PaymentMethodP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *PaymentMethodPayNowParams `form:"paynow"` + // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + Promptpay *PaymentMethodPromptpayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentMethodRadarOptionsParams `form:"radar_options"` // This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys. @@ -584,6 +590,7 @@ type PaymentMethodP24 struct { Bank string `json:"bank"` } type PaymentMethodPayNow struct{} +type PaymentMethodPromptpay struct{} // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. type PaymentMethodRadarOptions struct { @@ -683,10 +690,11 @@ type PaymentMethod struct { // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. - Object string `json:"object"` - OXXO *PaymentMethodOXXO `json:"oxxo"` - P24 *PaymentMethodP24 `json:"p24"` - PayNow *PaymentMethodPayNow `json:"paynow"` + Object string `json:"object"` + OXXO *PaymentMethodOXXO `json:"oxxo"` + P24 *PaymentMethodP24 `json:"p24"` + PayNow *PaymentMethodPayNow `json:"paynow"` + Promptpay *PaymentMethodPromptpay `json:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *PaymentMethodRadarOptions `json:"radar_options"` SepaDebit *PaymentMethodSepaDebit `json:"sepa_debit"` diff --git a/setupintent.go b/setupintent.go index 45911ce9aa..489d9ed5a4 100644 --- a/setupintent.go +++ b/setupintent.go @@ -347,6 +347,9 @@ type SetupIntentPaymentMethodDataP24Params struct { // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. type SetupIntentPaymentMethodDataPayNowParams struct{} +// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. +type SetupIntentPaymentMethodDataPromptpayParams struct{} + // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. type SetupIntentPaymentMethodDataRadarOptionsParams struct { // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. @@ -431,6 +434,8 @@ type SetupIntentPaymentMethodDataParams struct { P24 *SetupIntentPaymentMethodDataP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *SetupIntentPaymentMethodDataPayNowParams `form:"paynow"` + // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + Promptpay *SetupIntentPaymentMethodDataPromptpayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *SetupIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -752,6 +757,9 @@ type SetupIntentConfirmPaymentMethodDataP24Params struct { // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. type SetupIntentConfirmPaymentMethodDataPayNowParams struct{} +// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. +type SetupIntentConfirmPaymentMethodDataPromptpayParams struct{} + // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. type SetupIntentConfirmPaymentMethodDataRadarOptionsParams struct { // A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. @@ -836,6 +844,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { P24 *SetupIntentConfirmPaymentMethodDataP24Params `form:"p24"` // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. PayNow *SetupIntentConfirmPaymentMethodDataPayNowParams `form:"paynow"` + // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + Promptpay *SetupIntentConfirmPaymentMethodDataPromptpayParams `form:"promptpay"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *SetupIntentConfirmPaymentMethodDataRadarOptionsParams `form:"radar_options"` // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. diff --git a/sub.go b/sub.go index 8ac1d53ce1..b28880f136 100644 --- a/sub.go +++ b/sub.go @@ -116,6 +116,7 @@ const ( SubscriptionPaymentSettingsPaymentMethodTypeKonbini SubscriptionPaymentSettingsPaymentMethodType = "konbini" SubscriptionPaymentSettingsPaymentMethodTypeLink SubscriptionPaymentSettingsPaymentMethodType = "link" SubscriptionPaymentSettingsPaymentMethodTypePayNow SubscriptionPaymentSettingsPaymentMethodType = "paynow" + SubscriptionPaymentSettingsPaymentMethodTypePromptpay SubscriptionPaymentSettingsPaymentMethodType = "promptpay" SubscriptionPaymentSettingsPaymentMethodTypeSepaCreditTransfer SubscriptionPaymentSettingsPaymentMethodType = "sepa_credit_transfer" SubscriptionPaymentSettingsPaymentMethodTypeSepaDebit SubscriptionPaymentSettingsPaymentMethodType = "sepa_debit" SubscriptionPaymentSettingsPaymentMethodTypeSofort SubscriptionPaymentSettingsPaymentMethodType = "sofort"