Create Stripe Checkout Session
curl --request POST \
--url https://api.sandbox.isometric.com/registry/v0/stripe/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"cancel_url": "https://example.com/cancel",
"frequency": "monthly",
"isometric_terms_and_conditions_accepted": true,
"quantity_kg": 1000,
"success_url": "https://example.com/success",
"supplier_terms_and_conditions_accepted": true,
"customer_email": "user@example.com"
}
'import requests
url = "https://api.sandbox.isometric.com/registry/v0/stripe/checkout"
payload = {
"cancel_url": "https://example.com/cancel",
"frequency": "monthly",
"isometric_terms_and_conditions_accepted": True,
"quantity_kg": 1000,
"success_url": "https://example.com/success",
"supplier_terms_and_conditions_accepted": True,
"customer_email": "user@example.com"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cancel_url: 'https://example.com/cancel',
frequency: 'monthly',
isometric_terms_and_conditions_accepted: true,
quantity_kg: 1000,
success_url: 'https://example.com/success',
supplier_terms_and_conditions_accepted: true,
customer_email: 'user@example.com'
})
};
fetch('https://api.sandbox.isometric.com/registry/v0/stripe/checkout', 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.sandbox.isometric.com/registry/v0/stripe/checkout",
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([
'cancel_url' => 'https://example.com/cancel',
'frequency' => 'monthly',
'isometric_terms_and_conditions_accepted' => true,
'quantity_kg' => 1000,
'success_url' => 'https://example.com/success',
'supplier_terms_and_conditions_accepted' => true,
'customer_email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/registry/v0/stripe/checkout"
payload := strings.NewReader("{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
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.sandbox.isometric.com/registry/v0/stripe/checkout")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/registry/v0/stripe/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"redirect_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Stripe Connect
Create Stripe Checkout Session
Create a Stripe Checkout Session for purchasing credits with Isometric verification.
This endpoint returns a Stripe Checkout URL to redirect the user to for completing the payment.
POST
/
stripe
/
checkout
Create Stripe Checkout Session
curl --request POST \
--url https://api.sandbox.isometric.com/registry/v0/stripe/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"cancel_url": "https://example.com/cancel",
"frequency": "monthly",
"isometric_terms_and_conditions_accepted": true,
"quantity_kg": 1000,
"success_url": "https://example.com/success",
"supplier_terms_and_conditions_accepted": true,
"customer_email": "user@example.com"
}
'import requests
url = "https://api.sandbox.isometric.com/registry/v0/stripe/checkout"
payload = {
"cancel_url": "https://example.com/cancel",
"frequency": "monthly",
"isometric_terms_and_conditions_accepted": True,
"quantity_kg": 1000,
"success_url": "https://example.com/success",
"supplier_terms_and_conditions_accepted": True,
"customer_email": "user@example.com"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cancel_url: 'https://example.com/cancel',
frequency: 'monthly',
isometric_terms_and_conditions_accepted: true,
quantity_kg: 1000,
success_url: 'https://example.com/success',
supplier_terms_and_conditions_accepted: true,
customer_email: 'user@example.com'
})
};
fetch('https://api.sandbox.isometric.com/registry/v0/stripe/checkout', 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.sandbox.isometric.com/registry/v0/stripe/checkout",
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([
'cancel_url' => 'https://example.com/cancel',
'frequency' => 'monthly',
'isometric_terms_and_conditions_accepted' => true,
'quantity_kg' => 1000,
'success_url' => 'https://example.com/success',
'supplier_terms_and_conditions_accepted' => true,
'customer_email' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);
$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.sandbox.isometric.com/registry/v0/stripe/checkout"
payload := strings.NewReader("{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-secret", "<x-client-secret>")
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.sandbox.isometric.com/registry/v0/stripe/checkout")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.isometric.com/registry/v0/stripe/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancel_url\": \"https://example.com/cancel\",\n \"frequency\": \"monthly\",\n \"isometric_terms_and_conditions_accepted\": true,\n \"quantity_kg\": 1000,\n \"success_url\": \"https://example.com/success\",\n \"supplier_terms_and_conditions_accepted\": true,\n \"customer_email\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"redirect_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Headers
Body
application/json
Was this page helpful?