Skip to content

fix: type the customer and payment intent of a Checkout Session as expandable - #365

Merged
Benzilla merged 1 commit into
mainfrom
fix/checkout-session-expandable
Dec 4, 2026
Merged

Benzilla merged 1 commit into
mainfrom
fix/checkout-session-expandable

Conversation

@Benzilla

@Benzilla Benzilla commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Description

The API expands customer and payment_intent on a Checkout Session, but the type declared both as an ID. The reference did not mark them as expandable, and the Python SDK typed them as a string.

Both are now typed as the ID or the object. The spec and the reference show them as expandable, and the code that reads the ID of either narrows the value first.

Closes #311

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation

How Was This Tested?

  • Unit tests
  • Integration tests
  • Manual testing

The API compiles in strict mode with both fields typed as the ID or the object, which is how each place that read one as an ID was found. The unit tests pass, and the end-to-end tests of Checkout pass with bodies sent as JSON and as forms.

Screenshots (if applicable)

Checklist

  • Self-reviewed my code
  • No new warnings
  • Existing tests still pass
  • Breaking changes are documented above

@Benzilla
Benzilla enabled auto-merge (squash) December 4, 2026 18:30
@Benzilla
Benzilla merged commit 835b57c into main Dec 4, 2026
6 checks passed
@Benzilla
Benzilla deleted the fix/checkout-session-expandable branch December 4, 2026 18:31
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.

Type the fields a Checkout Session can expand as expandable

1 participant