#wendel_api

1 messages ¡ Page 1 of 1 (latest)

lyric finchBOT
#

👋 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/1301054093472694312

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

raw rose
#

Hi there, can you tell me the problem that you are trying to solve?

ornate panther
#

My API is not triggering the create_invoice_item so I figured it was because when I create the subscription the invoice is already marked as paid (total $0 because of the 14 days free trial)

#

I want to know if I create the subscription with the collection_method set to send_invoice or the payment_behavior set to default_incomplete would make it possible to add the one time licencing fee to the invoice of the subscription?

raw rose
#

Ok, you question is why you didn't receive a invoice.created webhook event for the first invoice that subscription generates?

ornate panther
#

No, I try to create a invoice item right after creating the subscription:
stripe.InvoiceItem.create(
price=licencing_fee_id,
customer=customer_id
)

#

but it doesn't work, it does not even show in the logs

raw rose
#

And where you want this invoice item to appear? the first invoice?

ornate panther
#

the first invoice of the subscription that I just created

raw rose
#

Did you receive an error after running the code? If you don't see the request in your Dashboard logs then it's most likely the request didn't succeed

ornate panther
#

For context: I want my customer to have 14 days of free trial, after the free trial I charge the subscription price and the licencing fee

raw rose
#

Ok. But let's confirm if the stripe.InvoiceItem.create succeed

ornate panther
#

will it create/succed if the customer does not have a next invoice? (if all invoices are paid)

raw rose
#

It will, I'd recommend you to put some logs in your app and print out any errors/exceptions

ornate panther
#

it creates a Pending invoice item, will this be included in the next invoice? the customer now only have a invoice marked as paid (total $0 because it just started the free trial)

#

yes, it worked, thanks!