#devparry - one time invoice items on first sub invoice

1 messages ยท Page 1 of 1 (latest)

hushed sparrowBOT
languid jasper
#

Hi there

fathom cosmos
#

Hi

languid jasper
#

That was you can add an invoice item to the first invoice for that $5 installation charge

fathom cosmos
#

so it will automatically deduct $15 from the user card

#

and in the rest of next month's invoice, $10 will deduct. Please confrim @languid jasper

languid jasper
#

Yep

#

Recommend testing it out

fathom cosmos
#

okay one more question

winter imp
#

๐Ÿ‘‹ i can help with that

fathom cosmos
#

also, is it required to create multiple prices ( attach ) under plans too before creating a subscription?

fathom cosmos
winter imp
#

Multiple prices for what, exactly?

fathom cosmos
winter imp
#

SUre, but what are you trying to do in the end?

#

You can create multiple prices, and a subscription might be for multiple products/prices, but this is not required

fathom cosmos
#

let me explain till now what we did and what we want to do i hope it will let u under stand better

winter imp
#

Oh i think i understand

fathom cosmos
#

we have already created a system where the admin can manage ( create | edit | remove ) plans under the admin panel and all these are sync with stripe as well using stripe API https://stripe.com/docs/api/plans/create

and based on that users can select plans on Front end and take subscriptions which is working fine with the help of Stripe subscription apis

winter imp
#

You mean for those one time items for the first invoice, do you need to create prices beforehand?

fathom cosmos
#

Now we have to add additional functionality like adding one-time Payment E.g: first-time installation charges

so if we have a plan Basic plan which monthly Price is $10 and the user has to pay $5.

First time user will pay $15 and rest on months it will just $10

#

so what is the best way to make this workable and what additional functionality has to be implement?

winter imp
#

Right so I'd say you need to make a product for the installation charges

#

if the price is usually 5 you can also make a price and use that price in add_invoice_items

#

If the price varies, you can use price_data in add_invoice_items to provide the amount on the fly for the product

#

devparry - one time invoice items on first sub invoice

fathom cosmos
#

$stripe->subscriptions->create( [ 'customer' => '{{CUSTOMER_ID}}', 'items' => [['price' => '{{RECURRING_PRICE_ID}}']], 'add_invoice_items' => [['price' => '{{PRICE_ID}}']], 'payment_behavior' => 'default_incomplete', ] );

#

this code will be use I am right ?

winter imp
#

Yea that's right ๐Ÿ‘

fathom cosmos
fathom cosmos
winter imp