curl --request GET \
--url https://us.api.flexprice.io/v1/checkout/sessions/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://us.api.flexprice.io/v1/checkout/sessions/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://us.api.flexprice.io/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://us.api.flexprice.io/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 => [
"x-api-key: <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://us.api.flexprice.io/v1/checkout/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://us.api.flexprice.io/v1/checkout/sessions/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/checkout/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"action": "create_subscription",
"cancel_url": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"checkout_invoice_id": "<string>",
"checkout_payment_id": "<string>",
"checkout_status": "initiated",
"completed_at": "2023-11-07T05:31:56Z",
"configuration": {
"add_addon_params": {
"addons": [
{
"addon_id": "<string>",
"association_id": "<string>",
"cadence": "onetime",
"proration_behavior": "create_prorations",
"start_date": "2023-11-07T05:31:56Z"
}
],
"subscription_id": "<string>"
},
"create_subscription_params": {
"billing_period": "MONTHLY",
"currency": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"lookup_key": "<string>",
"metadata": {},
"plan_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"subscription_id": "<string>"
},
"modify_subscription_params": {
"line_item_modifications": [
{
"effective_date": "2023-11-07T05:31:56Z",
"line_item_id": "<string>",
"quantity": "<string>"
}
],
"subscription_id": "<string>"
},
"wallet_topup_params": {
"wallet_id": "<string>",
"wallet_transaction_id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"customer_id": "<string>",
"environment_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"failure_url": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"payment_action": {
"type": "checkout_url",
"url": "<string>"
},
"payment_provider": "razorpay",
"payment_provider_config": {
"collection_method": "charge_automatically",
"max_mandate_limit": "<string>",
"payment_method": "CARD"
},
"provider_result": {
"expires_at": "2023-11-07T05:31:56Z",
"next_action": {
"type": "checkout_url",
"url": "<string>"
},
"provider_metadata": {},
"provider_payment_intent_id": "<string>",
"provider_session_id": "<string>"
},
"result": {
"create_subscription_result": {
"invoice_id": "<string>",
"payment_id": "<string>",
"subscription_id": "<string>"
}
},
"status": "published",
"success_url": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Get checkout session
curl --request GET \
--url https://us.api.flexprice.io/v1/checkout/sessions/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://us.api.flexprice.io/v1/checkout/sessions/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://us.api.flexprice.io/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://us.api.flexprice.io/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 => [
"x-api-key: <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://us.api.flexprice.io/v1/checkout/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://us.api.flexprice.io/v1/checkout/sessions/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/checkout/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"action": "create_subscription",
"cancel_url": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"checkout_invoice_id": "<string>",
"checkout_payment_id": "<string>",
"checkout_status": "initiated",
"completed_at": "2023-11-07T05:31:56Z",
"configuration": {
"add_addon_params": {
"addons": [
{
"addon_id": "<string>",
"association_id": "<string>",
"cadence": "onetime",
"proration_behavior": "create_prorations",
"start_date": "2023-11-07T05:31:56Z"
}
],
"subscription_id": "<string>"
},
"create_subscription_params": {
"billing_period": "MONTHLY",
"currency": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"lookup_key": "<string>",
"metadata": {},
"plan_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"subscription_id": "<string>"
},
"modify_subscription_params": {
"line_item_modifications": [
{
"effective_date": "2023-11-07T05:31:56Z",
"line_item_id": "<string>",
"quantity": "<string>"
}
],
"subscription_id": "<string>"
},
"wallet_topup_params": {
"wallet_id": "<string>",
"wallet_transaction_id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"customer_id": "<string>",
"environment_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"failure_url": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"payment_action": {
"type": "checkout_url",
"url": "<string>"
},
"payment_provider": "razorpay",
"payment_provider_config": {
"collection_method": "charge_automatically",
"max_mandate_limit": "<string>",
"payment_method": "CARD"
},
"provider_result": {
"expires_at": "2023-11-07T05:31:56Z",
"next_action": {
"type": "checkout_url",
"url": "<string>"
},
"provider_metadata": {},
"provider_payment_intent_id": "<string>",
"provider_session_id": "<string>"
},
"result": {
"create_subscription_result": {
"invoice_id": "<string>",
"payment_id": "<string>",
"subscription_id": "<string>"
}
},
"status": "published",
"success_url": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Checkout session ID
Response
OK
create_subscription, modify_subscription, wallet_topup, add_addon CheckoutInvoiceID and CheckoutPaymentID are set once the apply step creates the corresponding Flexprice entities (completed sessions only).
initiated, pending, completed, failed, expired Show child attributes
Show child attributes
ExpiresAt is required. A Temporal timer fires at this time for any session still in initiated|pending, marking it expired. The caller must create a new session after expiry (expire-and-restart model).
FailureReason is a human-readable string set on failed sessions.
IdempotencyKey is caller-supplied. It is unique only while the session is active (initiated|pending). The same key may be reused once the session reaches a terminal state (completed|failed|expired).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
razorpay Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
published, deleted, archived Redirect URLs sent to the payment provider. The provider redirects the user browser to the appropriate URL after the payment flow completes.

