PUT
/
v1
/
recurring-billing
/
{recurring-billing-id}

Headers

X-BUSINESS-API-KEY
string
required

Path Parameters

recurring-billing-id
string
required

id value from the create recurring billing API

Body

application/json
plan_id
string

Plan ID, if plan_id is not null it will update [cycle, cycle_repeat, cycle_frequency and amount] with the values from Subscription plan. if plan_id is null you can update each field individually. When save_card is true, you disallow to set plan_id

name
string

Plan name

description
string

Plan description

cycle
string

Billing frequency (weekly / monthly / yearly / custom)

cycle_repeat
integer

It is required field when cycle is custom. New cycle will only be affective at the end of the current cycle. Min:1, Max: 999

cycle_frequency
string
default: options: [day, week, month, year]

It is required field when cycle is custom. For cycle = custom, set the frequency for cycle repeat field options [day, week, month, year]

save_card
string

Only set the value “true” if you wish to save the card and charge the customer later on. More details in “Save Card” section

customer_email
string
customer_name
string
start_date
string

The start date must be a date after or equal to today and Billing start date (YYYY-MM-DD) in SGT, only possible to change start date for recurring billing ID with status = scheduled or active

redirect_url
string

URL where HitPay redirects the user after the users enters the card details and the subscription is active. Query arguments reference (subscription id) and status are sent along

reference
string

Arbitrary reference number that you can map to your internal reference number. This value cannot be edited by the customer

amount
number

New amount, customer will be charged the new amount on the next cycle. Min: 0.01, Max 999999.99

webhook
string

Optional URL value to which HitPay will send a POST request when there is a new charge or if there is an error charging the card

send_email
boolean
default: false

Optional URL value to which HitPay will send a POST request when there is a new charge or if there is an error charging the card

Response

200 - application/json
id
string
business_recurring_plans_id
string
customer_name
string
customer_email
string
name
string
description
string
reference
string
cycle
string
cycle_repeat
any
cycle_frequency
any
currency
string
amount
number
default: 0
times_to_be_charged
integer
default: 0
times_charged
integer
default: 0
status
string
send_email
integer
default: 0
save_card
integer
default: 0
redirect_url
string
payment_methods
string[]
created_at
string
updated_at
string
expires_at
any
url
string
webhook
string