Saving account
This flowchart illustrates the process for setting up a recurring donation from saving account to a charity, highlighting the API calls involved.
The process begins with the user selecting a charity and the donation amount. This initiates a front-end call without user authentication to POST /v1/pub/company/:company_id/pre-subscriptions.
An authenticated front-end call then retrieves the available payment methods using GET /v1/auth/consumer-user/company/:company_id/payment-methods, which are displayed to the user.
The user decides whether to use an existing payment method or add a new one. If a new method is chosen, it is added via POST /v1/auth/consumer-user/company/:company_id/payment-methods. If there are no new methods to insert, the process proceeds to create the subscription using POST /v1/auth/consumer-user/company/:company_id/subscriptions.
Cents then automatically creates pre-transactions every month, based on a specified percentage of the "saving_account" to use, without specifying the donation amount.
The flow determines who initiates the transaction call. If Cents initiates, they call the company when there are new transactions and provide transaction details. If the company initiates, they retrieve transaction details through the endpoint GET /v1/auth/company/pre-transactions?to-pay=true.
Finally, the company handles the donation payment by making a backend authenticated call to POST /v1/auth/company/transactions.