About the Billing API

The Billing API allows to charge site owners for using your app.

With the Billing API, you can:

  • Retrieve data about a site's previous paid plans for your app.
  • Redirect site owners to the standard Wix checkout page in case you manage your app's pricing page outside of Wix.
  • Ensure that your app's integration with the Custom Charges service plugin works as intended.

See the App Instance API for more information on how to track data that's associated with individual app instances. Learn more about charging customers varying amounts each billing cycle with the Custom Charges service plugin.

Before you begin

It’s important to note the following points before starting to code:

  • Wix allows you to manage your app's pricing page either through Wix or externally. You can display up to 4 different plans for your app on the Wix pricing page.
  • In case you manage your pricing page on your own servers, you can still redirect site owners to the standard Wix checkout page by using Get URL.

Use cases

Terminology

  • App instance: Specific occurrence of your app on a particular Wix site.
  • Paid plan: The site owners have installed a version of your app that isn't free of charge. Your app could charge them a single payment or on a subscription basis.
  • Wix pricing page: Wix offers your app an out-of-the-box pricing page that displays up to 4 plans for your app to site owners.
  • Wix checkout: Wix allows you to charge site owners either through the Wix Billing ecosystem or to manage your app's billing externally. In case you manage your app's pricing page on your own servers, you can still redirect site owners to the standard Wix checkout page by using Get URL.
Did this help?

POST

Get Url


Retrieves the URL for a Wix checkout page for the specified paid plan of your app.

This call succeeds only in case you have previously set up an external pricing page in your app's dashboard.

The returned checkout URL is valid for 48 hours.

This API allows your app to manage your pricing page outside of Wix while still using the standard Wix checkout flow.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Your App
Read site, business, and email details
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/apps/v1/checkout

Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

GET

Get Purchase History


Retrieves a list of the site owner's past purchases for your app.

You don't have to explicitly pass an identifier for the Wix site as part of the request, since this information is taken automatically from the context.

The response doesn't include any details about cancellations.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Your App
Read site, business, and email details
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/apps/v1/checkout/history

Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?