#Sharvari96
1 messages · Page 1 of 1 (latest)
The section you've circled is driven by the contents of line_items
What are you trying to accomplish that you're currently not able to?
how to specify subtotal?
You don't, that's calculated based on the provided contents of line_items.
There you're only providing one line_item with no tax calculation or discount or anything complex, so there is no need for subtotal and total fields to be displayed.
It is there right, the part showing US$220.00?
what about the line and total due today section as in the highlighted ref image?
My understanding is that subtotal and total are shown there because that integration is using Stripe Tax to calculate tax amounts and collect that as well, so additional details need to be shown to clearly articulate that.
Ok thank you
How to specify -
line_items.tax_rates?
should it be Tax rate object - ?
{
"id": "txr_1NMB2SLbsWAvIKo9suvnUARZ",
"object": "tax_rate",
"active": true,
"country": "DE",
"created": 1687530760,
"description": "VAT Germany",
"display_name": "VAT",
"effective_percentage": null,
"inclusive": false,
"jurisdiction": "DE",
"livemode": false,
"metadata": {},
"percentage": 19.0,
"state": null,
"tax_type": "vat"
}
There are two options for handling tax in Stripe, which one you decide to go with dictates how you need to shape your integration.
Stripe Tax - the automatic approach:
https://stripe.com/docs/tax/checkout
Tax Rates - the more manual (but more free) approach:
https://stripe.com/docs/billing/taxes/tax-rates
After creating the Tax Rate objects you can reference them via line_items.tax_rates
Ok will check that thank you!
Any time!
So, if we add payment method to the customer and verify that?
can that be reused in a checkout form?
or should I customer manually enter the payment details - card number, or bank account number again?
The behavior that Checkout Sessions use for existing/returning customers is explained here:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#handling-existing-customers
If you are saving the Customer's Payment Method for future usage, then you could also use it without creating new Checkout Sessions, that is explained here.
ok will go through thanks