#Patrik-subscription-one_time
1 messages · Page 1 of 1 (latest)
We are actually just starting on it so we don't have a set way. But it is one of our business requirements that we need to have the first transaction amount include other fees
could you tell me maybe which API params I should look at?
Sure, it's going to fluctuate a bit depending on the approach you use.
You can create an Invoice Item on the customer record that will automatically get pulled in when the next invoice is generated:
https://stripe.com/docs/api/invoiceitems/create
If you're going to be using Checkout Sessions, then you can pass both the subscription and one-time price via the line_items parameter:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
How about if the customer subscribes in the middle of the month and only needs to pay half the sub amount for that month?
Ah, so it sounds like you want your billing cycle anchors to be on or near the first of the month. By default we set the billing cycle anchor (for monthly subs) to the day of the month that the subscription started, but you can override that using this approach:
https://stripe.com/docs/billing/subscriptions/billing-cycle#new-subscriptions
I actually want them it to be able to pick any starting and ending date
and adjust the price based on the remainder of the month
Gotcha, you'll still use that same approach, just calculate the unix timestamp for the desired billing cycle anchor and pass that in via the billing_cycle_anchor parameter.