Wix Headless · Support case
Events ticket checkout fails with INVALID_PAYMENT_REDIRECT_URL
No ticket order has ever been created on this site. Every buyer reaches the Wix-hosted ticket form, submits their details, and the place-order call is rejected. The Events API itself works when called directly — only the hosted checkout fails.
What we need: confirmation of how a self-managed headless project should serve Wix-hosted checkout when the site’s primary domain points to an external host, and why paymentRedirectUrl on our connected subdomain is rejected. A second, separate defect is described in §6 (a server-side crash in your URL builder).
1. Account and environment
| Item | Value |
|---|---|
| metaSiteId | d8c2d5e1-46fb-4feb-ac98-84bf9b799d63 |
| hosted-pages siteId | f6e17b70-3e61-4deb-af12-1919a3840ff3 |
| OAuth client | 9b14296d-11f5-430e-91ba-356dc060f0f4 (“master”, WEB_APP / REACT) |
| Frontend | www.stylemachine.art — self-managed headless (Next.js on Vercel) |
| Primary domain | stylemachine.art — NAMESERVERS, assignmentType PRIMARY, dnsPropagationStatus FAILED |
| Wix pages host | checkout.stylemachine.art — assignmentType REDIRECT, dnsPropagation COMPLETED |
| Published primary URL | https://www.stylemachine.art/ |
2. The failure
The buyer selects tickets on our site. We create a reservation, then a redirect session, and send them to the Wix-hosted ticket form. The form loads correctly. They enter first name, last name and email and press Next. The place-order request returns 400:
"grpc-status-details": {
"applicationError": {
"code": "INVALID_PAYMENT_REDIRECT_URL",
"description": ""
}
},
"failed-client.method": "wix.events.ticketing.CheckoutService/Checkout",
"failed-client.options.authority": "com.wixpress.events.events-ticketing-v1-proxy"
The browser shows only “Some fields have invalid or missing information.” The request payload the hosted page sent:
{
"data": { "firstName": "...", "lastName": "...", "email": "..." },
"guests": null,
"reservationId": "f28ecb73-947a-490e-a468-60faec8d3eb5",
"giftCardCode": "",
"locale": "en",
"paymentRedirectUrl":
"https://checkout.stylemachine.art/__events/event-details/<slug>/order/<id>
?reservationId=<id>
&origin=https%3A%2F%2Fwww.stylemachine.art%2Fevents%2F<slug>
&headlessExternalUrls=~(events-typ~%27...~headlessClientId~%279b14296d-...)"
}
The only field that looks contentious is paymentRedirectUrl, which is on checkout.stylemachine.art.
3. Why that URL is on that domain
This is the crux, and we believe it is a configuration gap we cannot close ourselves.
createRedirectSessionbuildsfullUrlon the site’s primary domain:https://www.stylemachine.art/_api/iam/cookie/v1/createSessionCookie?...- But
www.stylemachine.artresolves to Vercel, our external frontend. It returns 404 for all Wix page routes, so that URL is unusable as issued. - We therefore rewrite the host to
checkout.stylemachine.art(a subdomain connected to the Wix site). That works:createSessionCookiereturns 302 and the ticket form returns 200. - The hosted page then derives
paymentRedirectUrlfrom its own origin —checkout.stylemachine.art— and your validator rejects it.
Notably, the hosted page itself reports siteUrl and externalBaseUrl as https://checkout.stylemachine.art. So the page considers that its own domain, while the Redirects API still builds on www. That inconsistency appears to be the root of this.
4. Evidence this has never worked
listOrdersreturns total 0 for the whole site, scoped across all 9 ticketed events including ended ones. Not one order in any state — not evenINITIATED, which is created before payment.- After we created two test orders via the API, the same call returned exactly 2 — confirming the query is correct and the zero was real.
5. What works vs what fails
| Step | Result |
|---|---|
| createTicketReservation | OK |
| createRedirectSession | OK |
| createSessionCookie | 302 (after host rewrite) |
| ticket-form page load | 200 |
| orders.checkout (API) | Creates INITIATED order — even cross-identity |
| Hosted form → place order | 400 INVALID_PAYMENT_REDIRECT_URL |
Calling orders.checkout directly with the same buyer fields succeeds and creates a real order. It sends no paymentRedirectUrl, so nothing is validated — which is consistent with that field being the sole cause.
The event’s registration form is also clean: system NAME (firstName, lastName) plus email, all mandatory, nothing deleted or custom. The payload matches it exactly.
6. Second defect: setting the Wix pages domain crashes your URL builder
Following your documentation, we set the Wix pages domain in Headless Settings. Immediately afterwards every createRedirectSession call failed site-wide — login, tickets and eCommerce alike — with a server-side crash:
TypeError [ERR_INVALID_URL]: Invalid URL
at new URL (node:internal/url:676:13)
at buildWixUrl (/opt/app/packages/redirects-api/dist/url-builder/url-builder.js:149:17)
at buildWixUrlWithHeadlessContext (url-builder.js:87:55)
at buildWixUrlWithCreateCookie (url-builder.js:245:38)
at RedirectSessionService.createRedirectSession (RedirectSessionService.js:98:82)
failed-client.method: wix.headless.v1.RedirectSessionService/CreateRedirectSession
requestId: 1789197172.2023213553911426
This took all checkout down for several minutes. We verified the OAuth app was byte-for-byte identical to its previous state throughout, so no client-side configuration of ours was involved. It recovered on its own. A malformed stored domain value should not produce an unhandled ERR_INVALID_URL in buildWixUrl.
7. What we have already tried
| Attempt | Result |
|---|---|
Add checkout domain to allowedRedirectDomains |
No effect — same error |
wixPagesDomainsMappings (origin→destination) |
Stored (200) but inert — redirect URLs still built on www |
redirectUrlWixPages |
Stored (200) but inert — redirect URLs still built on www |
| Wix pages domain via dashboard | Caused the outage in §6 |
All configuration changes above have been reverted; the OAuth app is back to its original state.
8. Questions
- For a self-managed headless project whose primary domain points to an external host, which domain should
createRedirectSessionbuildfullUrlon, and what is required for the Wix-hosted checkout to accept apaymentRedirectUrlon that domain? checkout.stylemachine.artis currently connected withassignmentType: REDIRECT. Does serving Wix-hosted pages require a different assignment, and if so which?- Is the
ERR_INVALID_URLcrash in §6 a known defect, and what stored value triggers it? - Our primary domain reports
dnsPropagationStatus: FAILEDwhile resolving normally. Is that related?
9. Reproduction
- Create a ticket reservation for a ticketed event.
- Call
createRedirectSessionwitheventsCheckout: { reservationId, eventSlug }. - Observe
fullUrlis onwww.stylemachine.art, which 404s (external host). - Rewrite the host to
checkout.stylemachine.art; the form loads (200). - Submit first name, last name, email →
400 INVALID_PAYMENT_REDIRECT_URL.
Prepared 12 September 2026 · Style Machine · all IDs and errors captured from live requests