Payment mandates¶
Payment mandates authorize direct debit collection from a customer. The Company API supports three mandate families: classic SEPA mandates, GoCardless mandates, and the newer Pennylane Pro Account mandates, along with a migration path from the first two into Pro Account.
SepaMandates ($client->sepaMandates)¶
Manage SEPA direct debit mandates.
| Method | HTTP | Scope | Description |
|---|---|---|---|
list($cursor = null, $limit = null, $filter = null, $sort = null) |
GET /sepa_mandates |
customer_mandates:all or customer_mandates:readonly |
List SEPA mandates. |
create($bic, $iban, $signedAt, $identifier, $customerId, $bank = null, $sequenceType = null) |
POST /sepa_mandates |
customer_mandates:all |
Create a SEPA mandate for a customer. |
get($sepaMandateId) |
GET /sepa_mandates/{sepaMandateId} |
customer_mandates:all or customer_mandates:readonly |
Retrieve a SEPA mandate by its identifier. |
update($sepaMandateId, $bank = null, $bic = null, $iban = null, $sequenceType = null, $signedAt = null, $identifier = null, $customerId = null) |
PUT /sepa_mandates/{sepaMandateId} |
customer_mandates:all |
Update a SEPA mandate. |
delete($sepaMandateId) |
DELETE /sepa_mandates/{sepaMandateId} |
customer_mandates:all |
Delete a SEPA mandate. |
GocardlessMandates ($client->gocardlessMandates)¶
Manage GoCardless direct debit mandates.
| Method | HTTP | Scope | Description |
|---|---|---|---|
list($cursor = null, $limit = null, $filter = null, $sort = null) |
GET /gocardless_mandates |
customer_mandates:all or customer_mandates:readonly |
List GoCardless mandates. |
get($gocardlessMandateId) |
GET /gocardless_mandates/{gocardlessMandateId} |
customer_mandates:all or customer_mandates:readonly |
Retrieve a GoCardless mandate by its identifier. |
requestByEmail($customerId, $recipients, $subject = null, $body = null) |
POST /gocardless_mandates/mail_requests |
customer_mandates:all |
Email a customer a link to sign a GoCardless mandate. |
cancel($gocardlessMandateId) |
POST /gocardless_mandates/{gocardlessMandateId}/cancellations |
customer_mandates:all |
Cancel a GoCardless mandate. |
associate($gocardlessMandateId, $customerId) |
POST /gocardless_mandates/{gocardlessMandateId}/associations |
customer_mandates:all |
Associate a GoCardless mandate with a customer. |
ProAccount ($client->proAccount)¶
Manage Pennylane Pro Account payment mandates and their migration from SEPA or GoCardless mandates.
| Method | HTTP | Scope | Description |
|---|---|---|---|
requestMandate($customerId) |
POST /pro_account/mandate_requests |
customer_mandates:all |
Send a customer a request to sign a Pro Account SEPA mandate. |
listMandateMigrations($cursor = null, $limit = null, $filter = null, $sort = null) |
GET /pro_account/mandate_migrations |
customer_mandates:readonly or customer_mandates:all |
List mandates that are candidates for migration to Pro Account, or already migrated. |
migrateMandates($mandateType, $mandateId, $earlyExecutionDatePermitted = null) |
POST /pro_account/mandate_migrations |
customer_mandates:all |
Migrate a SEPA or GoCardless mandate to Pro Account. mandateType is one of SepaMandate, Mandate (GoCardless). |
listMandates($cursor = null, $limit = null, $filter = null, $sort = null) |
GET /pro_account/mandates |
customer_mandates:readonly or customer_mandates:all |
List Pro Account payment mandates. |
Example¶
<?php
declare(strict_types=1);
require __DIR__ . '/vendor/autoload.php';
use Pennylane\Sdk\Filter;
use Pennylane\Sdk\Pennylane;
$client = new Pennylane();
$mandate = $client->sepaMandates->create(
bic: 'BNPAFRPPXXX',
iban: 'FR7630004000031234567890143',
signedAt: '2026-07-01',
identifier: 'MANDATE-0001',
customerId: 42,
);
foreach ($client->gocardlessMandates->list(filter: [Filter::eq('customer_id', 42)]) as $gcMandate) {
echo "GoCardless mandate {$gcMandate->id}\n";
}
$migration = $client->proAccount->migrateMandates(
mandateType: 'SepaMandate',
mandateId: $mandate->id,
);