Printful Integration

I am trying to integrate Printful, Snipcart, and my Hugo site, but I’m finding it difficult to grasp how to design it. I have seen Snipcart’s examples of integrating with Hugo, but nothing with Printful’s API.

When someone orders an item from my Hugo site, I know I need to use Snipcart to notify a webhook URL which will receive the order.completed payload and submit the order to Printful. The problem I have is that I don’t know what my webhook URL should be (i.e., a JS file, TS file, HTML?) and I’m not too sure how to write the code to submit the order anyway. Fortunately, I have seen examples of a TS file that is the webhook URL, but it uses Next.js api routes and I don’t see a similar approach with Hugo.

Anyone have ideas on how a solution might work?

How about linking what you are trying to integrate?

As much as I know about Snipcart I am pretty sure that is not a problem with Hugo, but with your javascripts. You probably should start by doing a google search for “snipcart hugo” and then add whatever printful is. There are plenty of snipcart-hugo integrations, but Hugo does only your markup, not the whole integration to any webhooks you might call via Javascript.

Your question is not quite relevant to Hugo, since you only need to integrate Snipcart as documented on their site.

The integration between Snipcart and Printful is something else and you need to ask at their respective support channels. Also a casual Google search wielded this integration.

Personally I have found Snipcart support to be very responsive, try asking at their forum or contact them via email. Also read the Printful Orders API documentation.

This topic was automatically closed after 36 hours. New replies are no longer allowed.