curl --request POST \
--url https://sandbox.circularo.com/api/v1/stripe/webhookimport requests
url = "https://sandbox.circularo.com/api/v1/stripe/webhook"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sandbox.circularo.com/api/v1/stripe/webhook', 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://sandbox.circularo.com/api/v1/stripe/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://sandbox.circularo.com/api/v1/stripe/webhook"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v1/stripe/webhook")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/stripe/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 500,
"type": "SYSTEM:INTERNAL_ERROR",
"message": "Internal error",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Receive an event from the payment provider
POST /stripe/webhook
The address the payment provider calls to report what has happened to a subscription - a checkout that was completed, an invoice that was paid, failed or is waiting for the payer to act, and a subscription that was changed, whose change expired unpaid, or that ended. It is not meant for clients; it is what keeps the organization’s subscription, its plan and its allowances in step with what has actually been paid for.
Which workspace the call belongs to follows from the address it arrived on, and the event has to be signed with that workspace’s webhook secret - the signature travels in the Stripe-Signature header and is checked against the untouched body, so the call has to reach the platform exactly as it was sent. It is answered as soon as that check passes and the event has been queued, which keeps the provider from retrying a call that is merely taking a while; the event is applied from the queue afterwards and tried again for a while when applying it fails, and a call whose event cannot be queued fails for the provider to deliver it again. Events of a kind the platform does not watch are dropped, and one that has already been applied is not applied twice. The subscription is read from the provider whenever a payment, a change or an end is reported, and the invoice whenever a payment problem is, and a subscription is linked to an organization only when it was bought through that organization’s own checkout or bills its own customer, so an event delivered late or out of order applies the subscription as it stands now: one that has ended grants no access, one whose payments the provider has stopped collecting leaves the organization suspended, and a payment problem of an invoice settled in the meantime, or of a subscription that is paid up, is not recorded. An event of a provider subscription other than the one the organization is linked to, or of an organization whose subscription another billing system looks after, is recorded but not applied - except the end of the linked provider subscription, which still removes the link; one that names a workspace connected to another provider account than the workspace whose address it arrived on is not applied at all, and one that names another workspace on the same account is applied only as the provider confirms it.
No authorization: No authorization is required to call this endpoint.
curl --request POST \
--url https://sandbox.circularo.com/api/v1/stripe/webhookimport requests
url = "https://sandbox.circularo.com/api/v1/stripe/webhook"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sandbox.circularo.com/api/v1/stripe/webhook', 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://sandbox.circularo.com/api/v1/stripe/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://sandbox.circularo.com/api/v1/stripe/webhook"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.circularo.com/api/v1/stripe/webhook")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/stripe/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 500,
"type": "SYSTEM:INTERNAL_ERROR",
"message": "Internal error",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}