Skip to content

Add types for session.surcharge and session.surcharge for automatic surcharge support#918

Open
sophiaw-stripe wants to merge 1 commit intomasterfrom
sophiaw-surcharge
Open

Add types for session.surcharge and session.surcharge for automatic surcharge support#918
sophiaw-stripe wants to merge 1 commit intomasterfrom
sophiaw-surcharge

Conversation

@sophiaw-stripe
Copy link
Copy Markdown

@sophiaw-stripe sophiaw-stripe commented Apr 15, 2026

Summary & motivation

https://jira.corp.stripe.com/browse/OCS_API-6944

Adds the following changes to stripe.js types

export type StripeCheckoutSurchargeStatus = 
 | {status: 'complete'} 
 | {status: 'requires_input'} 
 | {status: 'failed'}

export interface StripeCheckoutSession {
  //... existing fields
  surcharge: StripeCheckoutSurchargeStatus | null;
}

export interface StripeCheckoutTotalSummary {
  // ... existing fields
  surcharge?: StripeCheckoutAmount;
}

As specified in API Review: automatic surcharge via 3rd party in Checkout payment mode

Testing & documentation

API reference updated in https://git.corp.stripe.com/stripe-internal/mint/pull/2072037 , behind gate

@sophiaw-stripe sophiaw-stripe changed the title Add types for automatic_surcharge [3p-surcharge] Add types for session.surcharge and session.surcharge Apr 15, 2026
@sophiaw-stripe sophiaw-stripe changed the title [3p-surcharge] Add types for session.surcharge and session.surcharge Add types for session.surcharge and session.surcharge for automatic surcharge support Apr 15, 2026
@sophiaw-stripe
Copy link
Copy Markdown
Author

sophiaw-stripe commented Apr 15, 2026

r? @pololi-stripe

Do these changes need to be gated or tested?

Did not see prior art for gating, and differing standard for tests
1f67c84
63f58f6

This seems maybe like something we wouldn't maintain a unit test for since it's a nullable + (currently) preview feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants