Focus on building amazing Direct Debit integrations, not building from scratch
Get a sandbox accountView our developer docsClient libraries for PHP, Java,
Ruby and Python
End-to-end testing in our free sandbox environment
Clean, modern RESTful API built from the ground up.
Use our out-of-the-box payment pages or build your own white labelled pages for a consistent brand experience.
Create and manage one off payments and subscriptions with simple API requests.
Automatic event notifications through webhooks means no need to download and parse reports.
Code example for creating a subscription:
$subscription = $client->subscriptions()->create([
"params" => [
"amount" => 1500, // 15 GBP in pence
"currency" => "GBP",
"interval_unit" => "monthly",
"day_of_month" => "5",
"links" => [
"mandate" => "MD0000XH9A3T4C"
// Mandate ID from the last section
],
"metadata" => [
"subscription_number" => "ABC1234"
]
],
"headers" => [
"Idempotency-Key" => "random_subscription_specific_string"
]
]);
subscription = client.subscriptions.create(
params={
"amount" : 1500, # 15 GBP in pence
"currency" : "GBP",
"interval_unit" : "monthly",
"day_of_month" : "5",
"links": {
"mandate": "MD0000XH9A3T4C"
# Mandate ID from the last section
},
"metadata": {
"subscription_number": "ABC1234"
}
}, headers={
'Idempotency-Key': "random_subscription_specific_string"
})
subscription = client.subscriptions.create(
params: {
amount: 1500, # 15 GBP in pence
currency: 'GBP',
interval_unit: 'monthly',
day_of_month: '5',
links: {
mandate: 'MD0000XH9A3T4C'
# Mandate ID from the last section
},
metadata: {
subscription_number: 'ABC1234'
}
},
headers: {
'Idempotency-Key': 'random_subscription_specific_string'
}
)
public class CreateSubscription {
public static void main(String[] args) {
System.out.println(System.getenv("GC_ACCESS_TOKEN"));
GoCardlessClient client = GoCardlessClient.create(
System.getenv("GC_ACCESS_TOKEN"),
GoCardlessClient.Environment.SANDBOX
);
Subscription subscription = client.subscriptions().create()
.withAmount(1500) // 15 GBP in Pence
.withCurrency("GBP")
.withIntervalUnit(IntervalUnit.MONTHLY)
.withDayOfMonth(5)
.withLinksMandate("MD0000YTKZKY4J")
// Mandate ID from the last section
.withMetadata("subscription_number", "ABC123")
.withIdempotencyKey("random_subscription_specific_string")
.execute();
// Keep hold of this subscription ID - we'll use it in a minute.
// It should look a bit like "SB00003GKMHFFY"
System.out.printf("ID: %s%n", subscription.getId());
}
}
Want to learn more about getting started? Read our reference docs
An API designed to integrate Direct Debit into your business quickly and easily.
A continuously improving, cutting edge online Direct Debit solution.
We handle the complexities of Direct Debit across geographies.

We've worked hard to make building with our API as painless as possible.
Full reference documentation including step by step guides.
Our team of API specialists are available to answer queries as you're building.