#nizar.nasani

1 messages · Page 1 of 1 (latest)

cinder vergeBOT
#

Hello! We'll be with you shortly. 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.

sturdy solstice
#

hi there!

#

are you creating the Subscription with Chekcout Session or the Payment Element?

quaint shoal
#

I'm creating subscription using subscription service

#

I'm not using Chekcout Session nor the Payment Intent

sturdy solstice
#

it will trigger paymentintent.success which i can't retrieve the subscription id
If it's a payment for a Subscripton, then the PaymentIntent obejct will have an invoice property, and the Invoice will contain the subscription.

#

I'm not using Chekcout Session nor the Payment Intent
so what are you using exactly to create the Subscription?

quaint shoal
#

I'm creating the subscription before creating the payment element

sturdy solstice
#

yes that's expected

quaint shoal
sturdy solstice
#

did my previous message answer your question?

If it's a payment for a Subscripton, then the PaymentIntent object will have an invoice property, and the Invoice will contain the subscription.

quaint shoal
#

that is how

#

yes I can see that

#

could you check my other question?

sturdy solstice
#

another question, I'm creating the subscription whether the customer is completing the payment or not, I idea how can I delete that subscription if it doesn't change status to Active ?
you can't delete a Subscription, but you can cancel one if needed: https://stripe.com/docs/api/subscriptions/cancel

quaint shoal
#

is there a way to know that the client left the subscription and won't pay so I can cancel it

sturdy solstice
#

if they didn't pay, the subscription will be in incomplete status, then 24 hours later will automatically move in incomplete_expired status. so there's nothing really to do on your end.

quaint shoal
#

that's great thank you

sturdy solstice
#

happy to help 🙂

quaint shoal
#

one mre question

#

I can't seem to retrieve the meta data in the event paymentIntent.success

#

because I added those to the subscription options

sturdy solstice
#

then you need to check the metadata on the Susbcription itself, not the PaymentIntent

quaint shoal
#

yes but in the subscrption event I'm getting the error I mentioned above

sturdy solstice
#

which error?

quaint shoal
#

the invoice property is coming as null, any idea why?

sturdy solstice
#

can you share an Event ID (evt_xxx) with this issue?

quaint shoal
quaint shoal
sturdy solstice
#

the invoice property is coming as null, any idea why?
the event you shared is for an Invoice, so what do you mean by "null"?

#

I see the full Invoice object in the payload of the event you just shared

quaint shoal
#

I'm using c# plugin and the invoice is coming as null

sturdy solstice
#

can you share the Event ID (evt_xxx) with this issue?

#

you didn't share a payment_intent.succeeded event earlier

quaint shoal
#

there you go evt_3Oh9GAD0qVXB4Jcz1o95TKrp

#

I'm gettng the invoice Id in the payment intent object but not the invoice object

#

id there a way to check the event that the subscription status is active and then I can schedule a subscription to change the price?

sturdy solstice
#

I do see "invoice": "in_1Oh9GAD0qVXB4Jcz4NbGlEsA" in the payload

quaint shoal
#

yes you can

sturdy solstice
#

and then it's up to you to retrieve the full Invoice object

quaint shoal
#

is there an include syntax I'm missing?

#

why is it coming as null

sturdy solstice
#

that's how Stripe works: you just get the ID, and then you need to make an extra API call to retrieve the full obejct if needed

sturdy solstice
#

id there a way to check the event that the subscription status is active and then I can schedule a subscription to change the price?
Sure: retrieve the corresponding Subscription and check it's status

quaint shoal
#

in which subsciption event ?

sturdy solstice
#

that's up to you. maybe customer.subscription.udpated or invoice.paid

quaint shoal
#

okay thank you

#

really appreciate your patience