Repository navigation
6.1.0
Release 6.1.0 (#372)
Breaking changes (check at the end
)
This release introduces comprehensive support for Bacs and ACH Direct Debit instruments in the SDK, including new client classes, request models, and type definitions. It also updates core enums to recognize these new instrument and payment source types. The changes enable storing, configuring, and sending notifications for Bacs and ACH instruments, and ensure the SDK aligns with the latest API specifications.
Bacs Direct Debit Support:
- Added
BacsClientfor sending Bacs Direct Debit pre-notifications, with corresponding request and notification type classes (BacsNotificationRequest,BacsNotificationType). Also exposedgetBacsClient()inCheckoutApi. [1] [2] [3] [4] [5] [6] [7] - Introduced models for creating Bacs instruments:
CreateBacsInstrumentRequest,CreateBacsInstrumentAccount,CreateBacsInstrumentData,CreateBacsAccountHolder,CreateBacsBillingAddress, andBacsPaymentType. [1] [2] [3] [4] [5] [6]
ACH Direct Debit Support:
- Added models for creating ACH instruments:
CreateAchInstrumentRequest,CreateAchInstrumentData,CreateAchAccountHolder, andAchAccountType. [1] [2] [3] [4]
SEPA Direct Debit Support:
- Added
CreateSepaAccountHolderfor SEPA instrument account holder details.
Core Enum Updates:
- Updated
InstrumentTypeandPaymentSourceTypeto includebacsandachas valid types, reflecting new instrument and payment source options. [1] [2] [3] [4]
These changes provide the necessary models and client interfaces to support Bacs and ACH Direct Debit instruments, improve maintainability, and ensure compatibility with the current API.
Breaking changes 


This release is breaking and ships as 6.0.0 (already bumped in this branch via the merged
Release 6.0.0 (#370) commit: CheckoutUtils::PROJECT_VERSION and version.json).
The instruments models were reshaped so that each scheme (SEPA, Bacs, ACH) and each operation
(store, update) has its own type. Previously a single InstrumentData and the shared
Checkout\Common\AccountHolder were reused across operations they did not match, which exposed
fields the API rejects and hid fields it requires.
Removed classes
| Removed | Replacement |
|---|---|
Checkout\Instruments\Create\InstrumentData |
Checkout\Instruments\Create\CreateSepaInstrumentData (store) / Checkout\Instruments\Update\UpdateSepaInstrumentData (update) |
The removed class held account_number, country, currency, payment_type, mandate_id and
date_of_signature. All six exist on the replacements, plus type (the SEPA mandate type), which
the specification declares and the old class was missing.
Retyped properties
All three are on Checkout\Instruments\Create\CreateSepaInstrumentRequest:
| Property | Before | After |
|---|---|---|
$instrument_data |
Checkout\Instruments\Create\InstrumentData |
CreateSepaInstrumentData |
$account_holder |
Checkout\Common\AccountHolder (15 properties) |
CreateSepaAccountHolder (5 properties) |
$customer |
\Checkout\Instruments\Create\UpdateCustomerRequest |
CreateCustomerInstrumentRequest |
The $customer entry is a documentation correction rather than a runtime change: the old @var
pointed at a class that does not exist in that namespace (the real one lives in
Checkout\Instruments\Update). Static analysis will now flag callers who pass the old type.
Migration
// Before
$instrumentData = new InstrumentData();
$instrumentData->account_number = "FR7630006000011234567890189";
$instrumentData->country = Country::$FR;
$instrumentData->currency = Currency::$EUR;
$instrumentData->payment_type = PaymentType::$recurring; // sent "Recurring" - rejected
$accountHolder = new AccountHolder();
$accountHolder->first_name = "John";
$accountHolder->last_name = "Wick";
$accountHolder->phone = $phone; // not in the SEPA schema
$accountHolder->billing_address = $address;
$request = new CreateSepaInstrumentRequest();
$request->instrument_data = $instrumentData;
$request->account_holder = $accountHolder;
// After
$instrumentData = new CreateSepaInstrumentData();
$instrumentData->type = SepaMandateType::$core; // new: was missing entirely
$instrumentData->account_number = "FR7630006000011234567890189";
$instrumentData->country = Country::$FR;
$instrumentData->currency = Currency::$EUR;
$instrumentData->payment_type = SepaPaymentType::$recurring; // sends "recurring"
$billingAddress = new CreateSepaBillingAddress();
$billingAddress->address_line1 = "Evergreen Terrace";
$billingAddress->address_line2 = "742";
$billingAddress->city = "Paris";
$billingAddress->zip = "75000";
$billingAddress->country = Country::$FR;
$accountHolder = new CreateSepaAccountHolder();
$accountHolder->first_name = "John";
$accountHolder->last_name = "Wick";
$accountHolder->billing_address = $billingAddress;
$request = new CreateSepaInstrumentRequest();
$request->instrument_data = $instrumentData;
$request->account_holder = $accountHolder;