gocardless-pro-php

Official GoCardless Pro PHP client for Direct Debit payments and the GoCardless API.

SDK
Composer
v8.0.6
103stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
86/100Excellent
Development Activity96
Maintenance96
Community80
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture78
Code Quality76
Innovation76
Learning Curve78

gocardless-pro is the official PHP client library for the GoCardless Pro API, the platform for collecting recurring and one-off Direct Debit payments. It exposes every GoCardless resource - customers, mandates, payments, subscriptions, payouts, refunds, and more - through service objects with consistent list, get, create, and update methods.

The client handles authentication, sandbox versus live environments, pagination, idempotency, and webhook signature verification, so PHP applications can integrate bank-to-bank payments without dealing with raw HTTP.

What You Get

  • A configured GoCardlessPro\Client with sandbox and live environment switching
  • Service accessors for every GoCardless resource (customers, mandates, payments, subscriptions, payouts)
  • Consistent list/get/create/update methods returning typed resource objects
  • Built-in pagination via ListResponse records and cursor helpers
  • Idempotency-key support and webhook signature verification helpers

Common Use Cases

  • Collecting recurring Direct Debit subscription payments
  • Setting up customer bank mandates and one-off payments
  • Reconciling payouts and refunds from a PHP backend
  • Verifying and processing GoCardless webhook events

Under The Hood

Architecture - A GoCardlessPro\Client (lib/Client.php) builds an internal API client and lazily instantiates per-resource service objects under lib/Services, each backed by shared request/response and pagination machinery in lib/Core; resources under lib/Resources model the typed entities returned by the API. Tech Stack - PHP client built on Guzzle for HTTP, using CircleCI for continuous integration and PHPUnit for its test suite, organized under a PSR-4 GoCardlessPro namespace. Code Quality - The library ships an extensive tests/ tree (Core, Integration, Resources, Support, and JSON fixtures) that exercises services against recorded responses, giving good coverage of the generated service layer. API Design - The $client->customers()->list() / ->get($id) / ->create([...]) pattern is uniform across every resource, with an options array as the final argument for URL params and idempotency, making the surface predictable once one resource is learned.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search