#kucinglaut
1 messages · Page 1 of 1 (latest)
Unfortunately, Checkout Session doesn't support period on its line_items
The workaround is to create ad-hoc price using price_data and has its product name with the timestamp
This one, correct? https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data
So I append it to line_items.price_data.product_data.name? or can I append it to line_items.price_data.product_data.description?
for context, I'm trying to comply with Japan's invoice regulation here https://stripe.com/docs/invoicing/japan-config-guide
Thanks for sharing. description isn't shown in the invoice, so the timestamp should be appended to the name
I just reading it for a bit, if I were to use price_data, will it leads to creation of new Price object? We already have a object and we rely on that to fulfill orders,
Yup! price_data will create an one-time price object
With existing price ID, I'm afraid there is no good way to add time duration with Checkout Session integration
I'd recommend using Invoice in this case
I see. I already implemented Invoice in my case, but would like to add credit card method as well. Will there be any update that supports this in future?
Invoice should support card payment. Can you share an example Invoice (in_xxx) which you don't see card as a payment method?
in_1Ny0zWEJxjFj8XdgI6e3bHTl
In the invoice creation request, it specified to accept customer_balance payment method only: https://dashboard.stripe.com/test/logs/req_aJvfJvlcMTh500
"payment_settings": {
"payment_method_types": {
"0": "customer_balance"
}
},
You can either:
- remove the
payment_method_typesand it will pick up the payment method settings in https://dashboard.stripe.com/settings/billing/invoice; OR - add
cardinpayment_method_types
ah, okay will do that. Thank you!
No problem! Happy to help 😄
sorry actually one more question. is it possible to manually generate invoice after checkout session is done? is it recommended?
Creating an invoice manually through Stripe after completing checkout session is not supported
Ah okay, thanks again