Changing the Theme for a Checkout Session Created via the API
1
Create a Checkout Session
Create a Checkout Session by following our How to Create Checkout Session guide and obtain the
url.2
Switch to dark theme
To switch to the dark theme, append the query parameter

theme=dark to your checkout session URL as obtained earlier. For example, if your checkout session URL is:https://polar.sh/checkout/polar_c_ES7DwhlyvlYTPNaLiccKqiwJPda43FIzerYou should use:https://polar.sh/checkout/polar_c_ES7DwhlyvlYTPNaLiccKqiwJPda43FIzer?theme=darkThe checkout session then looks like below:
3
Switch to light theme
Similarly, to switch to the light theme, append the query parameter

theme=light to your checkout session URL.For example:https://polar.sh/checkout/polar_c_ES7DwhlyvlYTPNaLiccKqiwJPda43FIzer?theme=lightThe checkout session then looks like below:
Switching Theme for a Checkout Link
1
Create a checkout link
Create a checkout link by referring to our Create a checkout link guide.
2
Switch to dark theme
To switch to the dark theme, append the query parameter

theme=dark to your checkout link.For example, if your checkout link is:https://sandbox-api.polar.sh/v1/checkout-links/polar_cl_QHMjrDLsORxLIRfyQlfyqF1TWUR6Cy4afVcd/redirectYou should use:https://sandbox-api.polar.sh/v1/checkout-links/polar_cl_QHMjrDLsORxLIRfyQlfyqF1TWUR6Cy4afVcd/redirect?theme=darkThe checkout session then looks like below:
3
Switch to light theme
Similarly, to switch to the light theme, append the query parameter

theme=light to your checkout link.For example:https://sandbox-api.polar.sh/v1/checkout-links/polar_cl_QHMjrDLsORxLIRfyQlfyqF1TWUR6Cy4afVcd/redirect?theme=lightThe checkout session then looks like below:

