Get Checkout Session
curl --request GET \
--url https://app.flowglad.com/api/v1/checkout-sessions/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://app.flowglad.com/api/v1/checkout-sessions/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.flowglad.com/api/v1/checkout-sessions/{id}', 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://app.flowglad.com/api/v1/checkout-sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://app.flowglad.com/api/v1/checkout-sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flowglad.com/api/v1/checkout-sessions/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flowglad.com/api/v1/checkout-sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"checkoutSession": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"pricingModelId": "<string>",
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": -1,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"discountId": "<string>",
"type": "<string>",
"outputName": "<string>",
"expires": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"successUrl": "<string>",
"cancelUrl": "<string>",
"preserveBillingCycleAnchor": true,
"outputMetadata": {},
"targetSubscriptionId": null,
"automaticallyUpdateSubscriptions": null
},
"url": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Checkout Sessions
Get Checkout Session
GET
/
api
/
v1
/
checkout-sessions
/
{id}
Get Checkout Session
curl --request GET \
--url https://app.flowglad.com/api/v1/checkout-sessions/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://app.flowglad.com/api/v1/checkout-sessions/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.flowglad.com/api/v1/checkout-sessions/{id}', 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://app.flowglad.com/api/v1/checkout-sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://app.flowglad.com/api/v1/checkout-sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flowglad.com/api/v1/checkout-sessions/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flowglad.com/api/v1/checkout-sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"checkoutSession": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"pricingModelId": "<string>",
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": -1,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"discountId": "<string>",
"type": "<string>",
"outputName": "<string>",
"expires": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"successUrl": "<string>",
"cancelUrl": "<string>",
"preserveBillingCycleAnchor": true,
"outputMetadata": {},
"targetSubscriptionId": null,
"automaticallyUpdateSubscriptions": null
},
"url": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Path Parameters
Response
Successful response
Was this page helpful?
⌘I