Skip to content

Commit

Permalink
onBehalfOf should be updateable (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinalong-stripe authored Mar 27, 2024
1 parent 3c95c66 commit a5c58b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -203,6 +204,7 @@ elements.update({
setupFutureUsage: 'off_session',
captureMethod: 'automatic',
paymentMethodTypes: ['card'],
on_behalf_of: 'acct_id',
});

elements.update({
Expand Down
14 changes: 14 additions & 0 deletions types/stripe-js/elements-group.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit a5c58b0

Please sign in to comment.