#abdhesh-rajput_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/1224661629057110028
đ 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.
- abdhesh-rajput_api, 2 hours ago, 10 messages
- abdhesh-rajput_api, 3 hours ago, 13 messages
hi there! I'm not sure I follow your question. can you clairfy with a concrete example of what you are trying to do exactly?
i need to give free trial for my customer for that i creating subscriptin with trial.
for creating subscription i use setup also getting card details working
now issue is my payment invoices is showing in draft.
what is means of draft here
also there one scenarios i have two type of pricing implementation one time pricing
another one in platform
I added new invoices item for implementation after listing invoices.created on my webhook
now next cycle invoices is showing implementation + platform but i want only platform.
implementation is one time pricing
it looks like you are asking many questions at the same time. let's try to focus on them one by one.
for creating subscription i use setup also getting card details working
if you create a Subscription, then you don't need to create a SetupIntent. you would just use the SetupIntent created by the Subscripton, correct?
now issue is my payment invoices is showing in draft.
Can you share an example of this? For example a Subscription ID (sub_xxx) or Invoice ID (in_xxx)?
this is my invoice id in_1P13fpCz4DYWbcET2o8FYAwW
that's normal. Invoices created by Subscriptions are in Draft status, and then automatically become finalized one hour later
this is to allow you to make some changes to the invoice if needed
expand: ['pending_setup_intent']
i have use this cause i need to create subscriptoin with fee trial
if you don't want that delay, you can always finalize the invoice yourself
ohh there this not a issue right
suppose my implementation amount is
100
and platform amount is 20
so first subscription cycle it is 120 which right
but second subscription cycle why it is again 120
I'm sorry I'm confused. the invoice you shared is for 199$, and everything goes to the main Stripe account.
what do you mean by "implementation amount is 100 and platform amount is 20"
okay sorry for the confusion
this is subscription in which i have
sub_1P13eRCz4DYWbcETvsxLx2JS
one is for $150 another is for $49
150 is one time
49 is reccurring
Next invoice
US$199.00 on 3 Apr
but i want here only recurriing payment of 49
okay i got it. i think it is because every time invoice.created occured i create another invoice_item
i prevent using status changes in my project
case "invoice.created":
const invoiceCreated = event.data.object;
// Then define and call a function to handle the event invoice.created
const subscription_id = invoiceCreated.subscription;
const stripeDetail = await commonDao.getStripeDetail({subscriptionId : subscription_id})
if(stripeDetail){
//creating new invoice list
await stripeHelper.createInvoiceItem({ customer: stripeDetail.customerId, price: stripeDetail.implementationPriceId});
await commonDao.updateStripeDetail(stripeDetail.id)
}
break;
this is code of it
check it on my sub_1P14i0Cz4DYWbcETm4cMzL3J
okay i got it. i think it is because every time invoice.created occured i create another invoice_item
yes possible. looks like you only want to add the invoice item the first time the Subscription is created? in the case you can listen tocustomer.subscription.createdevent.
Thanks for Help @simple scarab
which webhook event is usefull for checking payement deduction ???
what do you mean by" payment deduction"? that the payment was successful?
for Subscription it's invoice.paid
you can learn more about webhooks for subscriptions here: https://stripe.com/docs/billing/subscriptions/webhooks
does they care failure like
1.customer doesn't have enough amount
2.incorrect card entry.
3. Card Expiration
I don't understand your question, sorry. can you clarify?
for Example on customer billing date is 5April
but customer's card get Expired on 4April