Package versions:
"@crossmint/client-sdk-base": "^1.0.1-alpha.4",
"@crossmint/client-sdk-react-ui": "^1.0.1-alpha.4"
When using embedded checkout CrossmintPaymentElement, this error is always returned:
{"error":true,"message":"projectId must be specified"}
I can verify that a valid projectId is being provided as a prop to the CrossmintPaymentElement component.
However, when I inspect the Network tab in the browser I see this:
method: POST
URL: https://staging.crossmint.com/api/checkout/initialize-order
Request payload: {
clientId: [REDACTED]
emailTo: [REDACTED]
mintConfig: [REDACTED]
checkoutType: "EMBEDDED",
};
I can verify that the CrossmintPaymentElement is making this request to initialize the iframe:
method: GET
url: https://staging.crossmint.com/sdk/paymentElement
params: {
clientId: [REDACTED]
recipient: [REDACTED]
mintConfig: [REDACTED]
projectId: [REDACTED]
}
So it appears that whatever calls are being made in the iframe are failing to forward the projectId to the API, which results in order initialization failure because the API requires a projectId.