# Set Up

Source: https://docs.gocardless.com/docs/getting-started/set-up

# Set up

This guide covers all the essential steps to prepare for your integration with the GoCardless API. You'll learn the basics of the API, create a sandbox account, and configure your client to make requests.

## Overview

The GoCardless API makes it easy to collect bank payments from your customers' bank accounts. With one integration, you can collect payments from the UK, Eurozone, Sweden, Denmark, Australia, New Zealand, Canada, and the United States.

Our API has two main functions:

  
#### [Collect payments](/docs/collect-payments)

Collect recurring payments via Direct Debit or take instant, one-off payments through open
    banking schemes, like the UK's Faster Payments service.

  
#### [Send payments](/docs/send-money)

Send secure payouts to customers, suppliers, or third parties from a funded payment account.
    Payments use instant payment rails where available and include security checks like Confirmation
    of Payee.

We also have a range of developer tools to help you with your integration. The rest of this guide will focus on using one of our [client libraries](/docs/developer-resources/client-libraries) to make requests.

> **Tip: Other ways to get started**
> - The GoCardless [Postman collection](/docs/developer-resources/postman-collection) is available to try out our APIs.
> - The [GoCardless CLI](/docs/developer-resources/gc-cli) is a developer tool to help you build, test and manage your integration directly from your terminal.

## Step-by-step guide

### 1. Get your sandbox access token

GoCardless has two environments: a free **Sandbox** for testing and **Live** for processing real payments. Each environment is completely separate, with its own account, dashboard, access tokens, and API URLs.

For this guide, we will only use the Sandbox environment.

          A dedicated testing environment to build your integration without moving real money.
          SettingValueDashboardmanage-sandbox.gocardless.comAPI Base URLhttps://api-sandbox.gocardless.com/),
    },
    ,
  ]}
/>

To start, you will need a read-write access token from your Sandbox account.

- [ ] **Sign up for a Sandbox account**: Create one in
      [Sandbox](https://manage-sandbox.gocardless.com/sign-up) if you
      haven't already.
- [ ] **Create an access token**: In your Sandbox dashboard, go to the **Developers** tab and select **Create access token**. Give your token a name and choose **Read-Write** access.
- [ ] **Copy your token**: Click the **Copy** button and save the token somewhere safe. For security, you will not be able to view it again.

> **Warning: Keep your token safe**
> Your access token grants full API access. Never commit it to source control or share it publicly.
>   Store it in an environment variable or a secrets manager.

### 2. Set up your client

Now it's time to set up your application to communicate with the GoCardless API. You have two options:

          Our client libraries handle boilerplate code, authentication, and request signing for
            you. We recommend using a library if one is available for your language.
          Official librariesLanguagePackagePythongocardless_proJavagocardless-pro-java
                  Gogocardless-pro-goRubygocardless_proNode.jsgocardless-nodejsPHPgocardless-pro-php.NETGoCardlessiOSGoCardlessSDKAndroidgocardless-pro-android-sdk
                  ),
    },
    ),
    },
  ]}
/>

#### Install and initialise

Install the library using your package manager, then initialise the client with your sandbox access token.

```python
pip install gocardless_pro
```

```java

com.gocardlessgocardless-proLATEST```

```go
go get github.com/gocardless/gocardless-pro-go/v6
```

```ruby
gem install gocardless_pro
```

```nodejs
npm install gocardless-nodejs
```

```php
composer require gocardless/gocardless-pro
```

```net
dotnet add package GoCardless
```

```python
import os

client = gocardless_pro.Client(
access_token=os.environ["GC_ACCESS_TOKEN"],
environment="sandbox"
)
```

```java
import com.gocardless.GoCardlessClient;

GoCardlessClient client = GoCardlessClient
.newBuilder(System.getenv("GC_ACCESS_TOKEN"))
.withEnvironment(GoCardlessClient.Environment.SANDBOX)
.build();
```

```go
import gocardless "github.com/gocardless/gocardless-pro-go/v6"

accessToken := os.Getenv("GC_ACCESS_TOKEN")
client, err := gocardless.New(accessToken, gocardless.WithEndpoint(gocardless.SandboxEndpoint))
```

```ruby
require "gocardless_pro"

client = GoCardlessPro::Client.new(
access_token: ENV["GC_ACCESS_TOKEN"],
environment: :sandbox
)
```

```nodejs
const gocardless = require("gocardless-nodejs");
const constants = require("gocardless-nodejs/constants");

const client = gocardless(
process.env.GC_ACCESS_TOKEN,
constants.Environments.Sandbox
);
```

```php
<?php
require "vendor/autoload.php";

$client = new \\GoCardlessPro\\Client([
"access_token" => getenv("GC_ACCESS_TOKEN"),
"environment" => \\GoCardlessPro\\Environment::SANDBOX,
]);
```

```net
using GoCardless;

var client = GoCardlessClient.Create(
Environment.GetEnvironmentVariable("GC_ACCESS_TOKEN"),
GoCardlessClient.Environment.SANDBOX
);
```

```curl
export GC_ACCESS_TOKEN="your_access_token_here"

# Example: list customers

curl -H "Authorization: Bearer $GC_ACCESS_TOKEN" \\
-H "GoCardless-Version: 2015-07-06" \\
https://api-sandbox.gocardless.com/customers
```

### 3. You're ready to go!

You have now configured your client and are ready to make your first API request.

## Next steps

  
#### [Send your first API request](/docs/getting-started/send-your-first-api-request)

Create and collect your first test payment authorisation.

  
#### [Create a payment](/docs/getting-started/create-a-payment)

Understand payment types, Billing Requests, and how bank-to-bank payments work.