enupal / stripe

Allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS
https://enupal.com/craft-plugins/stripe-payments/
Other
33 stars 19 forks source link

Use Cart API with Custom One-Time items (like Checkout Twig tag) #404

Open rogerdawkins opened 1 month ago

rogerdawkins commented 1 month ago

Description

When using the Checkout Twig tag it is possible to specify Custom One-Time items instead of using a price ID. This is great, but I need to allow the user to add multiple custom items and ideally I would like to use the Cart API, but it appears that the Cart API only supports price ID's and not custom items.

Is it possible to use the Cart API with custom items? If not, would you consider this in the future?

My alternative options are:

  1. Implement my own Cart facility using Local Storage or similar. Then process the Cart items using the Checkout Twig tag.
  2. Display the items on one page and allow the user to select the required items. Then one pay button which again uses the Checkout Twig tag.
  3. Use the Cart API as is, which requires all items to be added as Stripe products. The reason NOT to do this in our case is that the website has lots of courses and lots of course dates and each would need to be a product in Stripe.

Are there any other suggestions to get custom items working with the Cart API?

Additional info