#votsircp
1 messages · Page 1 of 1 (latest)
heya @delicate bison! Are you using the Stripe Payment Element? https://stripe.com/docs/payments/payment-element
hey Alex!
yes, we're using Element
thank you
after the user pays we do a series of operations, like adding new subscription information to our database, create new discounts so user can share with friends
should we capture the payment conclusion with a webhook to trigger further actions?
typically yes, you would want to listen to webhooks to trigger further actions
i feel so overwhelmed by this project 😦
thank you
is there a way to manually apply a discount to the price while still using Elements
?
just to confirm, you're doing subscriptions right?
you can apply the promo code / coupon to the subscription : https://stripe.com/docs/billing/subscriptions/coupons/codes
we want to have both one time payments and subscriptions
i can't force a price before submitting payment?
asking cause i'm dealing with code that was done before i started at the company
you can force a price before submitting payment, you can take a look at this guide here : https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements, you would create the subscription before collecting payment details
thank you
yeah, but i would love to use something like Checkout
or this that you shared before https://stripe.com/docs/payments/payment-element
ah no, you can probably take a look at this page for checkout : https://stripe.com/docs/checkout/integration-builder
thank you
but again, how do i integrate a discount with that
like a form with an input where user fills a code, ajax to our backend to find updated price, and the price of the products changes and user checks out
when i press checkout i see this
if you're using Checkout, you would set enable_promo_code=true to allow the user to key in promo codes
if you want to take a look at how Checkout works, this would work better : https://checkout.stripe.dev/
that page i provided before was more of an implementation guide
i want to use checkout with manually calculated prices
user clicks pay > sees checkout page with input to input discount and apply button, discount is calculated by our server and updates page > user pays using Elements with updated price
i think you first need to decide whether you want to use Stripe Checkout or Stripe Elements.
Stripe Checkout will require the use of Products and Prices, but it will make implementation a great deal simpler for you.
If you use Stripe Elements, you'll have a great deal more control, but implementation correspondingly becomes more complex
if you want to use Stripe Elements,
You can use Coupons / Promo codes with a subscription.
But for a one time payment, you're going to have to use PaymentIntents. There is no parameter for you to pass in a Coupon/Promo code for a Payment Intent. Your server will have to calculate the final price.
i see, thank you
what about this error?
you may want to check if you have any extensions that are blocking the Stripe page from loading. it works fine for me
i'm referring to this page (in case you were on a different page) : https://checkout.stripe.dev/
i see, it fails if i'm logged in my stripe account