Learn how to handle checkout completion using redirects instead of webhooks for simpler implementation and testing
success_url
and cancel_url
parameterssuccess_url
with the checkout session ID as a query parameterImportant: Include{CHECKOUT_SESSION_ID}
in your success URL.
Flex will replace this with the actual checkout session ID when redirecting the user.
https://api.withflex.com/v1/checkout/sessions/{CHECKOUT_SESSION_ID}
Method: GET
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
status
: Payment status (open
, complete
, expired
)amount_total
: Total amount in centscustomer_details
: Customer informationline_items
: Items purchasedcancel_url
. No checkout session ID is provided in this case.
complete
before fulfilling orders:
Need help? If you have questions about implementing redirects or need assistance with your integration, please reach out to our support team.