How to get updated member data from Memberstack after creating Stripe customers in a custom checkout?
I've created a custom Checkout page for my website which creates the stripe customer first and then request the backend for the payment Intent.
It was working fine for a long time as after creating the customer in stripe we could call
window.$memberstackDom.updateMemberAuth({}) (doesn't work without a parameter now)
or
window.$memberstackDom.getCurrentMember() (doesn't work now)
to get the updated member data. For now, both of the methods doesn't seem to work as it is taking too much time to sync with stripe or is there any other issue underneath?
Comments
3 comments
Hi Hafif,
Thanks for reaching out and for the detailed explanation of your setup.
At this time, nothing has changed on the Memberstack side with regard to how member data is synced or returned on the client.
It’s important to note that methods like
getCurrentMember()andupdateMemberAuth()return the current client-side authentication state and do not guarantee an immediate refresh of member data following server-side updates, including actions involving Stripe. Updates such as Stripe customer creation are processed asynchronously, so there may be a short delay before those changes are reflected on the client.Because of this, relying on an immediate client-side update right after creating a Stripe customer may lead to inconsistent results. In many cases, the updated member data becomes available on the next authenticated fetch, such as after a page reload, route change, or re-authentication.
If your flow depends on confirming Stripe customer creation immediately, we recommend handling that verification on your backend or allowing a brief delay before attempting to access the updated member data on the client.
If you’re able to, please share the URL where this occurs and a Loom video showing the behavior. Alternatively, you can submit these details through our support form, and a member of our team will follow up with you: https://docs.memberstack.com/hc/en-us/requests/new
Hey Chukwudi,
Thanks for the detailed response. Is it possible to get it in backend through memberstack admin api or would it be delayed to sync?
Hi Hafif,
I’m not sure exactly what customer information you’re looking to get, but ideally backend requests reflect the most current server-side state. Using the Admin REST API is the recommended approach if you need to verify member data immediately after updates like Stripe customer creation. You can find the API documentation here: https://developers.memberstack.com/admin-rest-api/member-actions
I hope this helps.
Please sign in to leave a comment.