From a5c58b061630c56e64846a159670da699f5d2711 Mon Sep 17 00:00:00 2001 From: martinalong-stripe <102928571+martinalong-stripe@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:19:08 -0700 Subject: [PATCH] onBehalfOf should be updateable (#585) --- tests/types/src/valid.ts | 2 ++ types/stripe-js/elements-group.d.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index fa8feb2d..407953e8 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -124,6 +124,7 @@ stripe.elements({ payment_method_options: { us_bank_account: {financial_connections: {permissions: ['payment_method']}}, }, + on_behalf_of: 'acct_id', }); const elementsClientSecret: StripeElements = stripe.elements({ @@ -203,6 +204,7 @@ elements.update({ setupFutureUsage: 'off_session', captureMethod: 'automatic', paymentMethodTypes: ['card'], + on_behalf_of: 'acct_id', }); elements.update({ diff --git a/types/stripe-js/elements-group.d.ts b/types/stripe-js/elements-group.d.ts index 667d358b..6b9f3808 100644 --- a/types/stripe-js/elements-group.d.ts +++ b/types/stripe-js/elements-group.d.ts @@ -904,6 +904,20 @@ export interface StripeElementsUpdateOptions { * @docs https://stripe.com/docs/payments/payment-methods/overview */ paymentMethodTypes?: string[]; + + /** + * The Stripe account ID which is the business of record. + * + * @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf + */ + onBehalfOf?: string; + + /** + * The Stripe account ID which is the business of record. + * + * @docs https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf + */ + on_behalf_of?: string; } /*