Can't integrate "appPurchaseOneTimeCreate" in my app. Please help!

Hi there,

I am trying to set up the Billing API for my app. However i am getting this error message “e.subscribe is not a function”. I have attached a screenshot

Anyone has faced such error before? Perhaps i am missing something

Thank you in advance!

1 Like

Hey @Kevin_Cheng, this looks like it may be a JavaScript implementation error in your app code rather than an issue with the Shopify Billing API itself.

I’d recommend comparing your implementation against the working code examples in the appPurchaseOneTimeCreate mutation reference. That page has examples in React Router, Node.js, and other frameworks showing the correct response handling pattern.

Hey @Kevin_Cheng, Are you still experiencing this issue, or can I mark this as solved?

Hi Kyle,

Thank you for the message, I am still in the midst of resolving it. Let me share an update by the end of today. Thank you!

1 Like

Hi Kyle,

I was able to integrate the Billing API, and it successfully redirects users to the payment page for approval. However, after approval, it redirects them back to the authentication login page. I’ve tried several fixes (e.g. redirecting back to app) but haven’t had any luck. Do you happen to have a solution for this?

Hey Kevin, can you share a little more about your current setup? Is your app embedded using app bridge?

This guide here may help to see how to handle authenticated routes within the admin: Admin

Hi Kyle, I managed to resolve it using the link you sent.

I was missing redirect from authentication and target _parent.

Appreciate your help!!

Thanks for letting me know. Glad that helped!