Post purchase extensions backend

Post purchase extensions backend

rincewind333
Visitor
1 0 0

Hi, might be a silly question but I couldn't find verification of this anywhere. Do post purchase extensions support  server side backends? Either hosted by shopify or in my own cloud like with a normal shopify app? Since the extension seems to be hosted using the app bridge it seemed like it might not support a backend concept. Basically we want to create a post purchase page to allow the customer to opt in to a certain service after the order and need to make an external api call with some basic customer information, either straight to an external api or to an app backend which could then make the api call. I was figuring CORS would block any non shopify api call. Just want to verify if it is at all possible to somehow have an associated backend and what the best way is. Thanks.

Reply 1 (1)

tobebuilds
Shopify Partner
414 28 110

Yeah, you can query your own backend in a post-purchase extension.

 

"I was figuring CORS would block any non shopify api call"

That's not exactly how CORS works. It's up to the server owner (you) to add an `access-control-allow-origin` header to your API responses.

Founder, Regios Discounts app (4.9 stars)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer