Unfortunately no it won't because the subscription isn't created until payment is made. Until then, it's just an intent. That's why the ID is only stored within the ProcessCallback method as this is what gets notified via webhook to say the subscription has been created.
Thanks for the information. So if I want to know the subscription ids of all orders processed in the last 24hrs (the first payment is taken straight away) I need to use one of the Vendr services is that right?
Well, I don't think we have anything that can query the custom properties so your choices are, search for all orders placed in the last 24 hours which can be done via the API and then filter it, or write a custom SQL query to find order ids placed in the last 24 hours with a stripe subscription ID property on them.
Stripe Subscription Id
Hi Matt,
Is there any way we can get the subscription id of the stripe subscription that has been created with Stripe and store that in the order config?
Poornima
Hey Poornima,
It should already get assigned as an order property https://github.com/vendrhub/vendr-payment-provider-stripe/blob/dev/src/Vendr.PaymentProviders.Stripe/StripeCheckoutPaymentProvider.cs#L368
To show it in the back office, you’ll need to add it to the order editor config as an additional info entry https://vendr.net/docs/core/1.8.0/key-concepts/order-editor-config/#additional-info-config-options
Matt
Hi Matt,
Thanks for this. So the stripe subscription id , will it be available on the confirmation page (say for example) as a part of the order?
Poornima
Hi Poornima,
Unfortunately no it won't because the subscription isn't created until payment is made. Until then, it's just an intent. That's why the ID is only stored within the ProcessCallback method as this is what gets notified via webhook to say the subscription has been created.
Hope that helps
Matt
Hi Matt,
Thanks for the information. So if I want to know the subscription ids of all orders processed in the last 24hrs (the first payment is taken straight away) I need to use one of the Vendr services is that right?
Poornima
Well, I don't think we have anything that can query the custom properties so your choices are, search for all orders placed in the last 24 hours which can be done via the API and then filter it, or write a custom SQL query to find order ids placed in the last 24 hours with a stripe subscription ID property on them.
The later would be a bit more efficient.
Hope that helps
Matt
is working on a reply...