collectPayment

fun collectPayment(ticket: Ticket.CollectPayment, credentials: Credentials, account: DebtorAccountReference? = null, session: Session? = null, recurringConsents: Boolean = false): CompletableFuture<Response<CollectPaymentResult>>

Invoke the collect-payment service: identify the debtor and prepare a payment-initiation flow.

client
.collectPayment(
ticket,
credentials,
new AccountReference("DE02120300000000202051", null))
.thenAccept(
response -> {
// handle Result / Dialog / Redirect on response
});

Parameters

account

Optional debtor account to collect from. Pass a plain AccountReference (e.g. one returned by the accounts service) directly, or an EncryptedIbanReference for a ciphertext your backend produced with its API secret following the Opaque Data protocol so the frontend never sees the underlying IBAN. Providing account reduces the chance of an account-selection prompt; omitting it may surface one (bank-dependent).

See also