Before you start developing for Sage Business Cloud Accounting, make sure you have registered your application, and have access to a Sage Business Cloud Accounting business for testing.

# Set up the Basics

Before you start developing for Sage Business Cloud Accounting, make sure you have the following ready to go.

:::important

* Your **[App Registry account](https://developerselfservice.sageone.com/session/new)** is used to register and manage your application, obtain your client credentials, and configure callback URLs. It is **not** the account used to complete the OAuth2 user grant flow.

* To authenticate successfully, you must sign in as a user who has access to a **[Sage Business Cloud Accounting business](https://app.sbc.sage.com)**. If you have not created a business or do not have access to one, create a **trial business** first.
  :::

## How setup works

The [App Registry account](https://developerselfservice.sageone.com/session/new) and the Sage Business Cloud Accounting business are used for different parts of the setup and authentication flow. A more in depth overview can be found in the [Authenticating guides](../learning/authenticating/authentication).

```mermaid
flowchart TD
    A[Sign up for an App Registry account] --> B[Register your application]
    B --> C[Get client_id and client_secret]
    B --> D[Configure callback URLs]

    E[Create a Sage Accounting trial business] --> F[Sign in as a business user]
    F --> G[Start OAuth user grant flow]

    C --> G
    D --> G

    G --> H[User grants access to the application]
    H --> I[Exchange auth code for access and refresh tokens]
    I --> J[Call the Accounting API]

    K[App Registry credentials] -. not used for OAuth sign-in .-> G
```

### Create a trial business for development

Before you can authenticate and test your integration, create a Sage Business Cloud Accounting trial business in one of the supported regions.

The user who completes the OAuth flow must be a registered user of a Sage Business Cloud Accounting business. If you attempt to authenticate using your Developer Portal login details instead, the flow will fail.

When a user grants access to your application, they are granting access to the business or businesses they can access in Sage Business Cloud Accounting. A business must therefore exist before you can complete the OAuth user grant flow in a meaningful way.

**Common issue** A frequent setup problem is attempting to sign in during OAuth using App Registry credentials.

The credentials required during authentication are the credentials used to access a Sage Business Cloud Accounting business, including a newly created trial business.

If you're unfamiliar with the available Sage Business Cloud Accounting subscription tiers, it's worth reviewing the differences between them before building your integration. Different tiers expose different functionality, and endpoint availability varies by region and variant.

**tip** If you need to create multiple trial businesses for testing, it can be useful to use an email provider that supports aliasing so you can manage multiple environments from a single inbox.

**Note** - To avoid browser conflicts with existing Sage Cookies we recommend opening the trial business links in a new private browser session and to use an email address that is unassociated with a Sage ID. You can check if an email address is associated with a Sage ID by attempting to sign in to [http://account.sso.sage.com/](http://account.sso.sage.com/), if the email is recognised this indicated that an association exists and a different email address should be used. If at any point during the onboarding flow you are asked for payment details you must stop as this will create a subscription which cannot be retrospectively changed to a trial.

**Available trial businesses**

You can create trial businesses for the following supported regions and subscription tiers.

| Region         |                              Information                              |                                    Accounting Start                                    |                                   Accounting Standard                                  |                                     Accounting Plus                                    |
| -------------- | :-------------------------------------------------------------------: | :------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------: |
| United Kingdom | [Details](https://www.sage.com/en-gb/sage-business-cloud/accounting/) | [Sign-up](https://www.sage.com/en-gb/cart/try-3/email/?sku=A0134T_GB\&sagedeveloper=1) | [Sign-up](https://www.sage.com/en-gb/cart/try-3/email/?sku=A0135T_GB\&sagedeveloper=1) | [Sign-up](https://www.sage.com/en-gb/cart/try-3/email/?sku=A0136T_GB\&sagedeveloper=1) |
| Canada         |                        \[Currently Unavailable]                       |                                                                                        |                                                                                        |                                                                                        |
| Ireland        |                        \[Currently Unavailable]                       |                                                                                        |                                                                                        |                                                                                        |

#### Understand variants and endpoint availability

Sage Business Cloud Accounting has [different variants](../learning/key-concepts/differences-between-accounting-and-start) to support different customer needs. These variants should be considered when planning your integration.

Endpoint availability is documented in the API Reference, including which regions and variants are supported for each endpoint.

Check which variant a business is using

When first handling a new connection, it is advisable to establish which subscription the customer is using so your integration can validate compatibility.

To do this, make a GET request to the businesses endpoint, providing the ID of the desired business:
[API Reference](../../../../apis/sagebusinesscloudaccounting/3.1.0/accounting)

```json
GET /businesses/{business_id}
```

Part of the response contains a subscriptions array showing which variant the business is using.

The variants your integration may need to consider include:

| Variant             | Subscription ID | Notes                              |
| :------------------ | :-------------- | :--------------------------------- |
| Start               | START           |                                    |
| Start               | MICRO           | Created via Partner Edition        |
| Accounting Standard | ACCOUNTS        | Businesses created before May 2020 |
| Accounting Standard | ACCOUNTING      | Businesses created after May 2020  |
| Accounting Plus     | ACCOUNTING_10   | Tier available from May 2020       |

```json
   "subscriptions": [
        {
            "created_at": "2024-07-02T13:18:29Z",
            "updated_at": "2026-05-12T10:23:41Z",
            "displayed_as": "Accounting",
            "id": "ACCOUNTING",
            "active": true,
            "status": "paying",
            "accountant_pays": false
        }
    ],
```

Finally, it's good practice to ensure the active property is set to true before proceeding with integration setup. If false, display an error to the user advising that the business isn't active and prevent the connection from continuing.

## Sign up for an App Registry account

This account allows you to register and manage your applications, obtain your client credentials, and specify key details such as callback URLs.

You can sign up [here](https://developerselfservice.sageone.com/) using your GitHub account or an email address. A verification email will be sent from [donotreply@sageone.com](mailto:donotreply@sageone.com) when you sign up, you'll need to ensure this email address is added to your list of email safe senders prior to registering:

[https://developerselfservice.sageone.com/](https://developerselfservice.sageone.com/)

**note** Callback URLs are case sensitive and must exactly match the callback URL passed in your OAuth authorization request.

## Prepare for OAuth

The authentication flow between a 3rd party integration and a Sage Business Cloud Accounting business requires the connecting application to be granted access by a registered user of the business.

When a user grants access to the requesting application, they are providing access to all businesses they currently have access to. The businesses available to that user may change over time as they are added to or removed from businesses.

This is particularly common in accountancy practices.

If your users may have access to multiple businesses, see:

[https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/key-concepts/multi-business](https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/key-concepts/multi-business)
[https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/key-concepts/partner-edition](https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/key-concepts/partner-edition)
Before you start the OAuth flow

Make sure all of the following are true before attempting to authenticate:

* You've read the [https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/authenticating/authentication](https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/authenticating/authentication) and [https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/authenticating/high-level-auth-flow](https://developer.sage.com/accounting/docs/v1.0.0/guides/learning/authenticating/high-level-auth-flow).
* Your application has been registered in the App Registry self-service portal.
* The correct callback URL has been added to your application and matches exactly.
* A Sage Business Cloud Accounting business has been created for testing, and you can sign in successfully and access the dashboard.
* Any optional country filter passed in the authorization request matches the country the business is registered for.

## Common first-time setup mistakes

The most common causes of OAuth setup problems are:

* The callback URL passed in the authorization request does not match a callback URL registered in the app registry.
* The developer attempts to authenticate using Developer Portal credentials instead of a Sage Accounting business user.
* The selected country or region does not match the region of the business being used for authentication.
* The required token request headers have not been set correctly.

If you run into problems, see [OAuth Troubleshooting](../learning/authenticating/oauth-troubleshooting).

## Use Postman to explore the API

When first starting out with the Accounting API, we recommend that you use a client such as Postman to learn and explore.

[https://identity.getpostman.com/signup](https://identity.getpostman.com/signup)
[https://www.getpostman.com/apps](https://www.getpostman.com/apps)

Postman is particularly useful when validating your OAuth flow, exchanging an authorization code for tokens, and testing API requests.

## Store tokens securely

After successfully exchanging an authorization code for access and refresh tokens, store the tokens in a secure location.

The storing and exchanging of tokens can present complications, especially when multiple asynchronous requests may attempt to refresh the same token at the same time.

Implement a suitable strategy to ensure only a single refresh token request is made when required.

If the authorization server has already issued a new set of tokens, any subsequent request containing the now-used refresh token will fail.

## Common reasons for refresh token failure include:

* The refresh token has expired.
* The user has revoked access to the connecting application.
* The refresh token has been used before.
* The refresh token is not the most recent refresh token stored by the auth service.

## Looking to develop for Sage Business Cloud Accounting in South Africa?

The South African version of Sage Business Cloud Accounting is based on a different codebase from the CA, IE, and UK versions.

Available resources for the South African version:

* [https://accounting.sageone.co.za/api/2.0.0](https://accounting.sageone.co.za/api/2.0.0)
* South African Developer Support email: [api@accounting.sageone.co.za](mailto:api@accounting.sageone.co.za)