GoCardless
GoCardless is an online payment platform that facilitates payments between parties through online transfers. You can use GoCardless to fetch commercial information (transactions, subscriptions ...) about your users who have an e-commerce business or use GoCardless as a payment service provider.
This provider supports these data types:
- Commerce transaction: to retrieve a list of user's transactions.
- Commerce subscription: to retrieve a list of user's subscriptions.
- Commerce transaction insight: to get an aggregated view of user's transactions
- Commerce subscription insight: to get an aggregated view of user's subscriptions
Connect your GoCardless account
To retrieve commerce data from companies using GoCardless, you have to connect your GoCardless account with Qard. To do that, you'll have to:
- Create a GoCardless account if you already don't have one.
- Connect your account to Qard API using GoCardless credentials (
clientId
&clientSecret
). You also need to provide a booleanisSandbox
to choose between the sandboxed version of your partner app, and the live version. - Test your integration by creating a new synchronization using GoCardless provider.
Create a new account:
- Go to the GoCardless register page and follow the instructions.
- After that, you can go to the https://manage.gocardless.com/developers/partners and create a new app
- Now, you can customize how your business appears to your users by filling out your app name, company logo, app description and your homepage url.
- In the field Redirect URLs you should enter :
https://api.qardfinance.com/callback/gocardless
. - Check the box I agree to the terms of the partner agreement
- And click on Create app button
- Copy Client ID and Client Secret.
- You are set to go !
Link your GoCardless account to Qard API:
1. Update GoCardless provider credentials:
- is_sandbox: The integration mode (sandbox or live)
- client_id: Application client ID
- client_secret: Application client secret
{
"credentials": {
"is_sandbox": false,
"client_id": "GOCARDLESS_CLIENT_ID",
"client_secret": "GOCARDLESS_SECRET_SECRET"
}
}
2. Settings GoCardless provider:
{
"auto_connect": true
}
3. Enable GoCardless provider:
{
"enable": true
}
Test GoCardless integration:
You can test GoCardless integration by creating a new data connection for your user.
{
"requested_data_types": [
"COMMERCE_TRANSACTION",
"COMMERCE_SUBSCRIPTION",
"COMMERCE_TRANSACTION_INSIGHT",
"COMMERCE_SUBSCRIPTION_INSIGHT"
],
"provider_name": "gocardless"
}
After finishing the connecting process by your user, and after validating that the data connection status is CONNECTED, you can run a new synchronization.
{
"data_types": [
"COMMERCE_TRANSACTION",
"COMMERCE_SUBSCRIPTION",
"COMMERCE_TRANSACTION_INSIGHT",
"COMMERCE_SUBSCRIPTION_INSIGHT"
]
}
To verify that you are receiving your user's commerce data, check out these endpoints:
- GET
/api/v6/users/{userId}/commerce-subscriptions
- GET
/api/v6/users/{userId}/commerce-transactions
- GET
/api/v6/users/{userId}/commerce-subscriptions-insight
- GET
/api/v6/users/{userId}/commerce-transactions-insight