#cashiersprit-payment-element
1 messages ยท Page 1 of 1 (latest)
Hi ๐ have you reviewed our documentation on how to set up our Payment Element?
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
payment element already done
Oh, sincere apologies, I overlooked the word tax in your initial message.
our finanacial team want to integrate stripe tax to existing payment element
Stripe Tax doesn't integrate directly with the Payment Element, instead it integrates with our other core modules (Invoicing, Billing, or Checkout).
https://stripe.com/docs/tax/set-up#integrate
en, I think we have old checkout flow before. but recently , we use payment element to replace the old checkout
now no checkout anymore
So when you're working with the Payment Element, are you creating Payment Intents directly, or are they being created as part of a larger flow (such as when you're using Subscriptions)?
Payment Intents directly
basically, follow https://stripe.com/docs/payments/finalize-payments-on-the-server
@rough lintel check out the orders api: https://stripe.com/docs/orders/adding-orders-to-payment-intents for setup & https://stripe.com/docs/orders/tax for tax
might work for you
Good callout @acoustic sedge, thank you! That might be the best approach here.
en, I won't call them an integration. it seems they have loose relationship. payment element and tax
but I can see https://stripe.com/docs/orders/tax is an potential candidate. basically, I need to build a new order
yep, it's pretty easy to integrate
you could also use checkout if you wanted: https://stripe.com/docs/payments/checkout
but seen as you've already built upon paymentintents, i wouldn't see much benefit of you moving over as you've already integrated
yes, we already used payment element to replace checkout. we won't go back
orders is your best bet then
https://stripe.com/docs/orders/adding-orders-to-payment-intents too complex, it seems using full flow order to replace payment intent.
https://stripe.com/docs/orders/tax is strange too. so payment element will create payment intent , order also generate paymentintent . there are two paymentelements?
example code use confirmCardPayment . I am not sure. does it mean we generate two paymentelments and confirm two times?
it seems no clear path to integrate payment element and tax
no. you create the order, then submit that order (expending the paymentintent made by it), an example in node.js:
const order = await stripe.orders.submit('{{ORDER_ID}}', {
expected_total: 1000,
expand: ['payment.payment_intent']
});
const paymentIntent = order.payment.payment_intent;
const clientSecret = paymentIntent.client_secret
you can then access the paymentintent using order.payment.payment_intent, and pass the paymentintent's secret to the client for confirmation
the client secret should be passed to the client, which can then use stripe.js to collect payment details and confirm the payment using confirmCardPayment()
i sadly have to hop out, but if you have any other questions or concerns, im sure @cold plume will be happy to help :)
๐