From bfb99db3809eccbc239bc3abf41f5fd1a61378f0 Mon Sep 17 00:00:00 2001 From: Adam Walker <awalker@stripe.com> Date: Thu, 4 Apr 2024 13:08:20 -0700 Subject: [PATCH] Add onBehalfOf type to PaymentRequest --- tests/types/src/valid.ts | 7 +++++++ types/stripe-js/payment-request.d.ts | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index 6c5042c8..d474423f 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -3184,6 +3184,13 @@ const paymentRequest: PaymentRequest = stripe.paymentRequest({ }, }); +const paymentRequestOBO: PaymentRequest = stripe.paymentRequest({ + country: 'US', + currency: 'usd', + total: {label: 'Demo total', amount: 1000}, + onBehalfOf: 'acct_123', +}); + paymentRequest.canMakePayment().then((result) => { if (result) { const {applePay}: CanMakePaymentResult = result; diff --git a/types/stripe-js/payment-request.d.ts b/types/stripe-js/payment-request.d.ts index 502dd850..f8b01c01 100644 --- a/types/stripe-js/payment-request.d.ts +++ b/types/stripe-js/payment-request.d.ts @@ -237,6 +237,11 @@ export interface PaymentRequestOptions { */ applePay?: ApplePayOption; + /** + * The Stripe account ID which is the business of record. + */ + onBehalfOf?: string; + /** * @deprecated * Use disableWallets instead.