Recurring Payment Management
Wonder Recurring solution allows you to enable recurring payment acceptance from customers (including services subscriptions, and instalments etc.) via APIs.
Our entire solution contains:
- OpenAPI: Connect to Wonder gateway to manage customer subscriptions & sale products.
- Payment Link: Web-base platform for customer initiate and complete payment.
- Wallet Link: Web-base platform for customer manage the payment methods and invocies (change card to another one).
Models
- Recurring Item: The recurring products that are included in the recurring cycle and will determine the billing amount.
- Recurring Billing Config: Set up billing logic for a recurring cycle, including billing intervals, interval counts, and proration logic. These are to be assigned to newly created billing cycles to instruct the billing and start dates of the cycle. Furthermore, the Wonder system allows additional customization of billing dates for monthly/annual recurring cycles.
- Recurring Plan: This record will contain specific customer profile to collect recurring/ instalment payments. The plan can be set up with default information, such as the default collection method and the default payment method. The recurring cycle billing orders will obtain the configured data from the recurring plan and do the invoicing, respectively.
- Recurring Cycle: A recurring cycle consists of recurring billing configurations and items. It determines the recurring billing date and amount. A recurring plan can have either one or multiple recurring cycles, depending on whether it will have different billing amounts within a plan at different billing durations/intervals. For example, a recurring plan can have a free period for a month (cycle 1), followed by an annual payment (cycle 2).
- Recurring Order: The system will generate a new recurring order once a billing cycle’s set date/time has been reached (set in Recurring Billing Configs). The individual recurring billing invoice can be fulfilled by automatically charging the assigned customer payment tokens or other forms of payments depending on the cycles' configurations.
Recurring Item
- Reference ID: This is the external unique reference id for the sales items. It can be used to map with your inventory system.
- Label: This is name of the recurring product.
- Price: This is to set the price of the item. The price will be the billing amount for the recurring order.
- Currency: The supported currency base on your business configuration.
- Description: A description text.
Recurring Billing Config
- Interval Count: The number of intervals between recurring billings.
- Billing Interval: The frequency at which a recurring invoice is billed to the customer.
- Billing Type: This is to determine if the system will apply automated billing date based on the current day of when the date the recurring plan is created.
- Billing Month: This is to determine which month of the year should the system issue the recurring billing invoice to the customer. This field is only applicable for
billing_interval = yearly
ANDbilling_type = customized
. - Billing Day Of Month: This is to determine which day of the month should the system issue the monthly/yearly recurring billing invoice to the customer. This field is only applicable for
billing_type = customized
. - Billing Proration Enabled: - This data field is let the system knows if needs to calculate prorated amount, if the customer is entering a recurring cycle that is not a full cycle period.
- Description: A internal description text to identify to set of rules.
Billing Interval
Value | Comment |
---|---|
daily | The invoice will be billed on daily basis |
weekly | The invoice will be billed on weekly basis |
monthly | The invoice will be billed on monthly basis |
yearly | The invoice will be billed on yearly basis |
Interval Count
The number of intervals between recurring billings.
- If
billing_interval=monthly
andinterval_count=3
, then system bills every 3 months. - If
billing_interval=monthly
andinterval_count=1
, then system bills every 1 month. - If
billing_interval=yearly
andinterval_count=1
, then system bills every 1 year.
Billing Month
This data field is for yearly subscription to determine which month of the year should the system issue the recurring billing invoice to the customer. This field is only applicable for billing_interval = yearly
.
The billing time will always be set at 00:00:00 (local time to the business account) of the given defined billing date.
- If
billing_interval= yearly
andinterval_count =1
, and alsobilling_month= 3
, then it means that for the yearly recurring plan of this customer, the system should charge the customer once in a year, on 1st March (ifbilling_day_of_month
is not defined, then default to first date of the month). If the current date/time that the user triggers the subscription is1st May 2024
, andbilling_proration_enabled=TRUE
, then the system will calculate the payment to be paid from1st May 2024 - 1st March 2025
. The calculation will be calculated based on totalX
amount ofrecurring_items data / 365 * 304
. The system will issue a billing invoice for customer to pay for recurring period of1st May 2024 - 1st March 2025
. The invoice’s billing start date will be1st May 2024
, and this should consider as one count forrecurring_cycles.billing_count
- If
billing_interval= yearly
andinterval_count =1
, and alsobilling_month= 3
,then it means that for the yearly recurring plan of this customer, the system should charge the customer once in a year, on 1st March (ifbilling_day_of_month
is not defined, then default to first date of the month). If the current date/time that the user triggers the subscription is1st February 2024
, andbilling_proration_enabled=TRUE
, then the system will calculate the payment to be paid from1st February 2024 - 1st March 2024
. The calculation will be calculated based on totalX
amount ofrecurring_items data / 365 * 29
. The system will issue a billing invoice for customer to pay for recurring period of1st February 2024 - 1st March 2024
. The invoice’s billing start date1st February 2024
, and this should consider as one count forrecurring_cycles.billing_count
- If
billing_interval= yearly
andinterval_count = 2
, and alsobilling_month= 3
,then it means that for the recurring plan of this customer, the system should charge the customer once in 2 years, on1st March
. (ifbilling_day_of_month
is not defined, then default to first date of the month). If the current date/time that the user triggers the subscription is1st May 2024
, andbilling_proration_enabled=TRUE
, then the system will calculate the payment to be paid from1st May 2024 - 1st March 2026
. The calculation will be calculated based on totalX
amount ofrecurring_items data / (365*2) * 669
. The system will issue a billing invoice for customer to pay for recurring period of1st May 2024 - 1st March 2026
. The invoice’s billing start date will be1st May 2024 00:00:00
, and this should consider as one count forrecurring_cycles.billing_count
Billing Day Of Month
This data field is for monthly
, or yearly
subscription to determine which day of the month should the system issue the recurring billing invoice to the customer.
This field is only applicable for billing_interval = monthly/yearly
. The billing time will always be set at 00:00:00 (local time to the business account) of the given defined billing date.
- If
billing_interval= yearly
andinterval_count =1
, and alsobilling_month= 3
,billing_day_of_month= 20
,then it means that for the yearly recurring plan of this customer, the system should charge the customer once in a year, on20th March
. If the current date/time that the user triggers the subscription is1st May 2024
, andbilling_proration_enabled=TRUE
, then the system will calculate the payment to be paid from1st May 2024 - 20th March 2025
. The calculation will be calculated based on totalX
amount ofrecurring_items data / 365 * 323
. The system will issue a billing invoice for customer to pay for recurring period of1st May 2024 - 20th March 2025
. The invoice’s billing start date will be1st May 2024 00:00:00
, and this should consider as onerecurring_cycles.billing_count
. - If
billing_interval= yearly
andinterval_count =2
, and alsobilling_month= 3
,billing_day_of_month= 31
,then it means that for the recurring plan of this customer, the system should charge the customer once in 2 year, on31st March
. If the current date/time that the user triggers the subscription is1st May 2024
, andbilling_proration_enabled=TRUE
, then the system will calculate the payment to be paid from1st May 2024 - 30st March 2026
. The calculation will be calculated based on totalX
amount ofrecurring_items data / (365*2) * 699
. The system will issue a billing invoice for customer to pay for recurring period of1st May 2024 - 31st March 2026
. The invoice’s billing start date will be1st May 2024 00:00:00
, and this should consider as one count forrecurring_cycles.billing_count
. - If
billing_interval= monthly
andinterval_count = 1
, and alsobilling_day_of_month= 31
,then it means that for the monthly recurring plan of this customer, the system should charge the customer once in a month, on31st of each month
. If the current date/time that the user triggers the subscription is1st May 2024
, andbilling_proration_enabled= TRUE
, then the system will calculate the payment to be paid from 1st May 2024 - 31st May 2024. The system will issue a billing invoice for customer to pay for recurring period of1st May 2024 - 31st May 2024
. The invoice’s billing start date will be 1st May 2024 00:00:00, and this should consider as one recurring_cycles.billing_count - If
billing_interval= monthly
andinterval_count = 1
, and alsobilling_day_of_month= 31
,then it means that for the monthly recurring plan of this customer, the system should charge the customer once in a month, on31st of each month
. If the current date/time that the user triggers the subscription is3rd February 2024
, andbilling_proration_enabled= TRUE
, then the system will calculate the payment to be paid from3rd February 2024 - 29th February 2024
. This is because inFebruary 2024
, there is only 29 days (leap year). Need to note that for special months that don’t have 31 days: only have 28/29/30 days, then the system will use that last date of the month; ifbilling_day_of_month= 31
. The system will issue a billing invoice for customer to pay for recurring period of3rd February 2024 - 29th February 2024
. The invoice’s billing start date will be3rd February 2024 00:00:00
, and this should consider as onerecurring_cycles.billing_count
- If
billing_interval= monthly
andinterval_count = 6
, and alsobilling_day_of_month= 28
,then it means that for the 6-month recurring plan of this customer, the system should charge the customer once in in 6 months, on the 28th. If the current date/time that the user triggers the subscription is30th May 2024
, andbilling_proration_enabled= TRUE
, then the system will calculate the payment to be paid from30th May 2024 - 28th November 2024
(6th months from May is November). The calculation will be calculated based on totalX
amount ofrecurring_items data / 184 (days between 28th May - 28th Nov 2024) * 182 (days between 30th May - 28th Nov 2024)
. The system will issue a billing invoice for customer to pay for recurring period of5th May 2024 - 28th November 2026
. The invoice’s billing start date will be5th May 2024 00:00:00
, and this should consider as onerecurring_cycles.billing_count
.
Billing Type
Value | Comment |
---|---|
automated | - |
customized | - |
This is to determine if the system will apply automated billing date/time based on the current date/time of when the date the recurring plan is created.
- automated: the system will select the current calendar date/time to be the start date of the recurring billing cycle. For example:
- If user is subscribing on
1st March 2024
, andbilling_interval= yearly
andinterval_count =1
; then, user will be issued with a billing invoice of1st March 2024 - 1st March 2025
. - If user is subscribing on
1st March 2024
, andbilling_interval= monthly
andinterval_count =2
; then, user will be issued with a billing invoice of1st March 2024 - 1st May 2024
. - If user is subscribing on
1st March 2024
, andbilling_interval= weekly
andinterval_count = 2
; then, user will be issued with a billing invoice of1st March 2024 - 15th March 2024
.
- If user is subscribing on
- customized: if user chooses this option, depending on which data is set in
billing_interval
, they will need to configurebilling_month
;billing_day_of_month
. This option is only applicable for whenbilling_interval = monthly/yearly
.
Recurring Plan
- Name: The recurring plan name.
- Description: Any description to remark about this record.
- Customer UUID: The customer to be assigned with this recurring plan.
- Default Collection Method: Single option choice -
charge_automatically
:When the recurring cycle has reached its due date, the system will automatically charge the tokenised card data fromdefault_payment_method
. - Payment Retry Day Period: Once the initial payment request attempt is unsuccessful, the system will wait until the next given period data specified in
payment_retry_day_period
. Once the specified day period has reached, then the system will pose another charge attempt to the recurring order. - Payment Retry Count: This is to set the limit how many attempts to be executed. Once the count limit has reached, then the system will change the status to recurring_cycles.state = uncollectible.
- Grace Period: This field is to count the day period that after the final attempt of payment charge is unsuccessful, then how many more days until the system will void the
recurring_order
record. Then change the status torecurring_cycles.state = uncollectible
. Ifgrace_period = NULL
, then the system will never void therecurring_orders
record
Recurring Cycle
- Billing Count: This is to count how long will the recurring cycle run for.
- Recurring Billing Config: This is for the system to know the billing date of a cycle, once the cycle has started
- Recurring Items: For the system to know how much it should be charging for the particular recurring invoice based on the defined items.
- Discount Type: The discount type can be
fixed
orpercentage
, a combined configuration withdiscount_amount
. - Discount Amount: A combined configuration with
discount_amount
. Ifdiscount_type = fixed
,discount_amount
unit is in: dollars; Ifdiscount_type = percentage
,discount_amount
can only be over 0 and not over 100.
Billing Count
This is to count how long will the recurring cycle run for. For example:
- If the
recurring_billing_configs.billing_interval = monthly
, withrecurring_billing_configs.interval_count = 1
, andbilling_count = 3
, then it means thisrecurring_cycles
record will run for3 months
(with each invoice to be billed every 1 month). - If the
recurring_billing_configs.billing_interval = monthly
, withrecurring_billing_configs.interval_count = 6
, andbilling_count = 3
, then it means thisrecurring_cycles
record will run for18 months
(with each invoice to be billed every 3 months). - If data is null, then consider this
recurring_cycles
record will run forerver. For example if therecurring_billing_configs.billing_interval = yearly
, withrecurring_billing_configs.interval_count = 1
, andbilling_count = NULL
, then it means thisrecurring_cycles
record will run with no ending (with each invoice to be billed every 1 year).
Recurring Order
Please refer to Order Management Order Model.
API List
API Workflow for creating recurring plan.
- Create a customer profile via Create Customer API.
- Create recurring items via API Create Recurring Item API.
- Create recurring billing configs via API Create Recurring Billing Config API
- Create recurring plan Create Recurring Plan API.
- Share the recurring plan's first order payment link to customer.
- Customer add or choose a exists payment token to complete pay the first order.
- After the first order paid, then next orders will be use the same payment token in the future.