Skip to content

v0.16.0

Choose a tag to compare

@Hill-waffo Hill-waffo released this 28 Jul 07:20
20ad0fe

Per-transaction payment method selection on the hosted checkout page.

Added

  • PaymentMethodcard / applepay / googlepay / wechat
  • CreateCheckoutSessionParams.includePaymentMethods — whitelist: offer only these. Every value must be supported by the product type × currency pair, otherwise the request is rejected with a 400.
  • CreateCheckoutSessionParams.excludePaymentMethods — blacklist: offer everything the currency supports except these. Values the currency does not offer are ignored, so one blacklist can be reused across currencies. Mutually exclusive with includePaymentMethods; omit both to offer every method the currency supports.

Changed

  • Currencies outside the payment method matrix are now rejected at checkout session creation (400) instead of falling through to the provider. One-time supports USD / EUR / GBP / HKD / JPY / CNY; subscription supports USD / EUR / GBP / HKD / JPY.
  • Both fields require API Key authentication. Store Slug (visitor) sessions ignore them and always offer every method the currency supports — payment method selection is a merchant-side commercial decision (channel fees, settlement terms).