Skip to main content

Recurring Plan DTO

namestringrequired

This is name of the recurring plan (ex: Plan A)

reference_numberstring

This field is to generate the reference number for the connecting orders created by the recurring plan

  • Every new order created under this recurring plan will have the same “reference number” with incremental suffix
customer_uuidstringrequired
default_collection_methodstringrequired

Single option choice: [charge_automatically] - automatically charge the customer provided card details

payment_retry_countnumberrequired

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

payment_retry_day_periodnumberrequired

Once the initial payment request attempt is unsuccessful, the system will wait until the next given period data specified in payment_retry_day_period (ex: 1 day). Once the specified day period has reached, then the system will pose another charge attempt to the recurring order.

grace_periodnumber

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 to recurring_cycles.state = uncollectible. If grace_period = NULL , then the system will never void the recurring_orders record

callback_urlstring
redirect_urlstring
timeout object
timerintegerrequired
urlstring
notestring

This is transferred to return the note for all related recurring orders

descriptionstring

Any description to remark about this record

recurring_cycles object[]required
  • Array [
  • billing_countnumberrequired

    This is to count how long will the recurring cycle run for. If data is null, then consider this recurring_cycles record will run forerver.

    recurring_billing_configstringrequired

    This is for the system to know the billing date of a cycle, once the cycle has started

    recurring_items object[]required
  • Array [
  • quantitynumberrequired
    recurring_item_idstringrequired
  • ]
  • discount_amountnumber
    discount_typestring
    descriptionstring
  • ]
  • Recurring Plan DTO
    {
    "name": "string",
    "reference_number": "string",
    "customer_uuid": "string",
    "default_collection_method": "string",
    "payment_retry_count": 0,
    "payment_retry_day_period": 0,
    "grace_period": 0,
    "callback_url": "string",
    "redirect_url": "string",
    "timeout": {
    "timer": 0,
    "url": "string"
    },
    "note": "string",
    "description": "string",
    "recurring_cycles": [
    {
    "billing_count": 0,
    "recurring_billing_config": "string",
    "recurring_items": [
    {
    "quantity": 0,
    "recurring_item_id": "string"
    }
    ],
    "discount_amount": 0,
    "discount_type": "string",
    "description": "string"
    }
    ]
    }