Skip to main content

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.

Select Charity

Step-by-Step Process:

  1. 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

    Choice Donation Type

  2. 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

  3. Display Payment Methods:
    The system displays the list of available payment methods to the user (including also payment methods not stored in cents yet).

    List Payment Methods

  4. 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

  5. Handle Donation Payment:
    There are two possible scenarios based on who will handle the donation payment: the company or Cents.

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