#tymm

1 messages ยท Page 1 of 1 (latest)

olive haloBOT
vernal finch
#

You mean you want to manually query the event data through Stripe API?

umbral cradle
#

what im saying is that im experiencing different behavior using the same code when creating a subscription that has a $0 and a non $0 item.

with a non $0 item i would need to retrieve the paymentintent from the Invoice and confirm it manually to complete the transaction and then get a payment_succeeded callback from stripe

however with a $0 item it seems like the process is completed automatically

#

i want to be able to maybe finalize the invoice manually after creating the subscription? so i can control when to receive the payment_succeeded callback

#

or is there any flag that i should put to allow this

vernal finch
#

Sure, you can listen to invoice.created event, and finalize the invoice manually upon receiving this event.

umbral cradle
#

except the invoice is completed automatically right after creating the subscription

vernal finch
#

Maybe can you tell me when you don't want the invoice.payment_succeeded to happen upon a successful subscription creation?

umbral cradle
#

im creating a subscription with an item that costs $0, cancels automatically at the end of period, to simulate a free trial. and we dont ask for payment methods before the trial begins.

#

correct me if im wrong but it seems like whenever a subscription's total amount is $0 it finalizes and completes the payment automatically?

vernal finch
umbral cradle
#

just tried it out, doesnt change that stripe still sends invoice.payment_succeeded callback

#

immediately after creating the subscription

#

was using that callback to insert into my db for things like payment date, payment method etc, but i guess for the trial subscriptions those doesnt matter and i can populate them before hand.... unless u have any other suggestions ๐Ÿ˜‰

#

else we can close this tread