githubEdit

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

Name
In
Type
Required
Description

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}'

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

Status
Meaning
Description
Schema

200

Checkout session details

Inline

400

Invalid session ID

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» 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

Name
Type
Required
Restrictions
Description

» 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?