Skip to content

Passed email to the checkout url is not prefilled on the checkout page #162

@binduHR

Description

@binduHR

What area is the issue related to?

Checkout Sheet Kit

What platform does the issue affect?

All platforms

What version of @shopify/checkout-sheet-kit are you using?

3.2.0

Do you have reproducible example code?

My Code :

if (checkoutUrl) {
            // Append email to checkout URL if available
        if (email) {
            try {
                const url = new URL(checkoutUrl);
                const emailParameterName = 'email'; // Use "email" as the parameter name
                url.searchParams.append(emailParameterName, email);
                checkoutUrl = url.toString();
                console.log("Modified checkout URL:", checkoutUrl);
            } catch (error) {
                console.error("Error modifying checkout URL:", error);
                // Handle the error appropriately (e.g., show an error message to the user)
            }
        }
            console.log("Opening checkout URL:", checkoutUrl);
            // Present the checkout
            shopifyCheckout.present(checkoutUrl);
        } else {
            console.error("Checkout URL is not available.");
        }

Steps to Reproduce

I am trying to access the email from a deep link and if exists passing the value to checkout url in react native code

Expected Behavior

Expecting the email to be prefilled in the checkout sheet under the contact

Actual Behavior

Email is not being prefilled

Storefront domain

Testing it on ios simulator

Screenshots/Videos/Log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions