Skip to main content

Round up

The flowchart describes a process for setting up a recurring round-up donation to a charity, incorporating several API calls.

The process begins with the user selecting a charity and the amount they wish to donate. This action triggers a front-end API call without user authentication to the endpoint POST /v1/pub/company/:company_id/pre-subscriptions, initiating the pre-subscription process.

Select Charity

Round Up Selected

Subsequently, an authenticated front-end call retrieves the list of available payment methods using GET /v1/auth/consumer-user/company/:company_id/payment-methods, which are then displayed to the user.
The user decides whether to use an existing payment method or add a new one. If a new payment method is selected, it is added to the user's profile. If the payment method is not already saved in the profile source, the company shows possible round-up sources. This is achieved through an authenticated API call to GET /v1/auth/consumer-user/company/:company_id/round-up-sources.

If no round-up source is available, a new one is created using the call POST /v1/auth/consumer-user/company/:company_id/round-up-sources. If a round-up source exists, it is utilized.

The subscription is then created through an authenticated call to POST /v1/auth/consumer-user/company/:company_id/subscriptions.

An authenticated front-end call (yellow) is made to retrieve the payment methods: GET /v1/auth/consumer-user/company/:company_id/payment-methods.

The system shows a list of available payment methods to the user.

List Payment Methods

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 flow then specifies who initiates the transaction call. If Cents initiates, they contact the company when there are new transactions and provide transaction details. If the company initiates, they retrieve transaction details via the endpoint GET /v1/auth/company/pre-transactions?to-pay=true.
Ultimately, the company processes the donation payment based on the retrieved transaction details.