#glenb.
1 messages · Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
quantity is on the outside level of price_data
Thanks. I created a new product for initial payment and added it as a line item and it works, however it is not displaying the tax (GST in my case) on the initial payment screen. It is set in the Product but no matter what I try it won't show up on the payment screen. My code currently looks like this: ```module.exports.createCheckoutSession = async (stripeCustomerID, returnURL, priceID, initialPaymentProductID) => {
debug(returnURL);
const session = await stripe.checkout.sessions.create({
line_items: [
{
price_data: {
unit_amount: 5000,
currency: 'aud',
product: initialPaymentProductID
},
quantity: 1
},
{
price: priceID
}
],
payment_method_types: ['card'],
mode: 'subscription',
ui_mode: 'embedded',
customer: stripeCustomerID,
return_url: ${returnURL}/newCardSuccess?session_id={CHECKOUT_SESSION_ID}
});
return session.client_secret;
};
Is there a way to use the priceID of the initial payment product instead of the productID?