$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://apiv1.chargemonk.com/reactivateSubscription", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array( 'api_token' => 'test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1', 'subscription_code' => 'WqaEEkM7' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
curl --location --request POST "https://apiv1.chargemonk.com/reactivateSubscription" \ --form "api_token=test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1" \ --form "subscription_code=WqaEEkM7"
require "uri" require "net/http" url = URI("https://apiv1.chargemonk.com/reactivateSubscription") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::Post.new(url) form_data = [['api_token', 'test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1'],['subscription_code', 'WqaEEkM7']] request.set_form form_data, 'multipart/form-data' response = http.request(request) puts response.read_body
import requests url = "https://apiv1.chargemonk.com/reactivateSubscription" payload = {'api_token': 'test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1', 'subscription_code': 'WqaEEkM7'} files = {} headers= {} response = requests.request("POST", url, headers=headers, data = payload, files = files) print(response.text.encode('utf8'))
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("api_token", "test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1") .addFormDataPart("subscription_code", "WqaEEkM7") .build(); Request request = new Request.Builder() .url("https://apiv1.chargemonk.com/reactivateSubscription") .method("POST", body) .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://apiv1.chargemonk.com/reactivateSubscription"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddParameter("api_token", "test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1"); request.AddParameter("subscription_code", "WqaEEkM7"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);
var request = require('request'); var options = { 'method': 'POST', 'url': 'https://apiv1.chargemonk.com/reactivateSubscription', 'headers': { }, formData: { 'api_token': 'test_fEZhxDQuOmIMBAVC7K0wtNoPpGgRyed1', 'subscription_code': 'WqaEEkM7' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Developer Resources
Build great experiences for your subscribers with our API, documentation, and resources.
Jump right in into API DocsChargeMonk's API
Let APIs streamline the process of subscription and billing by making data accessible and giving you entire control.
Systematic Client libraries
ChargeMonk supports several client libraries for you to work with. This makes the work easier and efficient.
Api Integration Tutorials
For faster results try ChargeMonk's integration tutorials which will help you work some API integration magic.