This is a guest post by Michael Herman, co-founder of Real Python.

Simple Goods is on a mission to change how buyers pay for goods. Their services allow a seller to sell anything, anywhere, without a shopping cart. On the other side of the equation, a buyer does not have to deal with entering unnecessary info in order to buy a product. As an avid user of Simple Goods from the selling end, Zapier’s powerful integrations provide the added support I need to fully track customers and sales from beginning to end.

Note: you can also check out the video version of this post on YouTube.

Webhooks

Although Simple Goods does not have a public API yet, they do support webhooks (instant payment notifications) which currently are available with the Grow plan.

After each successful transaction, a notification is sent, providing the following data via a JSON payload:

400: Invalid request

Setup

Let’s look at how to integrate Simple Goods and Zapier to POST new data to MySQL every time a new transaction occurs from Simple Goods.

  1. Create a new Zap to integrate a webhook with MySQL:

    Zapier Zap

    Once you click Continue, you will be presented with the webhook URL. Copy this URL.

  2. Next login to your Simple Goods account and go to Settings. Then paste your Zapier webhook URL into the Webhook URL input. Save your changes.

    Webhook settings

    Note: Webhooks / Instant Payment Notifications require a subscription to the Grow plan.

  3. Back on Zapier, setup your MySQL database and select a table. Make sure your table is already created before you select the database. If you wanted to capture the buyerEmail, purchaseDate, price, total, and productName fields, your CREATE TABLE statement would look like this:

    400: Invalid request
    

    Now select both the database you wish to use as well as the table.

  4. Before you can map the keys from the JSON payload to the fields in the table, you need to push a sale through so that Zapier can see the data it has to work with. I would suggest using the 'Send Test' button next the Webhook URL field.

  5. After you push a sale through, you can map the keys to the fields:

    zapper setup

  6. Finally, enable the zap to make it live. Then push through another dummy transaction from Simple Goods to ensure that the integration works:

    sql sample

    Boom! Now you can easily track sales. I use this very integration to manage user registration and authentication.

Have fun!

This is just one integration. There’s so many more services that Zapier is connected with that you could use with Simple Goods such as Salesforce, Google Spreadsheets, MailChimp, and so forth. Be sure to share any integrations you come up with in the comments below. Cheers!