Single transaction
The flow diagram illustrates the process of making a charity donation through a series of API calls and user interactions. The process involves selecting a charity, managing payment methods, and handling the transaction.
The user starts by selecting a charity and the amount they wish to donate.

A front-end call is made without user authentication to initiate a pre-transaction for the selected charity and amount (POST /v1/pub/company/:company_id/pre-transactions).

A front-end call is made with user authentication to retrieve the payment methods associated with the user and the company (GET /v1/auth/consumer-user/company/:id_company/payment-methods).
The system displays the list of available payment methods to the user.

The user decides whether to insert a new payment method. If the user chooses to add a new payment method, a front-end authenticated call is made to update the payment methods (POST /v1/auth/consumer-user/company/:company_id/payment-methods with consumer-user authenticated).
The decision is made on who will handle the donation payment: the company or the Cents platform. If the company handles the payment, the company processes the donation payment, and a back-end authenticated call is made to record and update the transaction (POST /v1/auth/company/transactions and update transaction). If Cents handles the payment, a front-end authenticated call is made to record and update the transaction (POST /v1/auth/consumer-user/company/:company_id/transactions with consumer-user authenticated and update transaction), and Cents processes the donation payment.
This flow ensures that the donation process is secure, with appropriate steps for user authentication and transaction handling, depending on whether the company or Cents handles the payment.