Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Implement withdrawal feature with notifications #1345

Copy link
Copy link

Description

@NamFra
Issue body actions

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.

Decree No. 2026-3 mandates a one-click withdrawal feature for digital services. Currently, Joanie does not support:

  • Recording withdrawal requests from Richie
  • Automatically sending acknowledgment emails to users
  • Specific rules for credentials (automatic cancellation) and certificates (manual validation)

Describe the solution you'd like

1. Withdrawal API

Create a dedicated endpoint to:

  • Receive withdrawal requests from Richie
  • Validate data (first name, last name, email, order/reference ID, date/time)

Processing logic:

has_waived_withdrawal_right Trainings (credentials) Certificates
True (✅ checked) Withdrawal button hidden on Richie Notification sent to the FUN team for manual processing
False (❌ unchecked) Automatic order cancellation Automatic order cancellation + Notification to the FUN team for processing

Simplified option: All certificate-related requests could be processed manually if distinguishing between cancellation types adds too much complexity!


2. Emails: acknowledgment and notifications

For the user:

  • Acknowledgment email with request details;
  • Customized messages:
    • Trainings (credentials): Confirmation of automatic cancellation
    • Certificates: Processing by the FUN team for refund

For FUN support (certificates only - TBD for credentials):

  • Notification sent to contact[at]fun-mooc.fr with details and a direct link to the back-office (order or withdrawal entry, see 3. below).

3. Admin interface (BO)

  • Dedicated view:

    • List of requests (name, email, product, date, type, status)
    • Filters by status, type, or date
    • Option to manually process (cancel from the back-office)
  • Alternative:

    • Integration into the "Orders" view with a distinct column or status for withdrawals, exportable to CSV

4. Withdrawal deadline verification

  • Use existing logic for a deadline of approximately 16 days (equivalent to 14 business days):

def _withdrawal_limit_date(signed_contract_date, course_start_date):
"""
Return the withdrawal limit date for the order.
On the withdrawal period of 14 days after the signing of the contract,
it is counted as follows (article L 221-19 of the Consumer Code):
- The day of the signing of the contract is not counted in the period;
the countdown therefore begins the day after the contract is signed.
- The period begins to run at the start of the first hour of the first
day and ends at the expiration of the last hour of the last day of the period.
- If the period expires on a Saturday, a Sunday or a public holiday or non-working day,
it is extended until the next working day.
The two first rules can be simplified with adding 16 days to the start date.
So, the withdrawal limit date is the start date + 16 days.
If the withdrawal limit date is after the course start date, the withdrawal limit
date is set to the signed contract date to allow the user to starts the course
immediately.
"""
calendar = get_country_calendar()
withdrawal_date = signed_contract_date + timedelta(
days=settings.JOANIE_WITHDRAWAL_PERIOD_DAYS
)
if not calendar.is_working_day(withdrawal_date):
withdrawal_date = calendar.add_working_days(
withdrawal_date, 1, keep_datetime=True
)
return (
withdrawal_date if withdrawal_date < course_start_date else signed_contract_date
)

  • The withdrawal button will not appear on Richie if the deadline has passed

Discovery, Documentation, Adoption, Migration Strategy

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.