Quickstart: your first sale

Create a product, sell it through a checkout element on your site, and hear about each paid order on your server.

This page takes you from an empty workspace to a checkout on your site and a webhook landing on your server. Everything happens in the dashboard; there is no code to write until the last step.

Build it in test mode first. Turn on Test mode at the bottom of the side menu: nothing you do there affects live payments, and buyers do not see it. Checkout elements are published for live mode only, so the install code in step 3 is copied in live mode. See Test mode and live mode.

Before you start

You need a Fungies workspace. To take live payments, your seller application must be accepted; see Store activation. You can do steps 1, 2 and 4 before that.

Step 1: Create a product

Open Products and click Add product, or go straight to dashboard.fungies.io/products/new. The wizard has four steps:

  1. Details. The product type (chosen once), how it is paid for — one time, subscription or usage based — its name, and an optional description.
  2. Stock. What a buyer receives: keys, one per sale, or a file to download. For a type that delivers neither, there is nothing to add.
  3. Offer. What a buyer pays and on what terms. The first offer also sets your workspace's currency: a workspace sells in one currency.
  4. Review. Check everything, then click Publish product to put it on sale. Save as draft keeps it for later instead.

More offers can be added later on the product's own screen.

Step 2: Create a checkout element

A checkout element is the checkout you put on your own site. It sells one or more offers.

Open the Frontends builder, click New element, name it and pick its offers. One subscription is sold on its own; one-time offers can be sold together, but never beside a subscription. Click Create element.

Buyers see the element after it is published from the builder.

Step 3: Put it on your site

In the builder, open the Overlay or Embed tab and click Share Overlay or Share Embed. Pick the offers and copy the install code under Install code into your page.

  • Overlay opens the checkout on top of your page.
  • Embed draws it inside your page.
  • The Hosted tab gives a link to a checkout page on your store's address instead, for a button, an e-mail or a message.

Add the website you embed on under Settings → Checkout → Allowed checkout hosts first: these are the sites that may embed your checkout. Give the exact https origin, such as https://shop.example, with no path. A new host takes effect at your next publish.

Step 4: Hear about each paid order

A paid checkout is not a fulfilled order until your server knows about it.

  1. Open Developers → Webhooks and click Add endpoint.
  2. Give the https address we should call, and pick what it hears about. For a first sale, pick order.paid.
  3. Copy the signing secret when it is shown. It is shown once; use it to check that each call really came from us.
  4. Click Send a test on the endpoint to send a real-looking event, and History to see what we sent and what your server answered.

Grant access when order.paid arrives.

What you have now

A product on sale, a checkout on your site, and a server that hears about payments. From here:

Last updated