Skip to content

Commit

Permalink
Add onBehalfOf type to PaymentRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
awalker-stripe committed Apr 4, 2024
1 parent a91238b commit bfb99db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions types/stripe-js/payment-request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bfb99db

Please sign in to comment.