View Add-On Checkout Status
Access: organization admins for add-on checkout and lifecycle actions.
Polls status for an add-on payment intent.
GET
https://enterprise.spacemedia.uk
/
api
/
v1
/
addons
/
checkout
/
{intent}
/
status
View Add-On Checkout Status
curl --request GET \
--url https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancel_url": "https://demo-label.example.test/billing/cancel",
"success_url": "https://demo-label.example.test/billing/success"
}
'const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cancel_url: 'https://demo-label.example.test/billing/cancel',
success_url: 'https://demo-label.example.test/billing/success'
})
};
fetch('https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status', 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://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'cancel_url' => 'https://demo-label.example.test/billing/cancel',
'success_url' => 'https://demo-label.example.test/billing/success'
]),
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;
}import requests
url = "https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status"
payload = {
"cancel_url": "https://demo-label.example.test/billing/cancel",
"success_url": "https://demo-label.example.test/billing/success"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"payment_intent_id": "b2abec7d-3098-43fa-9d2f-2d0ffb2b9c52",
"status": "succeeded",
"addon_slug": "advanced-analytics",
"version": "1.0.0",
"installed": true
}
}{
"success": false,
"message": "Missing bearer token"
}{
"success": false,
"message": "This action is unauthorized."
}{
"success": false,
"message": "Resource not found"
}{
"success": false,
"message": "Validation failed.",
"errors": {
"title": [
"The title field is required."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Use application/json for API responses.
Bearer access token. Use Bearer <YOUR_ACCESS_TOKEN>.
Path Parameters
Route identifier for intent.
Body
application/json
The body is of type object.
Response
Success
The response is of type object.
Previous
Install Add-OnAccess: organization admins for add-on checkout and lifecycle actions.
Performs install for an add-on version in the current organization.
Next
⌘I
View Add-On Checkout Status
curl --request GET \
--url https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancel_url": "https://demo-label.example.test/billing/cancel",
"success_url": "https://demo-label.example.test/billing/success"
}
'const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cancel_url: 'https://demo-label.example.test/billing/cancel',
success_url: 'https://demo-label.example.test/billing/success'
})
};
fetch('https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status', 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://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'cancel_url' => 'https://demo-label.example.test/billing/cancel',
'success_url' => 'https://demo-label.example.test/billing/success'
]),
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;
}import requests
url = "https://enterprise.spacemedia.uk/api/v1/addons/checkout/{intent}/status"
payload = {
"cancel_url": "https://demo-label.example.test/billing/cancel",
"success_url": "https://demo-label.example.test/billing/success"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"payment_intent_id": "b2abec7d-3098-43fa-9d2f-2d0ffb2b9c52",
"status": "succeeded",
"addon_slug": "advanced-analytics",
"version": "1.0.0",
"installed": true
}
}{
"success": false,
"message": "Missing bearer token"
}{
"success": false,
"message": "This action is unauthorized."
}{
"success": false,
"message": "Resource not found"
}{
"success": false,
"message": "Validation failed.",
"errors": {
"title": [
"The title field is required."
]
}
}