-
Notifications
You must be signed in to change notification settings - Fork 11
Description
When using Chargebee JS with Adyen + Client Key + 3DS, payments fail on dynamic origins (e.g. Netlify deploy-preview URLs). The failure happens inside Chargebee’s internal call to fetch gateway credentials and appears to be caused by Chargebee treating Adyen’s “Origin already exists” response as a fatal error.
Using: https://js.chargebee.com/v2/chargebee.js
GET /api/internal/payment_intents/fetch_gateway_public_credential?origin=<window.location.origin>
Inside this call, Chargebee attempts to ensure the origin is registered in Adyen by calling the Adyen Management API:
POST /v3/me/allowedOrigins
If the origin already exists, Adyen responds with:
{
"type": "https://docs.adyen.com/errors/validation",
"title": "Invalid allowed origin information provided.",
"status": 422,
"requestId": "1f1fd450-1d13-efcc-b538-977c22ecbc7c_0-B63BFJ849FZ28332",
"invalidFields": [
{
"name": "domain",
"value": "https://deploy-preview-6082--site.netlify.app",
"message": "Origin already exists"
}
],
"errorCode": "31_004"
}
Then we get a 500
Breaking changes Adyen v1 to v3 (in case is related)
Note: Not happening on production or localhost.
This leaves the PaymentIntent stuck in inited and causes authorizeWith3ds to fail.