#Antu-subscription
1 messages · Page 1 of 1 (latest)
Hi there, my recommendation would be to create the subscription with the trial first, and listen to the webhook event customer.subscription.created to confirm the creation is successful, after that create an invoice.item for the one time fee [0].
[0] https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-customer
Thank you so much for the reply we thought about this but the problem is Initial Member Fee is required before subscription is created. This is the problem. and another problem is we want to generate one single invoice for the user. Under one invoice customer will able to see Initial one time payment + Subscription details. It is not possible?
Just to clarify your question, you would like to create both the Initial Member Fee (one off payment) and the subscription item within the invoice initially, and charge this Initial Member Fee when this subscription is created, where the actual subscription will be charged once the trial period is over?
Exactly.
So we will have 2 thing while user will subscribe
- Initial membership fee (Onetime) (e.g $10)
- Subscription fee (Recurring) -> Trial period 10 days (e.g $20)
What we want?
When customer input their payment details we won't charge anything but when trial period will end we will charge 10+20=30$ alltogether and on invoice it will show both item.
Before trial end we won't charge Initial member fee. It will be one time charge when first moneht subscription has been paid.
This can be achieved by the recommendation to create the subscription with the trial first, and listen to the webhook event customer.subscription.created to confirm the creation is successful, after that create an invoice.item for the one time fee.
The customer will only be charged when the trial ends.
ah got it. is it possible to do it by Cashier? as when we create the subscription we already get the status if the subscription is created or not. So if created can i add item with that invoice?
would you please share me the reference API?
specially if any Cashier reference for this
Hello, I am not quite familiar with Cashier, but suppose this one? https://laravel.com/docs/8.x/billing
Oh they are wrapper around Stripe's PHP SDK
I am afraid they haven't implemented wrapper for the Invoice Item from our SDK.
You best bet is to use our API directly https://stripe.com/docs/api/invoiceitems/create?lang=php, and file an issue/inquiry to Cashier asking their plan to support it for your convenience