curl --request POST \
--url https://api.example.com/v1/sdk/checkout-sessions \
--header 'Content-Type: application/json' \
--data '
{
"customerRef": "cus_3C4D5E6F",
"productRef": "prd_1A2B3C4D",
"planRef": "pln_2b3c4d5e",
"returnUrl": "<string>"
}
'{
"checkoutUrl": "<string>",
"sessionId": "<string>"
}Creates a hosted checkout session for a customer to purchase a product plan. Returns a session ID and checkout URL for redirect.
curl --request POST \
--url https://api.example.com/v1/sdk/checkout-sessions \
--header 'Content-Type: application/json' \
--data '
{
"customerRef": "cus_3C4D5E6F",
"productRef": "prd_1A2B3C4D",
"planRef": "pln_2b3c4d5e",
"returnUrl": "<string>"
}
'{
"checkoutUrl": "<string>",
"sessionId": "<string>"
}