#bikash_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285680247387455544
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
You can create a checkout session in subscription mode and pass price_data to generate inline pricing for the products: https://docs.stripe.com/payments/checkout/how-checkout-works#mixed:~:text=To create a mixed,product catalogue in Stripe
With price_data you can set custom amount to unit_amount - https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data
let me know if that helps
Can I handle a subscription for Plan A at $49/month, which renews monthly, and a one-time charge of $500 in a single transaction using Stripe Checkout?
curl https://api.stripe.com/v1/checkout/sessions
-u "sk_test_51GzNE3EZkTs7lGPbwFCl6SRsLNEMFOStVu5kstRYLbZSzFH67ikqO34RpUH5zlwsxFxmQkD0cy0gl4KofeZ8DdqJ00WqlaAr5y:"
-d "line_items[0][price]"={{RECURRING_PRICE_ID}}
-d "line_items[0][quantity]"=1
-d "line_items[1][price]"={{ONE_TIME_PRICE_ID}}
-d "line_items[1][quantity]"=1
-d mode=subscription
--data-urlencode success_url="https://example.com/success"
--data-urlencode cancel_url="https://example.com/cancel"
but here I want to pass variable amount not ONE_TIME_PRICE_ID
We need to handle cases where the service usage amount can vary
you should use price_data parameter instead: #1285680247387455544 message
Please read the message I shared above..