LAce
- Edited
Hey community...is it possible to accept direct debits with the api/sdk?
Edit, because I found the answer:
These are the steps to identify all direct debits of an account:
direct_debits = filter(lambda resp: resp.get(resp.id).value.type_ == 'DIRECT_DEBIT',endpoint.RequestResponse.list(monetary_account_id=YOURACCOUNTID))
Then you can filter them for status PENDING
To pay them do this:
endpoint.RequestResponse.update(DIRECTDEBIT_ID, status='ACCEPTED')
If you dont pass an monetary_account_id then its paid from a "random" account (I think the first in your account list)