Wonder
post/svc/payment/api/v1/openapi/recurring_payments/plan

Create a plan

Use this interface to create a new recycling plan

  • If there are identical reference_numbers when creating a recycling plan, you will be informed: “plan has been created”
  • Multiple recurring_cycle can be created with this API in succession

Header parameters

x-appid
string

Example: {{appid}}

X-Skip-Signature
string

Example: TRUE

Signature
string

Example: good

Credential
string

Example: {{credential}}

x-request-id
string

Example: {{$string.uuid}}

x-i18n-lang
string

Example: zh-CN

Content-typerequired
string

Example: application/json

Request body · application/json

required
object
namerequired
string

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

note
string

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

object
description
string

Any description to remark about this record

callback_url
string
grace_period
number

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

redirect_url
string
customer_uuidrequired
string
required
array<object>
reference_number
string

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

payment_retry_countrequired
number

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_periodrequired
number

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.

default_collection_methodrequired
string

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

Responses

coderequired
integer
required
object
required
object
messagerequired
string