Dashboard Mangopay - Subscription Feature

Environment test: Test all status and automatic payment workflow of the subscription services

Why / Which context

The inter-user subscription allows automatic recurring payment for one booking.

Payments are automatic in production, but in environment tests, it will take a few days to complete a workflow.

Steps to reproduce

You do not need to have access to the Mangopay dashboard, all is handled through Second platform.

Make a booking on your platform

Go on your platform and log in as an asker and create a booking request.

Learn more on the process of booking requests here: Booking confirmation pages (Subscription Feature)

And fill in the credit card information.

The bank-wire payment is not available for subscription services.

Accept the subscription request and enable payments

Once the payment has been made by the asker, the offeror can accept the subscription.

Learn more on the process of booking management here: Bookings dashboard (Subscription Feature)

By default, the Payin is done 2 days before the start date of the subscription period. This is set with the following configuration: subscription_automatic.

The status of the subscription period will be Paid but the payin will not be done.

Test the active period

Go in the SBO and fill the arguments in the command subscription.status

Arguments: --test --id=1868442188 --clock=P1Y1MT1H1M

The same process to enable the payout: the command cocorico:subscription:validate.

Arguments: --test --delay-weekly=-P1M

No space between the = and the Clock naming convention

Do not forget the - before the period

Period

Clock naming convention

One minute

T1M

One hour

T1H

One month

P1M

One year

P1Y

The asker need to confirm the payin

Once the offeror accept the booking, the asker will have to confirm the booking.

He have to fill a 2nd time his payment information. This is for security reasons but he will not be charge twice.

This security confirmation appears only for the first period. Once it is done you do not have to do it again.

Test the next subscription period

To finish the complete workflow you should test the next period.

Once the period T is active it will create the next subscription period is pending.

You can reproduce the point 5. test the active period.

The expected behavior is:

  • The current subscription period is done

  • The next subscription period is active

  • The payout is available

You can reproduce steps 5 as many as you want in order to test several subscription period.

Commands

  • second:subscription:expire

    • Simulate a subscription request that has not been accepted or declined

    • No arguments

  • second:subscription:status

    • Simulate the day of the platform to test payin and status

    • Args: --test --id=1868442188 --clock=P1M

  • second:subscription:validate

    • Simulate the day of the platform to test payout and status and enable another subscription period

    • Args: --test --delay-weekly=-P1M

Reminder

No space between the = and the Clock naming convention

Do not forget the - before the period

Period

Clock naming convention

One minute

T1M

One hour

T1H

One month

P1M

One year

P1Y

Status

Subscription period

Workflow

The subscription period workflow for a Accepted subscription request is:

Pending > Accepted > Paid > Active > Done

Status

  • Pending: the next period, it is waiting for subscription acceptance or for payment

  • Canceled: the next period was canceled by the asker

  • Declined: the subscription request was canceled by the offerer

  • PaymentError: the next period has a payment issue

  • Paid: the next period was paid successfully but the period didn’t start yet (payment attempt delay)

  • Active: the next period becomes active when the period starts (new cron command required)

  • Done: the current period becomes done when the period ends (new cron command required)

  • Canceled: the current period is paid or pending, and the active period (if any) becomes Done when the period ends.

Subscription status

  • Pending: the subscription request is waiting for the offerer acceptation

  • Canceled: the subscription request was canceled by the asker

  • Declined: the subscription request was canceled by the offerer

  • Accepted: the subscription request was accepted by the offerer

  • PaymentError: the next subscription period has a payment issue

  • Paid: the first period was paid successfully but the period didn’t start yet (payment attempt delay)

  • Active: the next period starts and it’s paid (new cron command required)

  • Canceled: the next period was canceled and ( there is no current paid period or the current paid period ends ) (new cron command required)

Last updated

Was this helpful?