Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Get URL

The Wix Billing API enables your app to lead customers seamlessly into Wix's checkout process from your platform (e.g., hosting your app's pricing page independently and redirecting to Wix checkout for purchase). The returned checkout link is valid for 48 hours. Note: Use of this functionality is dependent on setup in the Wix Developers Center.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Your App permission scope.

POST

https://www.wixapis.com/apps/v1/checkout

Body Params

NAME
TYPE
DESCRIPTION
testCheckout

boolean

Whether this checkout is for testing purposes only (relevant only for in-app purchases). When true, the price charged will be 0.00

billingCycle

string

Supported values: NO_CYCLE, MONTHLY, YEARLY, ONE_TIME.

Billing cycle (MONTHLY/YEARLY/ONE_TIME).

languageCode

string

ISO-639-1. Defaults to "en"

countryCode

string

ISO-3166-1 alpha-2. Defaults to "US"

successUrl

string

URL to redirect user to after a successful purchase.

productId

string

Product to bill the user for (details taken from Developers Center).

Response Object

NAME
TYPE
DESCRIPTION
checkoutUrl

string

Wix checkout URL based on the parameters in the request

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl -X POST \
2 https://www.wixapis.com/apps/v1/checkout \
3 -H 'Authorization: <AUTH>' \
4 -H 'Content-Type: application/json' \
5 -d '{
6 "productId": "e8f429d4-0a6a-468f-8044-87f519a53202",
7 "billingCycle": "MONTHLY"
8 }'

Response

json

1
2{"checkoutUrl": "https://www.wix.com/apps/upgrade/order-checkout?token=JWS.eyJraWQiOiJaUnliMG5pbCIsImFsZyI6IkhTMjU2In0.eyJkYXRhIjoie1wib3JkZXJJdGVtc1wiOlt7XCJwcm9kdWN0SWRdIjpcImIwZjgwOGMzLWM4YmUtNGNkYS1iNmQyLTc0YTExNTM2ZDdiZFwiLFwicXVhbnRpdHlcIjoxLFwicGF5bWVudEN5Y2xlXCI6XCJNT05USExZXCIsXCJkaXNwbGF5TmFtZVwiOlwiXCIsXCJjb3Vwb25Db2RlXCI6bnVsbCxcImJpbGxpbmdTZXJ2aWNlSWRcIjpudWxsLFwib3ZlcnJpZGVQcmljZVwiOlwiOC4wXCIsXCJleHRlcm5hbE9yZGVySXRlbUlkXCI6XCJMaW5lSXRlbV8wXCJ9XSxcInN1Y2Nlc3NVcmxcIjpcImh0dHBzOi8vd3d3LndpeC5jb20vYXBwcy91cGdyYWRlL29yZGVyLXJlc3VsdFwiLFwid2l4VXNlckd1aWRcIjpudWxsLFwidXNlckVtYWlsXCI6bnVsbCxcImxhbmd1YWdlQ29kZVwiOlwiZW5cIixcImN1cnJlbmN5Q29kZVwiOlwiVVNEXCIsXCJvcmRlclBhcmFtc1wiOntcInNpdGVHdWlkXCI6XCIxMTE0MjExNC0yZDExLTRkNzYtOWEzZS0zZjUzMzBiNjBhYzdcIn0sXCJldmVudEFnZ3JlZ2F0b3JcIjpcImYzNGY1MGE4LTc3ZDMtNDE1Ny1iM2Q3LTZiMDJkYzI2ODQ1NlwiLFwiaW5pdGlhdG9yXCI6XCJBcHAgTWFya2V0IFRQQSBBUElcIixcImNvdXBvbkRpc3BsYXlOYW1lXCI6bnVsbH0iLCJpYXQiOjE1NzQ1OTAyMDcsImV4cCI6MTU3NDc2MzAwN30.quYK2ND5tCTsaRPlQA5349ULQoWUwkdPzQEwcQhqc9s&appId=5bc2068d-010b-448c-a62a-d6bb269c5a4c&planId=e8f429d4-0a6a-468f-8044-87f519a53202"}