#blinkdaffer
1 messages · Page 1 of 1 (latest)
Hello! Just to confirm, BE = back end, correct?
You can use it directly with a Payment Intent if you don't intend to reuse the token.
If you intend to reuse it you should use a Setup Intent to attach it to a Customer.
Or use a Payment Intent with setup_future_usage.
what do you mean reuse it
Tokens are one-time use only. You can use them a single time for a single payment, or you can use them a single time to create a reusable payment method attached to a Customer.
can you create a token from Frontend using publshable key ?
Yes.
There are multiple ways to do that.
Can you tell me more about what you're trying to build?
ok so here is the scenario, i have a FE which sends me token for CC and apple pay
i need the customer to make a 1 time purchase
so we are using payment intent create
👋 You should follow https://stripe.com/docs/payments/accept-a-payment
yeah but how do i create a checkout session with just the token
shouldnt i have to create a payment method first
attach it to the customer
you're going way too fast
sorry
Checkout is a full hosted payment page. You don't create any token at all if you use Checkout. You let us do everything. Is that your goal?
we are not using the hosted checkout page.
we are using elements but with custom components to get a token from the FE
then passing that to the BE to accept payment
Okay so when you load that doc, there are options at the top. You want the second one, so https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
and then you go through the step and it teaches you everything you need to accept a payment securely on your own payment page
out integration seems different
however say
if i only receive a token from the FE and i want to charge a customer a 1 time payment. how would i go about doing it.
should i use checkout or payment intent
from our BE
Ignore Checkout entirely, it's not what you want. So you should use PaymentIntent. But really you shouldn't just get a "Random token from your front-end". Tokens are years old and mostly deprecated too
ohh