How to load data from GoCardless to MySQL Destination
Learn how to use Airbyte to synchronize your GoCardless data into MySQL Destination within minutes.


Building your pipeline or Using Airbyte
Airbyte is the only open source solution empowering data teams to meet all their growing custom business demands in the new AI era.
- Inconsistent and inaccurate data
- Laborious and expensive
- Brittle and inflexible
- Reliable and accurate
- Extensible and scalable for all your needs
- Deployed and governed your way
Start syncing with Airbyte in 3 easy steps within 10 minutes



Take a virtual tour
Demo video of Airbyte Cloud
Demo video of AI Connector Builder
Setup Complexities simplified!
Simple & Easy to use Interface
Airbyte is built to get out of your way. Our clean, modern interface walks you through setup, so you can go from zero to sync in minutes—without deep technical expertise.
Guided Tour: Assisting you in building connections
Whether you’re setting up your first connection or managing complex syncs, Airbyte’s UI and documentation help you move with confidence. No guesswork. Just clarity.
Airbyte AI Assistant that will act as your sidekick in building your data pipelines in Minutes
Airbyte’s built-in assistant helps you choose sources, set destinations, and configure syncs quickly. It’s like having a data engineer on call—without the overhead.
What sets Airbyte Apart
Modern GenAI Workflows
Move Large Volumes, Fast
An Extensible Open-Source Standard
Full Control & Security
Fully Featured & Integrated
Enterprise Support with SLAs
What our users say

Raman Singh
Predictable, straightforward pricing model that simplified budgeting and significantly reduced overall spend

Chase Zieman

“Airbyte helped us accelerate our progress by years, compared to our competitors. We don’t need to worry about connectors and focus on creating value for our users instead of building infrastructure. That’s priceless. The time and energy saved allows us to disrupt and grow faster.”

Rupak Patel
"With Airbyte, we could just push a few buttons, allow API access, and bring all the data into Google BigQuery. By blending all the different marketing data sources, we can gain valuable insights."
How to Sync to Manually
Begin by familiarizing yourself with the GoCardless API. Review the official GoCardless API documentation to understand the available endpoints, data formats, authentication methods, and rate limits. This will help you determine what data you can extract and how to structure your API requests.
Register for a GoCardless account if you haven't already, and create an API access token. This token is essential for authenticating your API requests. Store this token securely as it grants access to your GoCardless data. Use environment variables or a secure secrets manager to store the token.
Set up your development environment by installing necessary libraries. You will need a library for making HTTP requests and a MySQL database connector. For Python, you might use `requests` for handling HTTP requests and `mysql-connector-python` for MySQL interactions. Install these via pip:
```bash
pip install requests mysql-connector-python
```
Write a script to make HTTP GET requests to the GoCardless API endpoints you are interested in (e.g., customers, payments). Use the access token for authentication. Here is a basic example in Python for fetching a list of payments:
```python
import requests
def fetch_payments():
url = "https://api.gocardless.com/payments"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"GoCardless-Version": "2015-07-06"
}
response = requests.get(url, headers=headers)
return response.json()
payments_data = fetch_payments()
```
After fetching the data, process it as needed. This might involve cleaning, transforming, or filtering the data to match the schema of your MySQL database. Ensure that the data types align with those in your MySQL tables.
Establish a connection to your MySQL database using the appropriate credentials. Ensure your database is set up to receive the data you are planning to insert. Here"s an example of establishing a connection in Python:
```python
import mysql.connector
def connect_to_mysql():
connection = mysql.connector.connect(
host='localhost',
user='your_username',
password='your_password',
database='your_database'
)
return connection
db_connection = connect_to_mysql()
```
With the connection established, write SQL queries to insert the fetched and processed data into your MySQL database. Use prepared statements to prevent SQL injection. Here's a simple example of inserting payment data:
```python
def insert_data_to_mysql(connection, payments_data):
cursor = connection.cursor()
insert_query = ("INSERT INTO payments (id, amount, created_at) "
"VALUES (%s, %s, %s)")
for payment in payments_data['payments']:
data_tuple = (payment['id'], payment['amount'], payment['created_at'])
cursor.execute(insert_query, data_tuple)
connection.commit()
cursor.close()
insert_data_to_mysql(db_connection, payments_data)
```
After inserting the data, ensure to close the connection:
```python
db_connection.close()
```
By following these steps, you can manually transfer data from GoCardless to a MySQL database without relying on third-party connectors or integrations.