PUT

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

X-BUSINESS-API-KEY*
X-Requested-With
curl --request PUT \
  --url https://api.sandbox.hit-pay.com/v1/recurring-billing/{recurring-billing-id} \
  --header 'Content-Type: application/json' \
  --header 'X-BUSINESS-API-KEY: <x-business-api-key>'
{
  "status": "200",
  "example": "{\n    \"id\": \"9741164c-06a1-4dd7-a649-72cca8f9603a\",\n    \"business_recurring_plans_id\": \"973ee344-6737-4897-9929-edbc9d7bf433\",\n    \"customer_name\": \"Paul\",\n    \"customer_email\": \"paul@newemail.com\",\n    \"name\": \"Spotify Premium\",\n    \"description\": \"Spotify Monthly Subscription\",\n    \"reference\": \"cust_id_123\",\n    \"cycle\": \"monthly\",\n    \"cycle_repeat\": null,\n    \"cycle_frequency\": null,\n    \"currency\": \"sgd\",\n    \"amount\": 12.9,\n    \"times_to_be_charged\": 9,\n    \"times_charged\": 2,\n    \"status\": \"active\",\n    \"send_email\": 0,\n    \"save_card\": 0,\n    \"redirect_url\": \"https://newexamaple.com/completed\",\n    \"payment_methods\": [\n        \"giro\",\n        \"card\"\n    ],\n    \"created_at\": \"2022-09-13T21:32:00\",\n    \"updated_at\": \"2022-09-13T21:32:00\",\n    \"expires_at\": null,\n    \"url\": \"https://securecheckout.sandbox.hit-pay.com/973ee344-6737-4897-9929-edbc9d7bf433/recurring-plan/9741164c-06a1-4dd7-a649-72cca8f9603a\",\n    \"webhook\": \"http://newwebhoo.site/test\"\n}"
}

Authorizations

X-BUSINESS-API-KEYheaderrequired
string

Headers

X-Requested-With
Default: "XMLHttpRequest"
string

Path Parameters

recurring-billing-idrequired
string

id value from the create recurring billing API

Body

application/json
amount
number

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

customer_email
string
customer_name
string
cycle
string

Billing frequency (weekly / monthly / yearly / custom)

cycle_frequency
Default: "options: [day, week, month, year]"
string

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

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

description
string

Plan description

name
string

Plan name

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

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

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

send_email
Default: false
boolean

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

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

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

Response

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