collectPayment
suspend fun collectPayment(ticket: Ticket.CollectPayment, credentials: Credentials, account: DebtorAccountReference? = null, session: Session? = null, recurringConsents: Boolean = false): Response<CollectPaymentResult>
Invoke the collect-payment service: identify the debtor and prepare a payment-initiation flow.
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
Samples
client.collectPayment(
ticket,
credentials,
account = AccountReference(
iban = "NL58YAXI1234567890",
currency = "EUR",
),
)Content copied to clipboard