API Storefront Checkout: post credit card data and recive redirectURL

Topic summary

Developer building a Svelte custom storefront with Shopify Storefront API wants to collect credit card data directly on their site, process the payment, and include a redirect URL to send the customer to another site after processing.

Current approach: using the Storefront API checkoutCreate mutation, which returns only a checkout/purchase link (webUrl) that takes users off-site to Shopify’s checkout.

Key question: how to submit credit card data via the API and control the post-payment redirect URL, without sending users away from the custom site.

Context: a screenshot of the custom payment form is provided.

Status: no solution or guidance provided yet; the request remains open.

Summarized with AI on January 17. AI used: gpt-5.

hi, I’m developing a website with svelte and shopify API storefront, but I need from my site you can ask for credit card data to process the payment and that when processing said payment I can redirect to another site that is sent along with the credit card data, currently I was using checkoutCreate but this only returns the purchase link by taking out of my site.

I’m currently using:
https://shopify.dev/docs/api/storefront/2023-07/mutations/checkoutCreate

My form:

1 Like