#jimin - Discounts

1 messages · Page 1 of 1 (latest)

spice bluff
#

Hello! Payment Intents are not compatible with Coupons or Discounts. You need to use Checkout or Invoices to use Coupons and Discounts.

warm falcon
#

So what would be the recommended flow in our situation? Should we create a Checkout session after creating the payment intent?

spice bluff
#

No, both Checkout and Invoices generate Payment Intents themselves. At a high level what are you trying to build?

warm falcon
#

We are trying to build a checkout flow with option to save credit card information

#

Our integration currently creates payment intent directly instead of checkout session

spice bluff
warm falcon
#

It seems like we can't specify payment method when creating checkout session. Is that correct?

#

Seems like there is no place to input card information

spice bluff
warm falcon
#

My question is how should we specify the payment method data or the payment method id? Like where should the credit card information (card number, exp date, etc) be specified?

spice bluff
#

You don't specify a specific existing card to use.

warm falcon
#

hmm so from what im reading, it would just use the most recent card used by the customer, but what if this is the first time the user is adding the card? Also if they want to use something other than the most recent card, how should we handle that?

spice bluff
#

If it's the first time they're adding the card then they would type the card info into Checkout.

#

If they wanted to use something other than the options displayed in Checkout they would also type in the card details they want to use.

warm falcon
#

Checkout would be the frontend component right using js?

#

We are not using Stripe in our frontend and would like just use Checkout as a backend api

#

In this case how would we specify a payment method?

spice bluff
#

Checkout is a Stripe-hosted payment page.

warm falcon
#

oh :/

spice bluff
#

You create a Checkout Session using the API which has a url you send your customer to.

#

Let's back up.

#

It sounds like I need a lot more details to point you in the right direction.

#

Can you describe what you want to build in more detail?

warm falcon
#

Yeah. So we are trying to collect payment information in our own front end using third party tokenizing service. We would then use this payment information (card number, cvv, exp date, and billing details) to make payments (purchase or subscription) using stripe and store it for future usage as well.

#

Am I missing anything?

spice bluff
#

Why are you using a third-party tokenizing service?

warm falcon
#

But we would also like to apply discounts and promotion code. So far, we have built everything using payment intents and setup intent (we just input our own payment method data) but discounts are not supported for these

#

we would like to potentially use Wyre and Plaid and other platforms and not be tied to stripe

spice bluff
#

Payment Intents are low-level objects in Stripe. The idea is you specify the amount you want to collect and that's it, no line items, no discounts, etc. Those details would normally be dealt with using higher-level objects like Invoices or Checkout Sessions. If you don't want to use those you'll need to implement discounts on your end and factor those discounts into the amount you specify on the Payment Intents you use.

warm falcon
#

And invoices don't make sense for our purposes right?

spice bluff
#

I don't have enough information to answer that yet. I'm leaning toward no, but I need more details.

warm falcon
#

Is there no way to use Checkout Sessions without using Stripe's Checkout page?

spice bluff
#

No.

warm falcon
#

big sad

spice bluff
#

That would defeat the purpose, honestly.

warm falcon
#

😿

spice bluff