Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Poornima Nayar 106 posts 276 karma points MVP 6x c-trib
    Jul 30, 2021 @ 11:17
    Poornima Nayar
    0

    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

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 30, 2021 @ 12:11
    Matt Brailsford
    100

    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

  • Poornima Nayar 106 posts 276 karma points MVP 6x c-trib
    Jul 30, 2021 @ 13:11
    Poornima Nayar
    0

    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

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 30, 2021 @ 13:14
    Matt Brailsford
    1

    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

  • Poornima Nayar 106 posts 276 karma points MVP 6x c-trib
    Jul 30, 2021 @ 13:27
    Poornima Nayar
    0

    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

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jul 30, 2021 @ 13:47
    Matt Brailsford
    1

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies