How to do a GET subscription by email using GraphQL?

Hey Devs!

Who has time to help me define the step-by-step to set up a GraphQL query to fetch customer subscription data by email?

I think it would be the equivalent of making the request to the API below:

/api/rns/pub/subscriptions?customerEmail=XXXXX@gmail.com

Another topic… in the API query above, the subscription validity end always comes back as null. How can I fix this?

      "validity": {
          "begin": "2024-03-11T00:00:00Z",
          "end": null
      },

And last but not least… when the next payment for a subscription is not made, what’s the best way to change the plan status to pending instead of keeping it active since the payment wasn’t completed?

Thanks in advance!

1 Like