Skip to content

feat(payments): type the checkout's shipping address and fee - #347

Closed
naor-gal wants to merge 2 commits into
mainfrom
feat/payments-checkout-shipping
Closed

naor-gal wants to merge 2 commits into
mainfrom
feat/payments-checkout-shipping

Conversation

@naor-gal

@naor-gal naor-gal commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Types and docs for shipping, matching base44-dev/apper#33804. Types only: createCheckout already forwards its params as-is.

  • CreateCheckoutParams.shipping?: CheckoutShipping, which is { address?: ShippingAddress, amount?: number }. Allowed only when an item is shippable. Supported for PayPal one-time checkouts; other providers and subscriptions reject it with invalid_request.
  • Purchase.shipping_address (service role only) and Purchase.shipping_amount.
  • CheckoutItem.shippable notes that the provider skips its address step when shipping.address is passed.
  • New exported types CheckoutShipping and ShippingAddress, with doc comments explaining when the app collects the address (the fee depends on it) and when the provider does.

Merge after base44-dev/apper#33804 deploys: until then the backend rejects shipping as an unknown field.

Testing

tsc --noEmit for the package and for tsconfig.type-tests.json both pass, and vitest run tests/unit passes (395 tests).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.56-pr.347.1d5ea99

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.56-pr.347.1d5ea99"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.56-pr.347.1d5ea99"
  }
}

Preview published to npm registry — try new features instantly!

…ing.address is passed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Oct 22, 2026
@naor-gal naor-gal closed this Oct 22, 2026
@naor-gal
naor-gal deleted the feat/payments-checkout-shipping branch October 22, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-draft PR has auto-drafted documentation suggestions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant