Guide for Invoicing Apps

Got an app that'll help Wix business owners provide invoices? Great! Here's a quick guide on how to get your app ready for the Wix App Market.

Step 1: Set up your app in the Wix Developers Center

  1. Go to the Wix Developers Center and click Get Started.
  2. Click Create New App.
  3. Go through each tab under Build Your App in the side nav and fill out the required info.
  • Extensions: you'll most likely need at least a dashboard page.
  • OAuth: You'll need to fill out all the details on this screen.
  • Permissions: the following permissions are relevant to most dropshipping apps:
  • Wix Stores > Read Orders
  • Wix Bookings > Read Bookings (Including Participants)
  • Wix Payments > Read Transactions

Webhooks: the following webhooks are relevant to most accounting apps: 

App Management

Note: There are also several Paid Plan webhooks available, if your app will have paid plans.

Wix Stores:

Wix Bookings:

Wix Payments:

Step 2: Create a Wix test website

  1. Go to Wix.com and create a website – we recommend one of the online store templates.
  2. Add as much relevant data as possible. We recommend:
    1. Wix Stores and sample products, orders, etc.
    2. Wix Bookings and sample sessions, bookings, etc.
    3. Wix Events and sample events, tickets, orders, etc.
    4. Wix Pricing Plans and sample plans.
  3. Go to the Accept Payments tab and set up Manual payments.

Important:

You don't need to upgrade to a Premium Wix website to test your app or Wix Stores/Bookings – you can use a free site, so long as you follow these steps. To test other payment options, contact us about requesting a Premium coupon.

Step 3: Set up your OAuth flow

To learn how to set up authentication, see Use OAuth for Authenticating Your App.

Step 4: Set up APIs relevant to your app

Now you'll be able to start adding the APIs you'll need for your app. Here's how the process works:

  1. A site visitor purchases a product/service/session/ticket.

Note:

In cases of asynchronous payment method (e.g. PayPal), a payment transaction will be triggered before the product/service/session/ticket order is triggered. When the order is abandoned, there won't be any reference to the order other than the transaction in Wix Payments.

  1. A transaction is created in Wix Payments, and a Payment Event Webhook is triggered. 

Note:

The event type = TRANSACTION_STATUS_CHANGED carries the relevant data for your purposes.

  1. Collect the Payment ID and Wix App ID.
  2. Call the relevant API for more information, when relevant (e.g., Get Order endpoint in Wix Stores).

Product example

Let’s say you use a template like this for your customers:

To fill your template, you’ll need to collect the following data from our APIs:

  1. Customer name, address and phone number: Payment Event Webhook > order > shippingAddress

  2. Date of purchase: Payment Event Webhook > transaction

  3. Purchase line items: Payment Event Webhook > order > items

    Additional info per Wix App:

    1. Wix Stores purchase: Order Created Webhook / Get Order endpoint
    2. Wix Bookings purchase: Booking Notification Webhook / Query Bookings endpoint

Note:

The Booking ID is passed in the Payment Event Webhook as the Wix App Order ID.

Copy
1
3. Wix Events purchase: [List Order](https://dev.wix.com/api/rest/wix-events/wix-events/order/list-order) endpoint

Note:

Filter for the order number – it's passed in the Payment Event Webhook as the Wix App Order ID.

Copy
1
4. Wix Invoices: Not available yet

4. Payment transaction details: Payment Event Webhook > transaction

Things to note:

  • Tax per line item: Not available yet
  • Last 4 digits of CC: Not available yet
  • ID (TZ): Not available yet
  • Payments in instalments: Payment Event Webhook > transaction

Step 5: Test your app

Install the app on your test site and confirm that you get the App Installed Webhook.

Trigger a store order on your site

  • Visit your test site as a site visitor, and add a product in the store to your cart.
  • During checkout, enter test shipping details and select a delivery method. For payment, select Manual Payment (unless you've enabled other payment options).
  • Place the order.
  • Confirm that you get the Order Created Webhook and Payment Event Webhook.

Trigger the return of a product for a refund

  • Enter your test site's dashboard and go to Store Orders.
  • Select the order you placed above and under More Actions, mark it as Paid.
  • Once the order is marked as Paid, under More Actions, select Issue Refund and confirm the refund.
  • Confirm that you get the Payment Event Webhook with refund data.

Test orders with different shipping and payment options

To test payment options other than the basic Manual Payment, contact us about a coupon for a Premium website.

Note:

If you need more info, call the Stores Get Order endpoint, with the order ID from the webhook payload.

Trigger a booking for a class / session on your site

  • Visit your test site as a site visitor, and book a class/session.
  • During checkout, if you've required payment, select Manual Payment (unless you've enabled other payment options).
  • Make the booking.
  • Confirm that you get the Booking Notification Webhook.

Note:

If payment was made, you should get the Payment Event Webhook now, and you can skip to the next step.

  • Enter your test site's dashboard and go to Bookings Calendar.
  • Select the booking you made above and mark it as Paid.
  • Confirm you get the Payment Event Webhook.
  • Call the List Bookings endpoint and filter for the relevant Booking ID.

Note:

The Booking ID is passed in the Payment Event webhook as the Order Item ID.

Trigger an event purchase on your site

  • Visit your test site as a site visitor, and purchase a ticket to an event.
  • During checkout, if you've required payment, select Manual Payment (unless you've enabled other payment options).
  • Place the order.
  • Enter your test site's dashboard and go to Events > Orders.
  • Select the purchase you made above and mark it as Paid.
  • Confirm you get the Payment Event Webhook.

Trigger a pricing plan purchase on your site

  • Visit your test site as a site visitor, and purchase a pricing plan.
  • Confirm you get the Payment Event Webhook.

Remove the app from your test site

Once you've removed the app, confirm that you get the App Removed Webhook.

Step 6: Set up your app's market listing

In the Wix Developers' Center, open your app and complete all the info required under Publish Your App > Market Listing. If you need help with this, follow our market listing guidelines.

Step 7: Submit your app for review

When you're ready, you can submit your app for review. If you haven't already done so, here are some important guidelines and tutorials to check out before you submit your app:

Was this helpful?
Yes
No