GoCardless Payment Gateway Integration
GoCardless is a UK-based payment gateway that simplifies bank-to-bank payments, focusing on Direct Debit and Instant Bank Pay solutions. It supports payments in over 30 countries, integrating with schemes like BACS (UK), SEPA (Europe), ACH (US), and others, with fees as low as 1% + £0.20 per transaction. GoCardless offers features like automated recurring payments, intelligent retries (Success+), and open banking capabilities, making it ideal for businesses handling subscriptions, invoices, or one-off payments with minimal admin overhead.
This guide walks you through integrating GoCardless into your application, from account creation to live deployment.
Step 1: Log in or Sign Up
- Visit GoCardless: Go to GoCardless and click Sign Up to create a new account or Log In if you already have one.
- Account Creation: Provide your email, password, and business details (e.g., company name, country). Select a plan (Standard or Pro) based on your needs—Pro is required for API access.
- Email Verification: Check your inbox for a verification email from GoCardless and click the link to activate your account.
- Dashboard Access: Log in to the GoCardless Dashboard at manage.gocardless.com to manage payments, API credentials, and settings. A Sandbox account is available for testing.
Step 2: Set Up Your Account
Before processing payments, configure your GoCardless account:
-
Complete Your Profile:
- In the Dashboard, go to Settings > About Your Business.
- Enter your business details: legal name, address, phone number, and website URL (required for live transactions).
- For individuals, provide personal details instead.
-
Business Verification (Required for Live Mode):
- Navigate to Settings > Verification.
- Submit documents like a business registration certificate, ID, and proof of address (varies by country, e.g., Companies House registration for UK).
- Verification takes 1-2 business days; you’ll be notified via email once approved.
-
Add a Settlement Bank:
- Go to Settings > Payouts.
- Add your bank details (e.g., IBAN for SEPA, sort code/account number for UK) for payouts. GoCardless supports local currency accounts or converts via Wise at real exchange rates.
- A test deposit may verify the account.
-
Sandbox Mode: Use the Sandbox at developer.gocardless.com with test credentials to simulate payments without verification.
Step 3: Obtain API Credentials
GoCardless provides credentials for integration:
- Access Token: A key for authenticating API requests (e.g.,
live_abc123xyz
orsandbox_xyz789abc
). - Test vs. Live: Sandbox Access Token is available immediately; live Access Token requires verification.
How to Get Your Credentials:
- Log in to the GoCardless Dashboard.
- Go to Developers > API Access.
- Generate an Access Token:
- Click Create Access Token, name it (e.g., "MyApp"), and copy the token.
- Sandbox tokens are prefixed with
sandbox_
, live tokens withlive_
.
- Key Security: Keep the Access Token confidential—use it only in server-side code. Store it securely.
- Add this to your application’s Admin Panel under System Settings > Payment Gateways > GoCardless.
Step 4: Configure Payment Methods
GoCardless supports bank payment methods, activated based on your region:
- Go to Settings > Payment Schemes in the Dashboard.
- Available methods include:
- Direct Debit: BACS (UK), SEPA (Europe), ACH (US), BECS (Australia), etc. (enabled by default).
- Instant Bank Pay: Open banking for one-off payments (UK/Europe, requires opt-in).
- Contact support@gocardless.com to enable additional schemes or currencies (e.g., USD, AUD).
- These methods will appear in your checkout flow once integrated.
Step 5: Set Up Webhooks
Webhooks notify your server of payment events (e.g., payment success):
- In the Dashboard, go to Developers > Webhooks.
- Click Create Webhook Endpoint.
- Webhook URL:
- Enter the URL from your application (e.g.,
https://yourwebsite.com/webhooks/gocardless
). - Find this URL in your Admin Panel under GoCardless settings.
- Ensure your endpoint accepts POST requests and returns a 200 OK response.
- Enter the URL from your application (e.g.,
- Events: Subscribe to events like:
payment.created
: Payment initiated.payment.paid_out
: Funds settled.payment.failed
: Payment failed.
- Save the webhook. GoCardless signs notifications with a secret (generated during setup) for verification.
- Testing: Use the Sandbox to send test webhooks and confirm receipt.
Step 6: Set Up Credentials in Our Dashboard
Integrate GoCardless into your application:
- Log in to your application’s Admin Panel.
- Navigate to System Settings > Payment Gateways > GoCardless.
- Fill out the configuration form:
-
Detailed Fields:
- Supported Currencies: Select currencies enabled on your GoCardless account (e.g., GBP, EUR, USD, AUD). Contact support for additional currencies.
- Active: Toggle “On” to enable GoCardless payments.
- Live Mode: Toggle “Off” for Sandbox, “On” for live transactions.
- Access Token: Enter your Sandbox or Live Access Token (e.g.,
sandbox_xyz789abc
orlive_abc123xyz
). - Webhook URL: Copy this URL and paste it into the GoCardless Dashboard’s webhook settings.
- Minimum Amount: Set a floor (e.g., £1.00) to avoid small transactions.
- Maximum Amount: Set a ceiling (e.g., £10,000) based on your needs.
- Fixed Charge: Add a flat fee (e.g., £0.50) per transaction, if applicable.
- Percentage Charge: Add a percentage fee (e.g., 1%) on top of GoCardless’ fees (1% + £0.20, capped at £4).
-
Click Submit to save. Your GoCardless gateway is now configured.
Step 7: Test the Integration
Test your setup in Sandbox Mode:
- Enable Sandbox Mode:
- Sign up at developer.gocardless.com for a Sandbox account.
- In your Admin Panel, ensure Live Mode is off and use the Sandbox Access Token.
- Simulate Payments:
- Use test bank details from GoCardless Testing Guide:
- UK BACS: Sort code
20-00-00
, account55779911
. - SEPA: IBAN
DE89370400440532013000
.
- UK BACS: Sort code
- Test Instant Bank Pay with Sandbox flows.
- Use test bank details from GoCardless Testing Guide:
- Verify Webhooks:
- Check your server logs for webhook events (e.g.,
payment.paid_out
). - Ensure payment statuses update in your Admin Panel (e.g., “Paid,” “Pending”).
- Check your server logs for webhook events (e.g.,
- Debugging: If issues arise, check the Sandbox Dashboard’s Payments tab for error details (e.g., “Invalid Bank Details”).
Step 8: Enable Live Mode
After successful testing:
- GoCardless Dashboard:
- Ensure your account is verified and ready for live transactions.
- Log in to manage.gocardless.com.
- Admin Panel:
- Go to System Settings > Payment Gateways > GoCardless.
- Toggle Live Mode to “On”.
- Replace the Sandbox Access Token with the Live Access Token.
- Save the changes.
- Webhook Confirmation: Verify the webhook URL is set in the live Dashboard.
Step 9: Go Live
Launch your GoCardless integration:
- Start Accepting Payments:
- Customers can now pay via Direct Debit or Instant Bank Pay at checkout.
- Monitor initial transactions for issues.
- Live Verification:
- In the GoCardless Dashboard, go to Payments to track transactions in real-time.
- Confirm payouts to your bank account (5-7 business days for Direct Debit, instant for Instant Bank Pay).
- Troubleshooting:
- If payments fail, review error logs in the Dashboard or contact support@gocardless.com.
- Ensure your webhook endpoint remains active.
Additional Tips
- GoCardless Fees: 1% + £0.20 per transaction (capped at £4) for UK; 2% + £0.20 for international (with FX via Wise). No setup or monthly fees. See pricing.
- Documentation: Explore the GoCardless Developer Docs for advanced features like Success+ retries or mandate management.
- Support: Contact support@gocardless.com or use the Dashboard’s live chat for assistance.
Note:
If you need further help, our support team is available 24/7. Reach out at softivus@gmail.com or through the Admin Panel. Let’s streamline your payments with GoCardless!