Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Cancel an active recurring billing subscription
cURL
curl --request DELETE \ --url https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id} \ --header 'X-BUSINESS-API-KEY: <x-business-api-key>'
import requests url = "https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}" headers = {"X-BUSINESS-API-KEY": "<x-business-api-key>"} response = requests.delete(url, headers=headers) print(response.text)
const options = {method: 'DELETE', headers: {'X-BUSINESS-API-KEY': '<x-business-api-key>'}}; fetch('https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "X-BUSINESS-API-KEY: <x-business-api-key>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.delete("https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}") .header("X-BUSINESS-API-KEY", "<x-business-api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://api.hit-pay.com/v1/recurring-billing/{recurring_billing_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["X-BUSINESS-API-KEY"] = '<x-business-api-key>' response = http.request(request) puts response.read_body
"{\n \"id\": \"9741164c-06a1-4dd7-a649-72cca8f9603a\",\n \"business_recurring_plans_id\": \"973ee344-6737-4897-9929-edbc9d7bf433\",\n \"customer_name\": \"Paul\",\n \"customer_email\": \"[email protected]\",\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\": 9.90,\n \"times_to_be_charged\": 3,\n \"times_charged\": 0,\n \"status\": \"canceled\",\n \"send_email\": false,\n \"save_card\": 0,\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\": \"2022-11-11T23:59:59\",\n \"url\": \"https://securecheckout.sandbox.hit-pay.com/973ee344-6737-4897-9929-edbc9d7bf433/recurring-plan/9741164c-06a1-4dd7-a649-72cca8f9603a\"\n}"
{ "message": "No query results for model [App\\Business\\RecurringBilling] 97414c99-01ca-464d-a57b-81851b307e09" }
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
200
"9741164c-06a1-4dd7-a649-72cca8f9603a"
"973ee344-6737-4897-9929-edbc9d7bf433"
"Paul"
"[email protected]"
"Spotify Premium"
"Spotify Monthly Subscription"
"cust_id_123"
"monthly"
"sgd"
9.9
3
0
"canceled"
false
"https://github.com/"
"2022-09-13T16:33:47"
"2022-11-11T23:59:59"
"https://securecheckout.sandbox.hit-pay.com/973ee344-6737-4897-9929-edbc9d7bf433/recurring-plan/9741164c-06a1-4dd7-a649-72cca8f9603a"
Was this page helpful?