#0xTypedef
1 messages · Page 1 of 1 (latest)
Yes you should be able to specify the price amount on-the-fly https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-unit_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks, like this correct?
const session = await ctx.stripe.checkout.sessions.create(
{
mode: "payment",
payment_method_types: ["card"],
line_items: [
{
price_data: {
unit_amount: 2000,
currency: "USD",
},
quantity: 1,
},
],
payment_intent_data: { application_fee_amount: 10 },
success_url: `${input.callbackUrl}?session={CHECKOUT_SESSION_ID}`,
cancel_url: input.callbackUrl,
},
{
stripeAccount: input.stripeId,
},
);
Looks correct. Let's try it out