Recurring Billing
Get saved card details
Use this API to get the detail of recurring billing with a saved card
If the card is saved the response will have the card details (The last 4 digits and card brand). You can use the card details to display it to the users so they are aware of which card is saved and give them the option to change the card by navigating to the “url”
GET
/v1/recurring-billing/{recurring-billing-id}
X-BUSINESS-API-KEY*
X-Requested-With
curl --request GET \
--url https://api.sandbox.hit-pay.com/v1/recurring-billing/{recurring-billing-id} \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>'
{
"status": "200",
"example": "{\n \"id\": \"9741164c-06a1-4dd7-a649-72cca8f9603a\",\n \"business_recurring_plans_id\": \"\",\n \"customer_name\": \"Paul\",\n \"customer_email\": \"paul@hitpayapp.com\",\n \"name\": \"Spotify Premium\",\n \"description\": \"Spotify Monthly Subscription\",\n \"reference\": \"cust_id_123\",\n \"cycle\": \"save_card\",\n \"cycle_repeat\": null,\n \"cycle_frequency\": null,\n \"currency\": \"sgd\",\n \"amount\": 9.90,\n \"times_to_be_charged\": 3,\n \"times_charged\": 0,\n \"status\": \"scheduled\",\n \"send_email\": false,\n \"save_card\": 1,\n \"redirect_url\": \"https://github.com/\",\n \"payment_methods\": [\n \"giro\",\n \"card\"\n ],\n \"created_at\": \"2022-09-13T16:33:47\",\n \"updated_at\": \"2022-09-13T16:33:47\",\n \"expires_at\": null,\n \"url\": \"https://securecheckout.sandbox.hit-pay.com/9673bdea-058c-44b5-a957-845a7c487bc2/recurring-plan/9741164c-06a1-4dd7-a649-72cca8f9603a\",\n \"webhook\": \"https://webhoo.site/test\"\n}"
}
Authorizations
X-BUSINESS-API-KEYheaderrequired
string
Headers
X-Requested-With
Default: "XMLHttpRequest"string
Path Parameters
recurring-billing-idrequired
string
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: trueboolean
status
string
times_charged
Default: "0"integer
times_to_be_charged
Default: "0"integer
updated_at
string
url
string
webhook
string
curl --request GET \
--url https://api.sandbox.hit-pay.com/v1/recurring-billing/{recurring-billing-id} \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>'
{
"status": "200",
"example": "{\n \"id\": \"9741164c-06a1-4dd7-a649-72cca8f9603a\",\n \"business_recurring_plans_id\": \"\",\n \"customer_name\": \"Paul\",\n \"customer_email\": \"paul@hitpayapp.com\",\n \"name\": \"Spotify Premium\",\n \"description\": \"Spotify Monthly Subscription\",\n \"reference\": \"cust_id_123\",\n \"cycle\": \"save_card\",\n \"cycle_repeat\": null,\n \"cycle_frequency\": null,\n \"currency\": \"sgd\",\n \"amount\": 9.90,\n \"times_to_be_charged\": 3,\n \"times_charged\": 0,\n \"status\": \"scheduled\",\n \"send_email\": false,\n \"save_card\": 1,\n \"redirect_url\": \"https://github.com/\",\n \"payment_methods\": [\n \"giro\",\n \"card\"\n ],\n \"created_at\": \"2022-09-13T16:33:47\",\n \"updated_at\": \"2022-09-13T16:33:47\",\n \"expires_at\": null,\n \"url\": \"https://securecheckout.sandbox.hit-pay.com/9673bdea-058c-44b5-a957-845a7c487bc2/recurring-plan/9741164c-06a1-4dd7-a649-72cca8f9603a\",\n \"webhook\": \"https://webhoo.site/test\"\n}"
}