POST
/
v1
/
recurring-billing

Headers

X-BUSINESS-API-KEY
string
required

Body

application/json
plan_id
string

Subscription plan id created from Create a Subscription Plan API. If you would like to create a subscription without a plan, plan_id should be null

save_card
enum<string>
default: false

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

Available options:
true,
false
name
string

It's is required when save card = true or plan_id = null. By default, the name from the subscription plan will be used.

amount
string

It's is required when save card = true and plan_id = null. This is an optional value. By default, the amount from the subscription plan will be used. You can use this parameter for discounts for specific customers.

cycle
string

It's is required when plan_id = null. By default, the cycle from the subscription plan will be used.

customer_email
string
required

Customer email. It's required field

customer_name
string

It's optional field. Customer name

start_date
string
required

Billing start date (YYYY-MM-DD).

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
payment_methods
string[]

Payment methods to be used for the subscription. Options: [card, giro]

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
enum<string>
default: false

HitPay to send email receipts to the customer. Default value is false

Available options:
true,
false
times_to_be_charged
number

It's optional field. if you wish to save the card.