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 recurring payments via Direct Debit or take instant, one-off payments through open banking schemes, like the UK's Faster Payments service.
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 to make requests.
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.
| Setting | Value |
|---|---|
| Dashboard | manage-sandbox.gocardless.com |
| API Base URL | https://api-sandbox.gocardless.com/ |
The production environment for taking real payments from customers after your integration is complete.
| Setting | Value |
|---|---|
| Dashboard | manage.gocardless.com |
| API Base URL | https://api.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 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.
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 libraries
| Language | Package |
|---|---|
| Python | gocardless_pro |
| Java | gocardless-pro-java |
| Go | gocardless-pro-go |
| Ruby | gocardless_pro |
| Node.js | gocardless-nodejs |
| PHP | gocardless-pro-php |
| .NET | GoCardless |
| iOS | GoCardlessSDK |
| Android | gocardless-pro-android-sdk |
If you prefer, you can interact with our REST API directly. Include your access token in the Authorization header with the Bearer scheme.
Export your token as an environment variable to use with the cURL examples throughout this guide:
Install and initialise#
Install the library using your package manager, then initialise the client with your sandbox access token.
3. You're ready to go!#
You have now configured your client and are ready to make your first API request.