get__subscriptions_checkout-session_{id}
GET /subscriptions/checkout-session/{id}
Get Checkout Session Status
Retrieve the status and details of a Stripe checkout session by its ID. This endpoint is useful for checking payment status and subscription creation after a user completes the checkout process.
Parameters
id
path
string
true
Unique identifier for the Stripe checkout session
TypeScript Client Library
public getCheckoutSessionStatus = async (id: string): Promise<GetCheckoutSessionStatusResponse> => {
return this.makeRequest<GetCheckoutSessionStatusResponse>(`subscriptions/checkout-session/${id}`, 'GET', null);
};Code Samples
# You can also use wget
curl -X GET https://backend.flashback.tech/subscriptions/checkout-session/cs_test_1234567890abcdef \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'GET https://backend.flashback.tech/subscriptions/checkout-session/cs_test_1234567890abcdef HTTP/1.1
Host: localhost:3000
Accept: application/json
Authorization: Bearer {access-token}const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
const sessionId = 'cs_test_1234567890abcdef';
fetch(`https://backend.flashback.tech/subscriptions/checkout-session/${sessionId}`,
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});Example responses
200 Response
{
"success": true,
"id": "cs_test_1234567890abcdef",
"status": "complete",
"payment_status": "paid",
"subscriptionId": "sub_1234567890abcdef"
}200 Response (Open Session)
200 Response (Expired Session)
400 Response
Responses
Response Schema
Status Code 200
» success
boolean
false
none
Indicates if the request was successful
» id
string
false
none
Stripe checkout session identifier
» status
string
false
none
Session status (open, complete, expired)
» payment_status
string
false
none
Payment status (unpaid, paid, no_payment_required)
» subscriptionId
string
false
none
Stripe subscription ID (null if not created)
Status Code 400
» success
boolean
false
none
Will be false for error responses
» error_code
string
false
none
Machine-readable error code
» message
string
false
none
Human-readable error message
Last updated
Was this helpful?