Single Donation (Standalone Scenario)
In this section, you will learn how to manage single standalone donation. This documentation is divided into three parts: an example UI flow with the most important calls, a detailed flowchart, and the API references.
UI Example
The user starts by selecting a charity and the amount they wish to donate.

Step-by-Step Process:
-
Initiate Pre-Transaction:
A front-end call is made without user authentication to initiate a pre-transaction for the selected charity and amount.
Endpoint: POST /v1/pub/company/:company_id/pre-transactions
-
Retrieve Payment Methods:
A front-end call is made with consumer user authentication to retrieve the payment methods already created in cents.
Endpoint: GET /v1/auth/consumer-user/company/:id_company/payment-methods -
Display Payment Methods:
The system displays the list of available payment methods to the user (including also payment methods not stored in cents yet).
-
Add New Payment Method:
If the consumer user selects a payment method not yet stored in cents, a front-end consumer user authenticated call is made to add the payment method.
Endpoint: POST /v1/auth/consumer-user/company/:company_id/payment-methods -
Handle Donation Payment:
There are two possible scenarios based on who will handle the donation payment: the company or Cents.- Company Handles Payment:
If the company processes the donation payment, a back-end authenticated call is made to record and update the transaction.
Endpoint: POST /v1/auth/company/consumer-users/:consumer_user_id/transactions - Cents Handles Payment:
If Cents processes the donation payment, a front-end authenticated call is made to record and update the transaction.
Endpoint: POST /v1/auth/consumer-user/company/:company_id/transactions
- Company Handles 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.
Detailed Flow
API references
- Company API: for transactions section
- Consumer User API: for transactions and payment methods sections