Checkout Sessions
Reauth Checkout Session
Reauth a Checkout Session.
POST
/
v1
/
checkout
/
sessions
/
{id}
/
reauth
Copy
curl --request POST \
--url https://api.withflex.com/v1/checkout/sessions/{id}/reauth \
--header 'Authorization: Bearer <token>'
Copy
{
"checkout_session": {
"allow_promotion_codes": true,
"amount_total": 123,
"amount_subtotal": 123,
"cancel_url": "<string>",
"captures": [
{
"amount_captured": 123,
"capture_id": "<string>",
"created_at": "<string>",
"items": [
{
"amount_captured": 123,
"capture_item_id": "<string>",
"created_at": "<string>",
"price": {
"price_id": "<string>",
"description": "<string>",
"trial_period_days": 123,
"unit_amount": 123,
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"active": true,
"product": {
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"visit_type": "cbtSleep",
"active": true,
"upc_code": "<string>",
"gtin": "<string>",
"reference_gtin": "<string>",
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true,
"metadata": {}
},
"created_at": "<string>",
"type": "one_time",
"metadata": {},
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true
},
"payment_intent": "<string>",
"test_mode": true
}
],
"metadata": {},
"test_mode": true
}
],
"capture_method": "automatic",
"checkout_session_id": "<string>",
"client_reference_id": "<string>",
"created_at": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"defaults": {
"customer_id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>"
},
"expires_at": 123,
"invoice": "<string>",
"hsa_fsa_eligible": true,
"letter_of_medical_necessity_required": true,
"metadata": {},
"mode": "payment",
"origin": "shopify",
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"redirect_url": "<string>",
"refunds": [
{
"refund_id": "<string>",
"payment_intent_id": "<string>",
"amount": 123,
"created_at": "<string>",
"reason": "duplicate",
"status": "pending",
"test_mode": true,
"metadata": {}
}
],
"setup_intent": "<string>",
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_amount": 123
},
"shipping_address_collection": true,
"shipping_details": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"split_cart": {
"split_cart_id": "<string>",
"eligible_cart": {
"amount_total": 123,
"amount_subtotal": 123,
"amount_tax": 123,
"amount_discount": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"amount_shipping": 123
},
"non_eligible_cart": {
"amount_total": 123,
"amount_subtotal": 123,
"amount_tax": 123,
"amount_discount": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"amount_shipping": 123
},
"checkout_session_id": "<string>"
},
"status": "open",
"success_url": "<string>",
"subscription": {
"subscription_id": "<string>",
"created_at": "<string>",
"items": [
{
"subscription_item_id": "<string>",
"price": {
"price_id": "<string>",
"description": "<string>",
"trial_period_days": 123,
"unit_amount": 123,
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"active": true,
"product": {
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"visit_type": "cbtSleep",
"active": true,
"upc_code": "<string>",
"gtin": "<string>",
"reference_gtin": "<string>",
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true,
"metadata": {}
},
"created_at": "<string>",
"type": "one_time",
"metadata": {},
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true
},
"quantity": 123,
"created_at": "<string>",
"updated_at": "<string>",
"test_mode": true
}
],
"latest_invoice": {
"invoice_id": "<string>",
"total": 123,
"amount_due": 123,
"amount_paid": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"charge": "<string>",
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"period_end": "<string>",
"period_start": "<string>",
"subscription": {},
"status": "draft",
"collection_method": "charge_automatically",
"test_mode": true,
"metadata": {}
},
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"status": "incomplete",
"cancel_at_period_end": true,
"current_period_end": "<string>",
"current_period_start": "<string>",
"metadata": {},
"test_mode": true,
"client_secret": {
"setup_secret": "<string>",
"payment_secret": "<string>"
},
"proration_behavior": "always_invoice",
"trial_start": "<string>",
"trial_end": "<string>",
"cancel_at": "<string>"
},
"subscription_data": {
"cancel_at": "<string>",
"trial_end": "<string>",
"cancel_at_period_end": true,
"trial_period_days": 123
},
"tax_rate": {
"amount": 123
},
"test_mode": true,
"total_details": {
"amount_discount": 123,
"amount_tax": 123,
"amount_shipping": 123,
"amount_iias": 123,
"amount_vision": 123,
"amount_prescription": 123,
"amount_service": 123
},
"visit_type": "cbtSleep",
"setup_future_use": "<any>"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Response
200
application/json
The response is of type object
.
Copy
curl --request POST \
--url https://api.withflex.com/v1/checkout/sessions/{id}/reauth \
--header 'Authorization: Bearer <token>'
Copy
{
"checkout_session": {
"allow_promotion_codes": true,
"amount_total": 123,
"amount_subtotal": 123,
"cancel_url": "<string>",
"captures": [
{
"amount_captured": 123,
"capture_id": "<string>",
"created_at": "<string>",
"items": [
{
"amount_captured": 123,
"capture_item_id": "<string>",
"created_at": "<string>",
"price": {
"price_id": "<string>",
"description": "<string>",
"trial_period_days": 123,
"unit_amount": 123,
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"active": true,
"product": {
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"visit_type": "cbtSleep",
"active": true,
"upc_code": "<string>",
"gtin": "<string>",
"reference_gtin": "<string>",
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true,
"metadata": {}
},
"created_at": "<string>",
"type": "one_time",
"metadata": {},
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true
},
"payment_intent": "<string>",
"test_mode": true
}
],
"metadata": {},
"test_mode": true
}
],
"capture_method": "automatic",
"checkout_session_id": "<string>",
"client_reference_id": "<string>",
"created_at": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"defaults": {
"customer_id": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>"
},
"expires_at": 123,
"invoice": "<string>",
"hsa_fsa_eligible": true,
"letter_of_medical_necessity_required": true,
"metadata": {},
"mode": "payment",
"origin": "shopify",
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"redirect_url": "<string>",
"refunds": [
{
"refund_id": "<string>",
"payment_intent_id": "<string>",
"amount": 123,
"created_at": "<string>",
"reason": "duplicate",
"status": "pending",
"test_mode": true,
"metadata": {}
}
],
"setup_intent": "<string>",
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_amount": 123
},
"shipping_address_collection": true,
"shipping_details": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"split_cart": {
"split_cart_id": "<string>",
"eligible_cart": {
"amount_total": 123,
"amount_subtotal": 123,
"amount_tax": 123,
"amount_discount": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"amount_shipping": 123
},
"non_eligible_cart": {
"amount_total": 123,
"amount_subtotal": 123,
"amount_tax": 123,
"amount_discount": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"amount_shipping": 123
},
"checkout_session_id": "<string>"
},
"status": "open",
"success_url": "<string>",
"subscription": {
"subscription_id": "<string>",
"created_at": "<string>",
"items": [
{
"subscription_item_id": "<string>",
"price": {
"price_id": "<string>",
"description": "<string>",
"trial_period_days": 123,
"unit_amount": 123,
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"active": true,
"product": {
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"visit_type": "cbtSleep",
"active": true,
"upc_code": "<string>",
"gtin": "<string>",
"reference_gtin": "<string>",
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true,
"metadata": {}
},
"created_at": "<string>",
"type": "one_time",
"metadata": {},
"hsa_fsa_eligibility": "not_eligible",
"test_mode": true
},
"quantity": 123,
"created_at": "<string>",
"updated_at": "<string>",
"test_mode": true
}
],
"latest_invoice": {
"invoice_id": "<string>",
"total": 123,
"amount_due": 123,
"amount_paid": 123,
"payment_intent": {
"payment_intent_id": "<string>",
"amount": 123,
"amount_capturable": 123,
"amount_received": 123,
"application_fee_amount": 123,
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"transfer_data": {
"amount": 123,
"destination": "<string>"
},
"status": "canceled",
"latest_charge": "<string>",
"created_at": "<string>",
"invoice": "<string>",
"capture_method": "automatic",
"client_secret": "<string>",
"metadata": {},
"payment_method": "<string>",
"test_mode": true,
"transfer_group": "<string>"
},
"charge": "<string>",
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"period_end": "<string>",
"period_start": "<string>",
"subscription": {},
"status": "draft",
"collection_method": "charge_automatically",
"test_mode": true,
"metadata": {}
},
"customer": {
"customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
"first_name": "John",
"last_name": "Doe",
"email": "joh.doe@example.com",
"phone": "+15555555555",
"employer": "Flex",
"shipping": {
"shipping_address_id": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"created_at": "<string>",
"test_mode": true
},
"status": "incomplete",
"cancel_at_period_end": true,
"current_period_end": "<string>",
"current_period_start": "<string>",
"metadata": {},
"test_mode": true,
"client_secret": {
"setup_secret": "<string>",
"payment_secret": "<string>"
},
"proration_behavior": "always_invoice",
"trial_start": "<string>",
"trial_end": "<string>",
"cancel_at": "<string>"
},
"subscription_data": {
"cancel_at": "<string>",
"trial_end": "<string>",
"cancel_at_period_end": true,
"trial_period_days": 123
},
"tax_rate": {
"amount": 123
},
"test_mode": true,
"total_details": {
"amount_discount": 123,
"amount_tax": 123,
"amount_shipping": 123,
"amount_iias": 123,
"amount_vision": 123,
"amount_prescription": 123,
"amount_service": 123
},
"visit_type": "cbtSleep",
"setup_future_use": "<any>"
}
}
Assistant
Responses are generated using AI and may contain mistakes.