Skip to content

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

Merged
naor-gal merged 1 commit into
mainfrom
feat/payments-checkout-shipping-types
Oct 22, 2026
Merged

naor-gal merged 1 commit into
mainfrom
feat/payments-checkout-shipping-types

Conversation

@naor-gal

Copy link
Copy Markdown
Contributor

Summary

Types and docs for shipping on checkouts:

  • CreateCheckoutParams.shipping: an optional { address?, amount? }.
    • amount is the shipping fee in minor units, computed by the app's backend.
    • address is one the app collected, needed when the fee depends on it. The provider shows it locked, so the buyer can't change it.
    • Without an address, the provider asks the buyer for one.
  • Purchase: gains shipping_address, returned to service role callers only, like metadata, and shipping_amount.
  • New exported type: CheckoutShippingAddress.
  • Provider support: PayPal one-time checkouts only for now. Stripe, Wix Payments and PayPal subscriptions reject shipping with invalid_request.

Notes

  • No runtime change: createCheckout already sends its params as-is.
  • Merge timing: merge once the API accepts shipping, since it rejects the field as unknown until then.

Testing

Type-only change; tsc and the existing unit tests pass in CI.

🤖 Generated with Claude Code

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

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.350.bba16c2

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.350.bba16c2"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.56-pr.350.bba16c2"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Oct 22, 2026
@guyofeck
guyofeck self-requested a review October 22, 2026 10:44
@naor-gal
naor-gal merged commit 6d4fc58 into main Oct 22, 2026
7 of 8 checks passed
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.

2 participants