iOS SDK — Bank (ACH)
ACH payments via Plaid Link + encrypted checkout.
SPM products: SwirepayCore, SwirepayBank (+ LinkKit)
Import: import SwirepayBank
Step 1 — Link the bank account (Plaid UI)
let publicToken = try await SwirepayBankAccount.shared.linkBankAccount(
accountGid: accountGid,
isTest: environment == .sandbox,
presentingViewController: self
)
Plaid Link runs inside its own sheet. When the user completes it, you receive a publicToken to pass to the charge call.
Step 2 — Charge
do {
let result = try await SwirepayBankAccount.shared.createOneTimeEncryptedBankCheckout(
customerName: name,
customerEmail: email,
phoneE164: phone,
plaidPublicToken: publicToken,
businessType: "BUSINESS", // or "INDIVIDUAL"
billingStreet: street,
billingCity: city,
billingState: state,
billingPostalCode: postal,
billingCountryCode: "US",
amountMinorUnits: 1000,
currencyCode: "USD"
)
let completion = result.paymentCompletionResponse
if completion.success {
// Done
}
} catch {
// Plaid cancelled, validation, or API error
}
Plaid / LinkKit notes
SwirepayBankdepends on Plaid LinkKit (SwiftPM binary target).- When upgrading LinkKit, update
urlandchecksuminPackage.swift. - Build without Bank/Plaid:
SWIREPAY_KIT_NO_BANK=1 ./Scripts/build-xcframeworks.sh