curl --request POST \
--url https://api.tagada.io/api/public/v1/subscriptions/rebill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionId": "sub_123"
}
'import requests
url = "https://api.tagada.io/api/public/v1/subscriptions/rebill"
payload = { "subscriptionId": "sub_123" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionId: 'sub_123'})
};
fetch('https://api.tagada.io/api/public/v1/subscriptions/rebill', 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.tagada.io/api/public/v1/subscriptions/rebill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionId' => 'sub_123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagada.io/api/public/v1/subscriptions/rebill"
payload := strings.NewReader("{\n \"subscriptionId\": \"sub_123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tagada.io/api/public/v1/subscriptions/rebill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"sub_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/subscriptions/rebill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"sub_123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Subscription rebilled successfully"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Rebill subscription
Attempt to rebill a subscription. When a next billing date is set, it must be due or within the next 12 hours, including exactly 12 hours from now. If the next billing date is more than 12 hours away, the API returns HTTP 200 with success: false, outcome.status: skipped, and outcome.reason: not_due_yet; no charge is made and the next billing date is unchanged. A subscription billed as part of a subscription group is rebilled as one charge for the whole group: the amount covers every billable member and the outcome reports that group attempt. Retry metadata count and attempts are handled internally. The response reports what the attempt actually did: outcome.status is one of captured, pending, declined, skipped or cancelled, and success is true only when the customer was charged. Returns 404 when the subscription does not exist and 409 when its status does not allow a rebill.
curl --request POST \
--url https://api.tagada.io/api/public/v1/subscriptions/rebill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionId": "sub_123"
}
'import requests
url = "https://api.tagada.io/api/public/v1/subscriptions/rebill"
payload = { "subscriptionId": "sub_123" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionId: 'sub_123'})
};
fetch('https://api.tagada.io/api/public/v1/subscriptions/rebill', 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.tagada.io/api/public/v1/subscriptions/rebill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionId' => 'sub_123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tagada.io/api/public/v1/subscriptions/rebill"
payload := strings.NewReader("{\n \"subscriptionId\": \"sub_123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tagada.io/api/public/v1/subscriptions/rebill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"sub_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/subscriptions/rebill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"sub_123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Subscription rebilled successfully"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}