Versioning

The Sphere API is versioned so that changes do not break your application. On registration, your application will default to the latest version of the API.

API Versions

By default, requests made with curl use your Sphere application’s default API version unless overrided in requests by setting the Api-Version header.

The schema for your webhook events are tied to the API version of your application. Concequently, excercise caution when you upgrade your API version as all new events will use the new version.

The latest version of the API is v2. We recommend latest version of the API schema, as they are the most stable and secure. To update the API version for your application, visit the Settings page in the Sphere dashboard.

Sample Request

The following is an example curl request to retrieve a customer customer using the v2 API schema:

Sample Versioned Request

curl https://api.spherepay.co/v1/customer/customer_e0a1b00f533546b89b6dded8ae888850 \
  -X GET \
  -H "Authorization: Bearer secret_64db7acf5bbb434aa0a04d82e90b4c99" \
  -H "Api-Version: v2"

Was this page helpful?